From cb62073c4a4b514f2144d73f8197d9dff357cece Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Sun, 23 Feb 2014 12:38:36 -0800 Subject: [PATCH] configure: Include _BSD_SOURCE in standards related defines. Else, GNU libc does not define strcasecmp() even though it conforms to POSIX.1-2001. --- configure.ac | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/configure.ac b/configure.ac index 5cae366..a5226d2 100644 --- a/configure.ac +++ b/configure.ac @@ -101,6 +101,11 @@ if test "x$enable_standards" = "xyes"; then AC_DEFINE([_THREAD_SAFE], 1, [Define to enable reentrant interfaces.]) + dnl GNU libc defines strcasecmp() only when using _BSD_SOURCE even though + dnl the function is conforming to POSIX.1-2001 as well. Let's weaken + dnl strict standards compliance a bit to work around this. + AC_DEFINE([_BSD_SOURCE], 1, [Define to enable 4.3BSD support.]) + for flag in -std=c99 -pedantic; do AC_MSG_CHECKING([whether $CC accepts $flag]) -- 2.30.2