OSDN Git Service

2008-09-09 Paolo Carlini <paolo.carlini@oracle.com>
[pf3gnuchains/gcc-fork.git] / libstdc++-v3 / include / tr1_impl / cinttypes
index 1762593..a6b7435 100644 (file)
@@ -1,6 +1,6 @@
 // TR1 cinttypes -*- C++ -*-
 
-// Copyright (C) 2007 Free Software Foundation, Inc.
+// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
 // software; you can redistribute it and/or modify it under the
 
 #if _GLIBCXX_USE_C99_INTTYPES_TR1
 
-// For 8.11.1/1 (see C99, Note 184) 
-#define __STDC_FORMAT_MACROS
+// For 8.11.1/1 (see C99, Note 184)
+#ifndef __STDC_FORMAT_MACROS
+# define _UNDEF__STDC_FORMAT_MACROS
+# define __STDC_FORMAT_MACROS
+#endif
 #include_next <inttypes.h>
+#ifdef _UNDEF__STDC_FORMAT_MACROS
+# undef __STDC_FORMAT_MACROS
+# undef _UNDEF__STDC_FORMAT_MACROS
+#endif
 
 namespace std
 {
@@ -64,7 +71,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1
   using ::strtoimax;
   using ::strtoumax;
 
-#ifdef _GLIBCXX_USE_WCHAR_T
+#if defined(_GLIBCXX_USE_WCHAR_T) && _GLIBCXX_USE_C99_INTTYPES_WCHAR_T_TR1
   using ::wcstoimax;
   using ::wcstoumax;
 #endif