Commit | Line | Data |
---|---|---|
c906108c SS |
1 | /* Portable <string.h> |
2 | Copyright 1995, 1998 Free Software Foundation, Inc. | |
3 | ||
c5aa993b | 4 | This file is part of GDB. |
c906108c | 5 | |
c5aa993b JM |
6 | This program is free software; you can redistribute it and/or modify |
7 | it under the terms of the GNU General Public License as published by | |
8 | the Free Software Foundation; either version 2 of the License, or | |
9 | (at your option) any later version. | |
c906108c | 10 | |
c5aa993b JM |
11 | This program is distributed in the hope that it will be useful, |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | GNU General Public License for more details. | |
c906108c | 15 | |
c5aa993b JM |
16 | You should have received a copy of the GNU General Public License |
17 | along with this program; if not, write to the Free Software | |
18 | Foundation, Inc., 59 Temple Place - Suite 330, | |
19 | Boston, MA 02111-1307, USA. */ | |
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 | |
34 | extern char *strchr PARAMS ((const char *, int)); /* X3.159-1989 4.11.5.2 */ | |
35 | #endif | |
36 | ||
37 | #ifndef strrchr | |
38 | extern char *strrchr PARAMS ((const char *, int)); /* X3.159-1989 4.11.5.5 */ | |
39 | #endif | |
40 | ||
c906108c SS |
41 | #ifndef strtok |
42 | extern char *strtok PARAMS ((char *, const char *)); /* X3.159-1989 4.11.5.8 */ | |
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 | ||
55 | #ifdef NEED_DECLARATION_STRERROR | |
56 | #ifndef strerror | |
57 | extern char *strerror PARAMS ((int)); /* X3.159-1989 4.11.6.2 */ | |
58 | #endif | |
59 | #endif | |
60 | ||
61 | #ifdef NEED_DECLARATION_STRDUP | |
c5aa993b | 62 | extern char *strdup (); /* full prototype collides w/ some OSes (AIX 3.2.5) */ |
c906108c SS |
63 | #endif |
64 | ||
b83266a0 SS |
65 | #ifdef NEED_DECLARATION_STRSTR |
66 | #ifndef strstr | |
67 | extern char *strstr PARAMS ((const char *, const char *)); /* X3.159-1989 4.11.5.7 */ | |
68 | #endif | |
69 | #endif | |
70 | ||
c5aa993b | 71 | #endif /* !defined(GDB_STRING_H) */ |