Rename strcasestr to nongnu_strcasestr, macro strcasestr ifndef _GNU_SOURCE
Fix for GCC C++ compiler, which always defines _GNU_SOURCE.
This commit is contained in:
parent
e7e3a97599
commit
38d4524454
2 changed files with 4 additions and 4 deletions
|
|
@ -57,9 +57,9 @@ extern "C" {
|
|||
#define strnicmp(x,y,n) strncasecmp(x,y,n)
|
||||
#endif
|
||||
|
||||
#ifndef __cplusplus
|
||||
char *strcasestr(const char *in, const char *what);
|
||||
#define stristr strcasestr
|
||||
char *nongnu_strcasestr(const char *in, const char *what);
|
||||
#ifndef _GNU_SOURCE
|
||||
#define strcasestr nongnu_strcasestr
|
||||
#endif
|
||||
|
||||
#if defined (PC_DOS) || defined (_WIN32) || defined (__HAIKU__)
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ swapp (char ***ppap, char ***ppbp, char **cpap, char **cpbp)
|
|||
}
|
||||
|
||||
char *
|
||||
strcasestr (const char *s, const char *q)
|
||||
nongnu_strcasestr (const char *s, const char *q)
|
||||
{
|
||||
size_t qn;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue