mirror of https://github.com/OpenTTD/OpenTTD
(svn r19853) -Fix [FS#3840]: revert r19781 and apply a more sensible version with the same effect
parent
354645cd0a
commit
2de9e2d16b
|
@ -27,6 +27,10 @@
|
||||||
# include <dlfcn.h>
|
# include <dlfcn.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__NetBSD__)
|
||||||
|
#include <unistd.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Unix implementation for the crash logger.
|
* Unix implementation for the crash logger.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -24,9 +24,6 @@
|
||||||
#elif defined(__NDS__)
|
#elif defined(__NDS__)
|
||||||
#include <nds/jtypes.h>
|
#include <nds/jtypes.h>
|
||||||
#define TROUBLED_INTS
|
#define TROUBLED_INTS
|
||||||
#elif defined(__NetBSD__)
|
|
||||||
#include <unistd.h>
|
|
||||||
#define _GNU_SOURCE
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* It seems that we need to include stdint.h before anything else
|
/* It seems that we need to include stdint.h before anything else
|
||||||
|
|
|
@ -246,13 +246,18 @@ static inline bool IsWhitespace(WChar c)
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef _GNU_SOURCE
|
/* Needed for NetBSD version (so feature) testing */
|
||||||
|
#ifdef __NetBSD__
|
||||||
|
#include <sys/param.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined(_GNU_SOURCE) && !(defined(__NetBSD_Version__) && 400000000 < __NetBSD_Version__ )
|
||||||
/* strndup is a GNU extension */
|
/* strndup is a GNU extension */
|
||||||
char *strndup(const char *s, size_t len);
|
char *strndup(const char *s, size_t len);
|
||||||
#endif /* !_GNU_SOURCE */
|
#endif /* !_GNU_SOURCE */
|
||||||
|
|
||||||
/* strcasestr is available for _GNU_SOURCE, BSD and some Apple */
|
/* 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)))
|
#if defined(_GNU_SOURCE) || (defined(__BSD_VISIBLE) && __BSD_VISIBLE) || (defined(__APPLE__) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))) || _NETBSD_SOURCE
|
||||||
# undef DEFINE_STRCASESTR
|
# undef DEFINE_STRCASESTR
|
||||||
#else
|
#else
|
||||||
# define DEFINE_STRCASESTR
|
# define DEFINE_STRCASESTR
|
||||||
|
|
Loading…
Reference in New Issue