diff options
| author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-11-13 00:06:55 +0000 |
|---|---|---|
| committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-11-13 00:06:55 +0000 |
| commit | 2239ee440363b3fee03a4399034ea476a171b65a (patch) | |
| tree | 0656ea17a2a3a10982bca04829ccc34ba3553545 /libstdc++-v3/include/c_compatibility | |
| parent | f78106c3c2d68e49b9956ff683ef124d7ec8023b (diff) | |
| download | ppe42-gcc-2239ee440363b3fee03a4399034ea476a171b65a.tar.gz ppe42-gcc-2239ee440363b3fee03a4399034ea476a171b65a.zip | |
2008-11-13 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/38000
* include/c_global/csignal: Do not use include_next.
* include/c_global/cstdlib: Likewise.
* include/c_global/cstdio: Likewise.
* include/c_global/cstdarg: Likewise.
* include/c_global/cctype: Likewise.
* include/c_global/cerrno: Likewise.
* include/c_global/cmath: Likewise.
* include/c_global/clocale: Likewise.
* include/c_global/climits: Likewise.
* include/c_global/cassert: Likewise.
* include/c_global/csetjmp: Likewise.
* include/c_global/cwchar: Likewise.
* include/c_global/cfloat: Likewise.
* include/c_global/cstdbool: Likewise.
* include/c_global/cstring: Likewise.
* include/c_global/cstddef: Likewise.
* include/c_global/cwctype: Likewise.
* include/tr1/cstdbool: Likewise.
* include/tr1_impl/cinttypes: Do not include <inttypes.h>.
* include/c_global/cinttypes: Do it here.
* include/tr1/cinttypes: Likewise.
* include/tr1_impl/cfenv: Do not include <fenv.h>.
* include/c_global/cfenv: Do it here.
* include/tr1/cfenv: Likewise.
* include/tr1_impl/cstdint: Do not include <stdint.h>.
* include/c_global/cstdint: Do it here.
* include/tr1/cstdint: Likewise.
* include/c_compatibility/fenv.h: Include <tr1_impl/cfenv>.
* include/c_compatibility/stdint.h: Include <tr1_impl/cstdint>.
* include/c_compatibility/inttypes.h: Include <tr1_impl/cinttypes>.
* include/c_compatibility/math.h: Minor tweak, add comment.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@141812 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/c_compatibility')
| -rw-r--r-- | libstdc++-v3/include/c_compatibility/fenv.h | 36 | ||||
| -rw-r--r-- | libstdc++-v3/include/c_compatibility/inttypes.h | 46 | ||||
| -rw-r--r-- | libstdc++-v3/include/c_compatibility/math.h | 5 | ||||
| -rw-r--r-- | libstdc++-v3/include/c_compatibility/stdint.h | 54 |
4 files changed, 117 insertions, 24 deletions
diff --git a/libstdc++-v3/include/c_compatibility/fenv.h b/libstdc++-v3/include/c_compatibility/fenv.h index 44661d72c02..f24a217b8f5 100644 --- a/libstdc++-v3/include/c_compatibility/fenv.h +++ b/libstdc++-v3/include/c_compatibility/fenv.h @@ -1,6 +1,6 @@ // -*- C++ -*- compatibility header. -// 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 @@ -31,17 +31,33 @@ * This is a Standard C++ Library header. */ +#ifndef _GLIBCXX_FENV_H +#define _GLIBCXX_FENV_H 1 + +#pragma GCC system_header + #include <bits/c++config.h> +#if _GLIBCXX_HAVE_FENV_H +# include_next <fenv.h> +#endif #ifdef __GXX_EXPERIMENTAL_CXX0X__ -# include <cfenv> -#else -# if _GLIBCXX_HAVE_FENV_H -# include_next <fenv.h> -# endif +# if defined(_GLIBCXX_INCLUDE_AS_TR1) +# error C++0x header cannot be included from TR1 header +# endif +# if defined(_GLIBCXX_INCLUDE_AS_CXX0X) +# include <tr1_impl/cfenv> +# else +# define _GLIBCXX_INCLUDE_AS_CXX0X +# define _GLIBCXX_BEGIN_NAMESPACE_TR1 +# define _GLIBCXX_END_NAMESPACE_TR1 +# define _GLIBCXX_TR1 +# include <tr1_impl/cfenv> +# undef _GLIBCXX_TR1 +# undef _GLIBCXX_END_NAMESPACE_TR1 +# undef _GLIBCXX_BEGIN_NAMESPACE_TR1 +# undef _GLIBCXX_INCLUDE_AS_CXX0X +# endif #endif -#ifndef _GLIBCXX_FENV_H -#define _GLIBCXX_FENV_H 1 - -#endif +#endif // _GLIBCXX_FENV_H diff --git a/libstdc++-v3/include/c_compatibility/inttypes.h b/libstdc++-v3/include/c_compatibility/inttypes.h index 562d0aa9063..3e722d46acf 100644 --- a/libstdc++-v3/include/c_compatibility/inttypes.h +++ b/libstdc++-v3/include/c_compatibility/inttypes.h @@ -1,6 +1,6 @@ // -*- C++ -*- compatibility header. -// 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 @@ -31,17 +31,51 @@ * This is a Standard C++ Library header. */ +#ifndef _GLIBCXX_INTTYPES_H +#define _GLIBCXX_INTTYPES_H 1 + +#pragma GCC system_header + #include <bits/c++config.h> #ifdef __GXX_EXPERIMENTAL_CXX0X__ -# include <cinttypes> + +// For 8.11.1/1 (see C99, Note 184) +# if _GLIBCXX_HAVE_INTTYPES_H +# 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 +# endif + +# if defined(_GLIBCXX_INCLUDE_AS_TR1) +# error C++0x header cannot be included from TR1 header +# endif +# if defined(_GLIBCXX_INCLUDE_AS_CXX0X) +# include <tr1_impl/cinttypes> +# else +# define _GLIBCXX_INCLUDE_AS_CXX0X +# define _GLIBCXX_BEGIN_NAMESPACE_TR1 +# define _GLIBCXX_END_NAMESPACE_TR1 +# define _GLIBCXX_TR1 +# include <tr1_impl/cinttypes> +# undef _GLIBCXX_TR1 +# undef _GLIBCXX_END_NAMESPACE_TR1 +# undef _GLIBCXX_BEGIN_NAMESPACE_TR1 +# undef _GLIBCXX_INCLUDE_AS_CXX0X +# endif + #else + # if _GLIBCXX_HAVE_INTTYPES_H # include_next <inttypes.h> # endif -#endif -#ifndef _GLIBCXX_INTTYPES_H -#define _GLIBCXX_INTTYPES_H 1 +#endif // __GXX_EXPERIMENTAL_CXX0X__ -#endif +#endif // _GLIBCXX_INTTYPES_H diff --git a/libstdc++-v3/include/c_compatibility/math.h b/libstdc++-v3/include/c_compatibility/math.h index 69dc82ac514..5950bf87a70 100644 --- a/libstdc++-v3/include/c_compatibility/math.h +++ b/libstdc++-v3/include/c_compatibility/math.h @@ -1,6 +1,7 @@ // -*- C++ -*- compatibility header. -// Copyright (C) 2002, 2007 Free Software Foundation, Inc. +// Copyright (C) 2002, 2003, 2004, 2005, 2006, 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 @@ -76,6 +77,6 @@ using std::islessgreater; using std::isunordered; #endif -#endif // __GXX_EXPERIMENTAL_CXX0X__ +#endif #endif diff --git a/libstdc++-v3/include/c_compatibility/stdint.h b/libstdc++-v3/include/c_compatibility/stdint.h index c59a1cd76db..e2cb038ba94 100644 --- a/libstdc++-v3/include/c_compatibility/stdint.h +++ b/libstdc++-v3/include/c_compatibility/stdint.h @@ -1,6 +1,6 @@ // -*- C++ -*- compatibility header. -// 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 @@ -31,17 +31,59 @@ * This is a Standard C++ Library header. */ +#ifndef _GLIBCXX_STDINT_H +#define _GLIBCXX_STDINT_H 1 + +#pragma GCC system_header + #include <bits/c++config.h> #ifdef __GXX_EXPERIMENTAL_CXX0X__ -# include <cstdint> + +// For 8.22.1/1 (see C99, Notes 219, 220, 222) +# if _GLIBCXX_HAVE_STDINT_H +# ifndef __STDC_LIMIT_MACROS +# define _UNDEF__STDC_LIMIT_MACROS +# define __STDC_LIMIT_MACROS +# endif +# ifndef __STDC_CONSTANT_MACROS +# define _UNDEF__STDC_CONSTANT_MACROS +# define __STDC_CONSTANT_MACROS +# endif +# include_next <stdint.h> +# ifdef _UNDEF__STDC_LIMIT_MACROS +# undef __STDC_LIMIT_MACROS +# undef _UNDEF__STDC_LIMIT_MACROS +# endif +# ifdef _UNDEF__STDC_CONSTANT_MACROS +# undef __STDC_CONSTANT_MACROS +# undef _UNDEF__STDC_CONSTANT_MACROS +# endif +# endif + +# if defined(_GLIBCXX_INCLUDE_AS_TR1) +# error C++0x header cannot be included from TR1 header +# endif +# if defined(_GLIBCXX_INCLUDE_AS_CXX0X) +# include <tr1_impl/cstdint> +# else +# define _GLIBCXX_INCLUDE_AS_CXX0X +# define _GLIBCXX_BEGIN_NAMESPACE_TR1 +# define _GLIBCXX_END_NAMESPACE_TR1 +# define _GLIBCXX_TR1 +# include <tr1_impl/cstdint> +# undef _GLIBCXX_TR1 +# undef _GLIBCXX_END_NAMESPACE_TR1 +# undef _GLIBCXX_BEGIN_NAMESPACE_TR1 +# undef _GLIBCXX_INCLUDE_AS_CXX0X +# endif + #else + # if _GLIBCXX_HAVE_STDINT_H # include_next <stdint.h> # endif -#endif -#ifndef _GLIBCXX_STDINT_H -#define _GLIBCXX_STDINT_H 1 +#endif // __GXX_EXPERIMENTAL_CXX0X__ -#endif +#endif // _GLIBCXX_STDINT_H |

