// 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
{
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