diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2014-01-07 17:09:47 +0400 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2014-01-07 17:09:47 +0400 |
commit | 432fbd7a1a71ab5a91a8cfab57fad74fda9389bb (patch) | |
tree | e844afd8300ad200cbc2c29fc2a5f049542fe3a3 /include/platform.h | |
parent | 57434022cefde87133b8ad39fb3b79c1274e7684 (diff) |
platform.h: undef HAVE_STRCHRNUL only on correct versions of FreeBSD
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'include/platform.h')
-rw-r--r-- | include/platform.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/include/platform.h b/include/platform.h index cfc802907..2899a9093 100644 --- a/include/platform.h +++ b/include/platform.h @@ -385,10 +385,6 @@ typedef unsigned smalluint; # undef HAVE_STRVERSCMP #endif -#if defined(__dietlibc__) -# undef HAVE_STRCHRNUL -#endif - #if defined(__WATCOMC__) # undef HAVE_DPRINTF # undef HAVE_GETLINE @@ -434,10 +430,21 @@ typedef unsigned smalluint; # undef HAVE_UNLOCKED_LINE_OPS #endif -#if defined(__FreeBSD__) || defined(__APPLE__) +#if defined(__dietlibc__) # undef HAVE_STRCHRNUL #endif +#if defined(__APPLE__) +# undef HAVE_STRCHRNUL +#endif + +#if defined(__FreeBSD__) +# include <sys/param.h> +# if __FreeBSD_version < 1000029 +# undef HAVE_STRCHRNUL +# endif +#endif + #if defined(__NetBSD__) # define HAVE_GETLINE 1 /* Recent NetBSD versions have getline() */ #endif |