On some platforms the -std=c99 gcc option hides certain functions from system
header files because the option turns on the __STRICT_ANSI__ preprocessor flag.

Unset the flag globally if doing so makes these system functions visible.
---
 configure |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/configure b/configure
index efdd647..5d97a64 100755
--- a/configure
+++ b/configure
@@ -2326,6 +2326,9 @@ fi
 
 add_cppflags -D_ISOC99_SOURCE
 check_cflags -std=c99
+if ! check_func atoll; then
+    check_func atoll -U__STRICT_ANSI__ && add_cppflags -U__STRICT_ANSI__
+fi
 check_cc -D_FILE_OFFSET_BITS=64 <<EOF && add_cppflags -D_FILE_OFFSET_BITS=64
 #include <stdlib.h>
 EOF
@@ -2445,7 +2448,6 @@ case $target_os in
         check_cpp_condition _mingw.h "defined (__MINGW64_VERSION_MAJOR) || 
(__MINGW32_MAJOR_VERSION > 3) \
                                       || (__MINGW32_MAJOR_VERSION == 3 && 
__MINGW32_MINOR_VERSION >= 15)" ||
                 die "ERROR: MinGW runtime version must be >= 3.15."
-        add_cppflags -U__STRICT_ANSI__
         ;;
     cygwin*)
         target_os=cygwin
-- 
1.7.5.1

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to