OSDN Git Service

2007-05-31 Paolo Carlini <pcarlini@suse.de>
[pf3gnuchains/gcc-fork.git] / libstdc++-v3 / include / tr1 / cstdint
index 56fa308..6f7ac76 100644 (file)
  *  This is a TR1 C++ Library header. 
  */
 
-#ifndef _TR1_CSTDINT
-#define _TR1_CSTDINT 1
+#ifndef _GLIBCXX_TR1_CSTDINT
+#define _GLIBCXX_TR1_CSTDINT 1
 
-#include <bits/c++config.h>
-
-#if _GLIBCXX_USE_C99_STDINT_TR1
-
-// For 8.22.1/1 (see C99, Notes 219, 220, 222) 
-#define __STDC_LIMIT_MACROS
-#define __STDC_CONSTANT_MACROS
-#include_next <stdint.h>
-
-// namespace std::tr1
-namespace std
-{
-_GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
-
-  using ::int8_t;
-  using ::int16_t;
-  using ::int32_t;
-  using ::int64_t;
-
-  using ::int_fast8_t;
-  using ::int_fast16_t;
-  using ::int_fast32_t;
-  using ::int_fast64_t;
-
-  using ::int_least8_t;
-  using ::int_least16_t;
-  using ::int_least32_t;
-  using ::int_least64_t;
+#pragma GCC system_header
 
-  using ::intmax_t;
-  using ::intptr_t;
-  
-  using ::uint8_t;
-  using ::uint16_t;
-  using ::uint32_t;
-  using ::uint64_t;
-
-  using ::uint_fast8_t;
-  using ::uint_fast16_t;
-  using ::uint_fast32_t;
-  using ::uint_fast64_t;
-
-  using ::uint_least8_t;
-  using ::uint_least16_t;
-  using ::uint_least32_t;
-  using ::uint_least64_t;
-
-  using ::uintmax_t;
-  using ::uintptr_t;
+#if defined(_GLIBCXX_INCLUDE_AS_CXX0X)
+#  error TR1 header cannot be included from C++0x header
+#endif
 
-_GLIBCXX_END_NAMESPACE
-}
+#include <bits/c++config.h>
 
+#if defined(_GLIBCXX_INCLUDE_AS_TR1)
+#  include <tr1_impl/cstdint>
+#else
+#  define _GLIBCXX_INCLUDE_AS_TR1
+#  define _GLIBCXX_BEGIN_NAMESPACE_TR1 namespace tr1 {
+#  define _GLIBCXX_END_NAMESPACE_TR1 }
+#  define _GLIBCXX_TR1 tr1::
+#  include <tr1_impl/cstdint>
+#  undef _GLIBCXX_TR1
+#  undef _GLIBCXX_END_NAMESPACE_TR1
+#  undef _GLIBCXX_BEGIN_NAMESPACE_TR1
+#  undef _GLIBCXX_INCLUDE_AS_TR1
 #endif
 
-#endif
+#endif // _GLIBCXX_TR1_CSTDINT
+