diff options
Diffstat (limited to 'libstdc++-v3/shadow/string.h')
| -rw-r--r-- | libstdc++-v3/shadow/string.h | 71 |
1 files changed, 42 insertions, 29 deletions
diff --git a/libstdc++-v3/shadow/string.h b/libstdc++-v3/shadow/string.h index 5b913b3de2f..6f9e6cc6372 100644 --- a/libstdc++-v3/shadow/string.h +++ b/libstdc++-v3/shadow/string.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 @@ -29,35 +29,48 @@ #ifndef _INCLUDED_CPP_STRING_H_ -# undef _SHADOW_NAME -# define _SHADOW_NAME <cstring> -# include <bits/generic_shadow.h> -# undef _SHADOW_NAME - -# ifndef _IN_C_LEGACY_ - using ::std::memcpy; - using ::std::memmove; - using ::std::strcpy; - using ::std::strncpy; - using ::std::strcat; - using ::std::strncat; - using ::std::memcmp; - using ::std::strcmp; - using ::std::strcoll; - using ::std::strncmp; - using ::std::strxfrm; - using ::std::memchr; - using ::std::strchr; - using ::std::strcspn; - using ::std::strpbrk; - using ::std::strrchr; - using ::std::strspn; - using ::std::strstr; - using ::std::strtok; - using ::std::memset; - using ::std::strerror; - using ::std::strlen; # define _INCLUDED_CPP_STRING_H_ 1 + +# ifdef _IN_C_LEGACY_ /* sub-included by a C header */ + // get out of the "legacy" + } // close extern "C" + } // close namespace _C_legacy:: +# undef _IN_C_LEGACY_ +# define _STRING_NEED_C_LEGACY_ # endif +# include <cstring> + + // Expose global C names, including non-standard ones, but shadow + // some names and types with the std:: C++ version. + using std::memcpy; + using std::memmove; + using std::strcpy; + using std::strncpy; + using std::strcat; + using std::strncat; + using std::memcmp; + using std::strcmp; + using std::strcoll; + using std::strncmp; + using std::strxfrm; + using std::memchr; + using std::strchr; + using std::strcspn; + using std::strpbrk; + using std::strrchr; + using std::strspn; + using std::strstr; + using std::strtok; + using std::memset; + using std::strerror; + using std::strlen; + +# ifdef _STRING_NEED_C_LEGACY_ + // dive back into the "swamp" + namespace _C_legacy { + extern "C" { +# define _IN_C_LEGACY_ +# undef _STRING_NEED_C_LEGACY_ +# endif /* _STRING_NEED_C_LEGACY_ */ #endif /* _INCLUDED_CPP_STRING_H_ */ |

