Commit | Line | Data |
---|---|---|
c906108c | 1 | /* Portable <string.h> |
a3828db0 | 2 | |
6aba47ca | 3 | Copyright (C) 1995, 1998, 1999, 2000, 2001, 2004, 2007 |
a3828db0 | 4 | Free Software Foundation, Inc. |
c906108c | 5 | |
c5aa993b | 6 | This file is part of GDB. |
c906108c | 7 | |
c5aa993b JM |
8 | This program is free software; you can redistribute it and/or modify |
9 | it under the terms of the GNU General Public License as published by | |
a9762ec7 | 10 | the Free Software Foundation; either version 3 of the License, or |
c5aa993b | 11 | (at your option) any later version. |
c906108c | 12 | |
c5aa993b JM |
13 | This program is distributed in the hope that it will be useful, |
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | GNU General Public License for more details. | |
c906108c | 17 | |
c5aa993b | 18 | You should have received a copy of the GNU General Public License |
a9762ec7 | 19 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
c906108c SS |
20 | |
21 | #if !defined(GDB_STRING_H) | |
22 | #define GDB_STRING_H | |
23 | ||
24 | #ifdef STDC_HEADERS | |
25 | #include <string.h> | |
26 | #else | |
c5aa993b JM |
27 | #ifdef HAVE_STRING_H |
28 | #include <string.h> | |
29 | #else | |
30 | #include <strings.h> | |
31 | #endif | |
c906108c SS |
32 | |
33 | #ifndef strchr | |
a14ed312 | 34 | extern char *strchr (const char *, int); /* X3.159-1989 4.11.5.2 */ |
c906108c SS |
35 | #endif |
36 | ||
37 | #ifndef strrchr | |
a14ed312 | 38 | extern char *strrchr (const char *, int); /* X3.159-1989 4.11.5.5 */ |
c906108c SS |
39 | #endif |
40 | ||
c906108c | 41 | #ifndef strtok |
a14ed312 | 42 | extern char *strtok (char *, const char *); /* X3.159-1989 4.11.5.8 */ |
c906108c SS |
43 | #endif |
44 | ||
c5aa993b JM |
45 | #ifdef HAVE_MEMORY_H |
46 | #include <memory.h> | |
47 | #else | |
48 | extern void *memset (); | |
49 | extern void *memcpy (); | |
50 | extern void *memmove (); | |
51 | extern int memcmp (); | |
52 | #endif | |
c906108c SS |
53 | #endif /* STDC_HEADERS */ |
54 | ||
a3828db0 | 55 | #if !HAVE_DECL_STRERROR |
c906108c | 56 | #ifndef strerror |
a14ed312 | 57 | extern char *strerror (int); /* X3.159-1989 4.11.6.2 */ |
c906108c SS |
58 | #endif |
59 | #endif | |
60 | ||
a3828db0 | 61 | #if !HAVE_DECL_STRSTR |
b83266a0 | 62 | #ifndef strstr |
a3828db0 | 63 | extern char *strstr (const char *, const char *); /* X3.159-1989 4.11.5.7 */ |
b83266a0 SS |
64 | #endif |
65 | #endif | |
66 | ||
c5aa993b | 67 | #endif /* !defined(GDB_STRING_H) */ |