Commit 802841eb by Paolo Carlini Committed by Paolo Carlini

cinttypes: Restore __STDC_FORMAT_MACRO after inclusion of <inttypes.h>.

2008-09-09  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/tr1_impl/cinttypes: Restore __STDC_FORMAT_MACRO after
	inclusion of <inttypes.h>.
	* include/tr1_impl/cstdint: Likewise for __STDC_LIMIT_MACROS and
	__STDC_CONSTANT_MACROS after <stdint.h>.
	* include/bits/postypes.h: Likewise.

From-SVN: r140174
parent e56f5f3e
2008-09-09 Paolo Carlini <paolo.carlini@oracle.com>
* include/tr1_impl/cinttypes: Restore __STDC_FORMAT_MACRO after
inclusion of <inttypes.h>.
* include/tr1_impl/cstdint: Likewise for __STDC_LIMIT_MACROS and
__STDC_CONSTANT_MACROS after <stdint.h>.
* include/bits/postypes.h: Likewise.
2008-09-09 Andreas Schwab <schwab@suse.de> 2008-09-09 Andreas Schwab <schwab@suse.de>
* acinclude.m4 (GLIBCXX_CHECK_STANDARD_LAYOUT): Fix compile check * acinclude.m4 (GLIBCXX_CHECK_STANDARD_LAYOUT): Fix compile check
......
...@@ -46,18 +46,30 @@ ...@@ -46,18 +46,30 @@
#include <cwchar> // For mbstate_t #include <cwchar> // For mbstate_t
// XXX If <stdint.h> is really needed, make sure to define the macros, // XXX If <stdint.h> is really needed, make sure to define the macros
// in order not to break <tr1/cstdint> (and <cstdint> in C++0x). // before including it, in order not to break <tr1/cstdint> (and <cstdint>
// Reconsider all this as soon as possible... // in C++0x). Reconsider all this as soon as possible...
#if (defined(_GLIBCXX_HAVE_INT64_T) && !defined(_GLIBCXX_HAVE_INT64_T_LONG) \ #if (defined(_GLIBCXX_HAVE_INT64_T) && !defined(_GLIBCXX_HAVE_INT64_T_LONG) \
&& !defined(_GLIBCXX_HAVE_INT64_T_LONG_LONG)) && !defined(_GLIBCXX_HAVE_INT64_T_LONG_LONG))
#ifndef __STDC_LIMIT_MACROS #ifndef __STDC_LIMIT_MACROS
# define _UNDEF__STDC_LIMIT_MACROS
# define __STDC_LIMIT_MACROS # define __STDC_LIMIT_MACROS
#endif #endif
#ifndef __STDC_CONSTANT_MACROS #ifndef __STDC_CONSTANT_MACROS
# define _UNDEF__STDC_CONSTANT_MACROS
# define __STDC_CONSTANT_MACROS # define __STDC_CONSTANT_MACROS
#endif #endif
#include <stdint.h> // For int64_t #include <stdint.h> // For int64_t
#ifdef _UNDEF__STDC_LIMIT_MACROS
# undef __STDC_LIMIT_MACROS
# undef _UNDEF__STDC_LIMIT_MACROS
#endif
#ifdef _UNDEF__STDC_CONSTANT_MACROS
# undef __STDC_CONSTANT_MACROS
# undef _UNDEF__STDC_CONSTANT_MACROS
#endif
#endif #endif
_GLIBCXX_BEGIN_NAMESPACE(std) _GLIBCXX_BEGIN_NAMESPACE(std)
......
...@@ -36,9 +36,16 @@ ...@@ -36,9 +36,16 @@
#if _GLIBCXX_USE_C99_INTTYPES_TR1 #if _GLIBCXX_USE_C99_INTTYPES_TR1
// For 8.11.1/1 (see C99, Note 184) // For 8.11.1/1 (see C99, Note 184)
#define __STDC_FORMAT_MACROS #ifndef __STDC_FORMAT_MACROS
# define _UNDEF__STDC_FORMAT_MACROS
# define __STDC_FORMAT_MACROS
#endif
#include_next <inttypes.h> #include_next <inttypes.h>
#ifdef _UNDEF__STDC_FORMAT_MACROS
# undef __STDC_FORMAT_MACROS
# undef _UNDEF__STDC_FORMAT_MACROS
#endif
namespace std namespace std
{ {
......
...@@ -38,12 +38,22 @@ ...@@ -38,12 +38,22 @@
// For 8.22.1/1 (see C99, Notes 219, 220, 222) // For 8.22.1/1 (see C99, Notes 219, 220, 222)
#ifndef __STDC_LIMIT_MACROS #ifndef __STDC_LIMIT_MACROS
# define _UNDEF__STDC_LIMIT_MACROS
# define __STDC_LIMIT_MACROS # define __STDC_LIMIT_MACROS
#endif #endif
#ifndef __STDC_CONSTANT_MACROS #ifndef __STDC_CONSTANT_MACROS
# define _UNDEF__STDC_CONSTANT_MACROS
# define __STDC_CONSTANT_MACROS # define __STDC_CONSTANT_MACROS
#endif #endif
#include_next <stdint.h> #include_next <stdint.h>
#ifdef _UNDEF__STDC_LIMIT_MACROS
# undef __STDC_LIMIT_MACROS
# undef _UNDEF__STDC_LIMIT_MACROS
#endif
#ifdef _UNDEF__STDC_CONSTANT_MACROS
# undef __STDC_CONSTANT_MACROS
# undef _UNDEF__STDC_CONSTANT_MACROS
#endif
namespace std namespace std
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment