+2008-08-04 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * include/bits/postypes.h: Reinstate inclusion of <stdint.h>;
+ also define the __STDC_* macros.
+ (streamoff): Adjust.
+
+ * include/tr1_impl/cstdint: Check that the __STDC_* macros are
+ not defined before defining.
+
2008-08-01 Paolo Bonzini <bonzini@gnu.org>
Chris Fairles <chris.fairles@gmail.com>
#include <cwchar> // For mbstate_t
+// 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).
+// Reconsider all this as soon as possible...
+#ifdef _GLIBCXX_HAVE_INT64_T
+#ifndef __STDC_LIMIT_MACROS
+# define __STDC_LIMIT_MACROS
+#endif
+#ifndef __STDC_CONSTANT_MACROS
+# define __STDC_CONSTANT_MACROS
+#endif
+#include <stdint.h> // For int64_t
+#endif
+
_GLIBCXX_BEGIN_NAMESPACE(std)
// The types streamoff, streampos and wstreampos and the class
* was typedef long.
*/
#ifdef _GLIBCXX_HAVE_INT64_T
-# if (__CHAR_BIT__ * __SIZEOF_LONG__ == 64)
- typedef long streamoff;
-# else
- typedef long long streamoff;
-# endif
+ typedef int64_t streamoff;
#else
typedef long long streamoff;
#endif
// TR1 cstdint -*- 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_STDINT_TR1
-// For 8.22.1/1 (see C99, Notes 219, 220, 222)
-#define __STDC_LIMIT_MACROS
-#define __STDC_CONSTANT_MACROS
+// For 8.22.1/1 (see C99, Notes 219, 220, 222)
+#ifndef __STDC_LIMIT_MACROS
+# define __STDC_LIMIT_MACROS
+#endif
+#ifndef __STDC_CONSTANT_MACROS
+# define __STDC_CONSTANT_MACROS
+#endif
#include_next <stdint.h>
namespace std