| 1 | /* Portable <string.h> |
| 2 | Copyright 1995 Free Software Foundation, Inc. |
| 3 | |
| 4 | This file is part of GDB. |
| 5 | |
| 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. |
| 10 | |
| 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. |
| 15 | |
| 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, Boston, MA 02111-1307, USA. */ |
| 19 | |
| 20 | #if !defined(GDB_STRING_H) |
| 21 | #define GDB_STRING_H |
| 22 | |
| 23 | #ifdef STDC_HEADERS |
| 24 | #include <string.h> |
| 25 | #else |
| 26 | # ifdef HAVE_STRING_H |
| 27 | # include <string.h> |
| 28 | # else |
| 29 | # include <strings.h> |
| 30 | # endif |
| 31 | |
| 32 | #ifndef strchr |
| 33 | extern char *strchr PARAMS ((const char *, int)); /* X3.159-1989 4.11.5.2 */ |
| 34 | #endif |
| 35 | |
| 36 | #ifndef strrchr |
| 37 | extern char *strrchr PARAMS ((const char *, int)); /* X3.159-1989 4.11.5.5 */ |
| 38 | #endif |
| 39 | |
| 40 | #ifndef strstr |
| 41 | extern char *strstr PARAMS ((const char *, const char *)); /* X3.159-1989 4.11.5.7 */ |
| 42 | #endif |
| 43 | |
| 44 | #ifndef strtok |
| 45 | extern char *strtok PARAMS ((char *, const char *)); /* X3.159-1989 4.11.5.8 */ |
| 46 | #endif |
| 47 | |
| 48 | # ifdef HAVE_MEMORY_H |
| 49 | # include <memory.h> |
| 50 | # else |
| 51 | extern void *memset(); |
| 52 | extern void *memcpy(); |
| 53 | extern void *memmove(); |
| 54 | extern int memcmp(); |
| 55 | # endif |
| 56 | #endif /* STDC_HEADERS */ |
| 57 | |
| 58 | #ifdef NEED_DECLARATION_STRERROR |
| 59 | #ifndef strerror |
| 60 | extern char *strerror PARAMS ((int)); /* X3.159-1989 4.11.6.2 */ |
| 61 | #endif |
| 62 | #endif |
| 63 | |
| 64 | #ifndef strdup |
| 65 | extern char *strdup (); /* full prototype collides w/ some OSes (AIX 3.2.5) */ |
| 66 | #endif |
| 67 | |
| 68 | #endif /* !defined(GDB_STRING_H) */ |