|
|
|
@ -234,9 +234,16 @@ static inline bool IsWhitespace(WChar c)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#ifndef _GNU_SOURCE
|
|
|
|
|
/* strndup and strcasestr are GNU extensions */
|
|
|
|
|
/* strndup is a GNU extension */
|
|
|
|
|
char *strndup(const char *s, size_t len);
|
|
|
|
|
const char *strcasestr(const char *haystack, const char *needle);
|
|
|
|
|
#endif /* !_GNU_SOURCE */
|
|
|
|
|
|
|
|
|
|
/* strcasestr is available for _GNU_SOURCE, BSD and some Apple */
|
|
|
|
|
#if defined(_GNU_SOURCE) || (defined(__BSD_VISIBLE) && __BSD_VISIBLE) || (defined(__APPLE__) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)))
|
|
|
|
|
# undef DEFINE_STRCASESTR
|
|
|
|
|
#else
|
|
|
|
|
# define DEFINE_STRCASESTR
|
|
|
|
|
const char *strcasestr(const char *haystack, const char *needle);
|
|
|
|
|
#endif /* strcasestr is available */
|
|
|
|
|
|
|
|
|
|
#endif /* STRING_FUNC_H */
|
|
|
|
|