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