00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef COMMON_AC_STRING_H
00021 #define COMMON_AC_STRING_H
00022
00023 #include <common/config.h>
00024
00025 #if STDC_HEADERS || HAVE_STRING_H
00026 # include <string.h>
00027
00028 # if !STDC_HEADERS && HAVE_MEMORY_H
00029 # include <memory.h>
00030 # endif
00031 #else
00032
00033 # include <strings.h>
00034 #endif
00035
00036 extern "C" {
00037
00038 #if !HAVE_STRCASECMP
00039 int strcasecmp(const char *, const char *);
00040 #endif
00041
00042 #if !HAVE_STRNCASECMP
00043 int strncasecmp(const char *, const char *, size_t);
00044 #endif
00045
00046 #if !HAVE_DECL_STRSIGNAL
00047 const char *strsignal(int);
00048 #endif
00049
00050 #if !HAVE_STRVERSCMP
00051 int strverscmp(const char *, const char *);
00052 #endif
00053
00054 #if !HAVE_STRLCPY
00055 size_t strlcpy(char *dst, const char *src, size_t size);
00056 #endif
00057 #if !HAVE_STRLCAT
00058 size_t strlcat(char *dst, const char *src, size_t size);
00059 #endif
00060
00061 #if !HAVE_STRENDCPY
00062
00128 char *strendcpy(char *dst, const char *src, const char *end);
00129 #endif
00130
00131 #undef strcat
00132 #define strcat strcat_is_unsafe__use_strendcat_instead@
00133 #undef strcpy
00134 #define strcpy strcpy_is_unsafe__use_strendcpy_instead@
00135
00136 #ifndef HAVE_MEMMEM
00137 void *memmem(const void *, size_t, const void *, size_t);
00138 #endif
00139 void *memmem_replacement(const void *, size_t, const void *, size_t);
00140
00141
00142
00143 #define memmem memmem_replacement
00144
00145 }
00146
00147 #endif // COMMON_AC_STRING_H