platform.h: undef HAVE_STRCHRNUL only on correct versions of FreeBSD
authorDenys Vlasenko <vda.linux@googlemail.com>
Tue, 7 Jan 2014 13:09:47 +0000 (14:09 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Tue, 7 Jan 2014 13:09:47 +0000 (14:09 +0100)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
include/platform.h

index cfc8029077f30c520a579066e02790439323f7c9..2899a90938dcaec38ee5790241d5786ec08a7806 100644 (file)
@@ -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