Hash :
443bc5ff
Author :
Date :
2011-12-13T15:27:41
inttypes, stdint: add C++11 support C++11 says there's no need to define __STDC_CONSTANT_MACROS etc. when including inttypes.h and stdint.h. Support this change to the standard. * doc/posix-headers/inttypes.texi (inttypes.h): * doc/posix-headers/stdint.texi (stdint.h): Document this. * lib/inttypes.in.h (__STDC_FORMAT_MACROS) [! __cplusplus]: Define if not defined already, for the benefit of pre-C++11 hosts. Define the standard format macros (e.g., PRId8) always. * lib/stdint.in.h (__STDC_CONSTANT_MACROS, __STDC_LIMIT_MACROS): Likewise, if __cpluspus. Define the standard constant and limit macros (e.g., INT8_C, INT8_MAX) always. * m4/inttypes.m4 (gl_INTTYPES_INCOMPLETE): Do not define GL_TRIGGER_STDC_LIMIT_MACROS or __STDC_LIMIT_MACROS; no longer needed. * m4/stdint.m4 (gl_STDINT_H): Update comments about these macros. * tests/test-inttypes.c (__STDC_LIMIT_MACROS, __STDC_CONSTANT_MACROS) (__STDC_FORMAT_MACROS): Do not define, since we assume C++11 API now. * tests/test-stdint.c (__STDC_LIMIT_MACROS, __STDC_CONSTANT_MACROS): Likewise.
@node inttypes.h
@section @file{inttypes.h}
POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/basedefs/inttypes.h.html}
Gnulib module: inttypes
Portability problems fixed by Gnulib:
@itemize
@item
This header file is missing on some platforms:
OSF/1 4.0, MSVC 9, Interix 3.5.
@item
This header file is very incomplete on some platforms.
@item
The PRI* macros are defined to non-string values on AIX 4.3.3.
@item
The declarations of @code{imaxabs} and @code{imaxdiv} are missing on some
platforms:
NetBSD 3.0, OpenBSD 3.8, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, BeOS.
@item
The declarations of @code{strtoimax} and @code{strtoumax} are missing on some
platforms:
OpenBSD 3.8, AIX 4.3.2, AIX 5.1 (missing only @code{strtoumax}), OSF/1 5.1.
@item
On some hosts that predate C++11, when using C++ one must define
@code{__STDC_FORMAT_MACROS} to make visible the declarations of format
macros such as @code{PRIdMAX}.
@end itemize
Portability problems not fixed by Gnulib:
@itemize
@end itemize