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