postypes.h: Reinstate inclusion of <stdint.h>; also define the __STDC_* macros.
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. From-SVN: r138608
This commit is contained in:
parent
382dbcb228
commit
d27653b8a3
3 changed files with 31 additions and 9 deletions
|
@ -1,3 +1,12 @@
|
|||
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>
|
||||
|
||||
|
|
|
@ -46,6 +46,19 @@
|
|||
|
||||
#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
|
||||
|
@ -64,11 +77,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
|
|||
* 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// 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
|
||||
|
@ -36,9 +36,13 @@
|
|||
|
||||
#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
|
||||
|
|
Loading…
Add table
Reference in a new issue