diff options
author | peter <peter@FreeBSD.org> | 2008-06-01 00:03:21 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2008-06-01 00:03:21 +0000 |
commit | a2be5f0c15218b0177d73b17d9bcb7589965d685 (patch) | |
tree | c9f0cd9c22378356a1716d32e13e70bc90f98b9c /libg++/libstdc++/std/cstring.h | |
parent | 9e0f3cc19c9df1594c9cc36cfd8fddc83c52ad12 (diff) | |
download | FreeBSD-src-a2be5f0c15218b0177d73b17d9bcb7589965d685.zip FreeBSD-src-a2be5f0c15218b0177d73b17d9bcb7589965d685.tar.gz |
Reorganize the gcc vendor import work area. This flattens out a bunch
of unnecessary path components that are relics of cvs2svn.
(These are directory moves)
Diffstat (limited to 'libg++/libstdc++/std/cstring.h')
-rw-r--r-- | libg++/libstdc++/std/cstring.h | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/libg++/libstdc++/std/cstring.h b/libg++/libstdc++/std/cstring.h new file mode 100644 index 0000000..6d493e7 --- /dev/null +++ b/libg++/libstdc++/std/cstring.h @@ -0,0 +1,71 @@ +// The -*- C++ -*- null-terminated string header. +// This file is part of the GNU ANSI C++ Library. + +#ifndef __CSTRING__ +#define __CSTRING__ + +#if 0 // Let's not bother with this just yet. +// The ANSI C prototypes for these functions have a const argument type and +// non-const return type, so we can't use them. + +#define strchr __hide_strchr +#define strpbrk __hide_strpbrk +#define strrchr __hide_strrchr +#define strstr __hide_strstr +#define memchr __hide_memchr +#endif // 0 + +#include_next <string.h> + +#if 0 // Let's not bother with this just yet. +#undef strchr +#undef strpbrk +#undef strrchr +#undef strstr +#undef memchr + +#include <std/cstddef.h> + +#ifdef __GNUG__ +#pragma interface "std/cstring.h" +#endif + +extern "C++" { +extern "C" const char *strchr (const char *, int); +inline char * +strchr (char *s, int c) +{ + return const_cast<char *> (strchr (static_cast<const char *> (s), c)); +} + +extern "C" const char *strpbrk (const char *, const char *); +inline char * +strpbrk (char *s1, const char *s2) +{ + return const_cast<char *> (strpbrk (static_cast<const char *> (s1), s2)); +} + +extern "C" const char *strrchr (const char *, int); +inline char * +strrchr (char *s, int c) +{ + return const_cast<char *> (strrchr (static_cast<const char *> (s), c)); +} + +extern "C" const char *strstr (const char *, const char *); +inline char * +strstr (char *s1, const char *s2) +{ + return const_cast<char *> (strstr (static_cast<const char *> (s1), s2)); +} + +extern "C" const void *memchr (const void *, int, size_t); +inline void * +memchr (void *s, int c, size_t n) +{ + return const_cast<void *> (memchr (static_cast<const void *> (s), c, n)); +} +} // extern "C++" + +#endif // 0 +#endif // !defined (__CSTRING__) |