diff options
Diffstat (limited to 'libstdc++-v3/shadow/bits/std_clocale.h')
| -rw-r--r-- | libstdc++-v3/shadow/bits/std_clocale.h | 79 |
1 files changed, 20 insertions, 59 deletions
diff --git a/libstdc++-v3/shadow/bits/std_clocale.h b/libstdc++-v3/shadow/bits/std_clocale.h index 33697ab1efa..86d600e262e 100644 --- a/libstdc++-v3/shadow/bits/std_clocale.h +++ b/libstdc++-v3/shadow/bits/std_clocale.h @@ -1,6 +1,6 @@ // -*- C++ -*- header wrapper. -// Copyright (C) 1997-1999 Free Software Foundation, Inc. +// Copyright (C) 1997-1999, 2000 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 @@ -34,76 +34,37 @@ #ifndef _CPP_CLOCALE #define _CPP_CLOCALE 1 -# include <bits/std_cstddef.h> /* pick up NULL */ +# include <bits/std_cstddef.h> - namespace _C_legacy { - extern "C" { +namespace _C_legacy { + extern "C" { # define _IN_C_LEGACY_ # pragma GCC system_header # include_next <locale.h> - } - - typedef struct lconv _CPP_lconv_capture; - const int _CPP_LC_ALL_capture = LC_ALL; - const int _CPP_LC_COLLATE_capture = LC_COLLATE; - const int _CPP_LC_CTYPE_capture = LC_CTYPE; - const int _CPP_LC_MONETARY_capture = LC_MONETARY; - const int _CPP_LC_NUMERIC_capture = LC_NUMERIC; - const int _CPP_LC_TIME_capture = LC_TIME; -#if 0 /* XXX need proper macro guard for this common extension. */ - const int _CPP_LC_MESSAGES_capture = LC_MESSAGES; -#endif - - namespace _C_shadow { } - } // close namespace ::_C_legacy:: - -// # undef NULL -// # define NULL 0 /* handled in <cstddef> */ -# undef LC_ALL -# define LC_ALL ::_C_legacy::_CPP_LC_ALL_capture -# undef LC_COLLATE -# define LC_COLLATE ::_C_legacy::_CPP_LC_COLLATE_capture -# undef LC_CTYPE -# define LC_CTYPE ::_C_legacy::_CPP_LC_CTYPE_capture -# undef LC_MONETARY -# define LC_MONETARY ::_C_legacy::_CPP_LC_MONETARY_capture -# undef LC_NUMERIC -# define LC_NUMERIC ::_C_legacy::_CPP_LC_NUMERIC_capture -# undef LC_TIME -# define LC_TIME ::_C_legacy::_CPP_LC_TIME_capture -#if 0 /* XXX need proper macro guard for this common extension. */ -# undef LC_MESSAGES -# define LC_MESSAGES ::_C_legacy::_CPP_LC_MESSAGES_capture -#endif + } + + typedef lconv _CPP_lconv_capture; +} // namespace _C_legacy # undef lconv # undef setlocale # undef localeconv - namespace _C_legacy { - namespace _C_shadow { - } - } - namespace std { +namespace std { + // Adopt C names into std:: + struct lconv : _C_legacy::_CPP_lconv_capture { }; - // Adopt C names into std:: - using ::_C_legacy::setlocale; + using _C_legacy::setlocale; + + inline lconv* + localeconv() { return reinterpret_cast<lconv*>(_C_legacy::localeconv()); } +} // namespace std + +# undef _IN_C_LEGACY_ + +#endif - // note: still a POD type: - struct lconv : ::_C_legacy::_CPP_lconv_capture { }; - inline lconv* localeconv() - { return reinterpret_cast<lconv*>(::_C_legacy::localeconv()); } - } // close namespace std:: - - namespace _C_legacy { - namespace _C_shadow { - using ::std::lconv; - using ::std::localeconv; - } - } -# undef _IN_C_LEGACY_ -#endif /* _CPP_CLOCALE */ |

