From: Michael Forney Date: Thu, 3 Oct 2013 09:36:05 +0000 (-0700) Subject: build-sys: Use _POSIX_VERSION to determine support for %m X-Git-Tag: v2.24-rc2~63 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=695e4e1a9862a5d2bc28dd31aa4cfafd4fd0caa4;p=thirdparty%2Futil-linux.git build-sys: Use _POSIX_VERSION to determine support for %m %m is included in POSIX 2008, so we can check if the libc implements that before failing. Signed-off-by: Karel Zak --- diff --git a/configure.ac b/configure.ac index cbcda46c84..95ff8b3d26 100644 --- a/configure.ac +++ b/configure.ac @@ -430,6 +430,7 @@ AC_CACHE_VAL([scanf_cv_alloc_modifier], [AC_COMPILE_IFELSE([AC_LANG_SOURCE([ #include + #include #ifdef __GLIBC__ @@ -437,8 +438,13 @@ AC_CACHE_VAL([scanf_cv_alloc_modifier], #error %m is not available #endif - #else + #elif defined(_POSIX_VERSION) + #if _POSIX_VERSION < 200809L + #error %m is not available + #endif + + #else #error Your C-library is not supported. #endif ])],