Print this page
remove support for non-ANSI compilation


  49 using std::strcoll;
  50 using std::strcpy;
  51 using std::strcspn;
  52 using std::strerror;
  53 using std::strlen;
  54 using std::strncat;
  55 using std::strncmp;
  56 using std::strncpy;
  57 using std::strpbrk;
  58 using std::strrchr;
  59 using std::strspn;
  60 using std::strstr;
  61 using std::strtok;
  62 using std::strxfrm;
  63 #endif
  64 
  65 #ifdef  __cplusplus
  66 extern "C" {
  67 #endif
  68 
  69 #if defined(__STDC__)
  70 
  71 #if defined(__EXTENSIONS__) || \
  72         (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \
  73         defined(_XPG6) || defined(_REENTRANT)
  74 extern int strerror_r(int, char *, size_t);
  75 #endif
  76 
  77 #if defined(__EXTENSIONS__) || \
  78         (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \
  79         (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_REENTRANT)
  80 extern char *strtok_r(char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD,
  81         char **_RESTRICT_KYWD);
  82 #endif
  83 
  84 #if defined(__EXTENSIONS__) || !defined(_STRICT_STDC) || \
  85         defined(__XOPEN_OR_POSIX)
  86 extern void *memccpy(void *_RESTRICT_KYWD, const void *_RESTRICT_KYWD,
  87                 int, size_t);
  88 #endif
  89 
  90 #if !defined(_STRICT_SYMBOLS) || defined(_XPG7)


 174 extern void *__builtin_alloca(size_t);
 175 extern __thread char *__strdupa_str;
 176 extern __thread size_t __strdupa_len;
 177 
 178 #define strdupa(s)                                                      \
 179         (__strdupa_str = (char *)(s),                                   \
 180         strcpy((char *)__builtin_alloca(strlen(__strdupa_str) + 1),     \
 181             __strdupa_str))
 182 
 183 #define strndupa(s, n)                                                  \
 184         (__strdupa_str = (char *)(s),                                   \
 185         __strdupa_len = strnlen(__strdupa_str, (n)),                    \
 186         __strdupa_str = strncpy((char *)__builtin_alloca(__strdupa_len + 1), \
 187             __strdupa_str, __strdupa_len),                              \
 188         __strdupa_str[__strdupa_len] = '\0', __strdupa_str)
 189 #endif  /* unix */
 190 
 191 #endif  /* __GNUC__ */
 192 #endif  /* __EXTENSIONS__ ... */
 193 
 194 #else   /* __STDC__ */
 195 
 196 #if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \
 197         defined(_XPG6) || defined(_REENTRANT)
 198 extern int strerror_r();
 199 #endif
 200 
 201 #if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \
 202         (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_REENTRANT)
 203 extern char *strtok_r();
 204 #endif
 205 
 206 #if defined(__EXTENSIONS__) || !defined(_STRICT_STDC) || \
 207         defined(__XOPEN_OR_POSIX)
 208 extern void *memccpy();
 209 #endif
 210 
 211 #if defined(_XPG7) || !defined(_STRICT_SYMBOLS)
 212 extern int strcasecmp();
 213 extern int strncasecmp();
 214 extern int strcasecmp_l();
 215 extern int strncasecmp_l();
 216 extern char *stpcpy();
 217 extern char *stpncpy();
 218 extern char *strndup();
 219 extern size_t strnlen();
 220 extern char *strsignal();
 221 #endif
 222 
 223 #if !defined(_STRICT_SYMBOLS)
 224 extern int uucopy();
 225 extern int uucopystr();
 226 extern int ffs();
 227 extern int ffsl();
 228 extern int ffsll();
 229 extern int fls();
 230 extern int flsl();
 231 extern int flsll();
 232 extern char *strcasestr();
 233 extern char *strcasestr_l();
 234 extern char *strnstr();
 235 extern size_t strlcpy();
 236 extern size_t strlcat();
 237 extern char *strsep();
 238 extern char *strchrnul();
 239 #endif /* _STRICT_SYMBOLS */
 240 
 241 #if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)
 242 extern char *strdup();
 243 #endif
 244 
 245 #if defined(_XPG7) || !defined(_STRICT_SYMBOLS)
 246 extern size_t strcoll_l();
 247 extern size_t strxfrm_l();
 248 #endif
 249 
 250 #endif  /* __STDC__ */
 251 
 252 #ifdef  __cplusplus
 253 }
 254 #endif
 255 
 256 #endif  /* _STRING_H */


  49 using std::strcoll;
  50 using std::strcpy;
  51 using std::strcspn;
  52 using std::strerror;
  53 using std::strlen;
  54 using std::strncat;
  55 using std::strncmp;
  56 using std::strncpy;
  57 using std::strpbrk;
  58 using std::strrchr;
  59 using std::strspn;
  60 using std::strstr;
  61 using std::strtok;
  62 using std::strxfrm;
  63 #endif
  64 
  65 #ifdef  __cplusplus
  66 extern "C" {
  67 #endif
  68 


  69 #if defined(__EXTENSIONS__) || \
  70         (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \
  71         defined(_XPG6) || defined(_REENTRANT)
  72 extern int strerror_r(int, char *, size_t);
  73 #endif
  74 
  75 #if defined(__EXTENSIONS__) || \
  76         (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \
  77         (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_REENTRANT)
  78 extern char *strtok_r(char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD,
  79         char **_RESTRICT_KYWD);
  80 #endif
  81 
  82 #if defined(__EXTENSIONS__) || !defined(_STRICT_STDC) || \
  83         defined(__XOPEN_OR_POSIX)
  84 extern void *memccpy(void *_RESTRICT_KYWD, const void *_RESTRICT_KYWD,
  85                 int, size_t);
  86 #endif
  87 
  88 #if !defined(_STRICT_SYMBOLS) || defined(_XPG7)


 172 extern void *__builtin_alloca(size_t);
 173 extern __thread char *__strdupa_str;
 174 extern __thread size_t __strdupa_len;
 175 
 176 #define strdupa(s)                                                      \
 177         (__strdupa_str = (char *)(s),                                   \
 178         strcpy((char *)__builtin_alloca(strlen(__strdupa_str) + 1),     \
 179             __strdupa_str))
 180 
 181 #define strndupa(s, n)                                                  \
 182         (__strdupa_str = (char *)(s),                                   \
 183         __strdupa_len = strnlen(__strdupa_str, (n)),                    \
 184         __strdupa_str = strncpy((char *)__builtin_alloca(__strdupa_len + 1), \
 185             __strdupa_str, __strdupa_len),                              \
 186         __strdupa_str[__strdupa_len] = '\0', __strdupa_str)
 187 #endif  /* unix */
 188 
 189 #endif  /* __GNUC__ */
 190 #endif  /* __EXTENSIONS__ ... */
 191 


























































 192 #ifdef  __cplusplus
 193 }
 194 #endif
 195 
 196 #endif  /* _STRING_H */