Diego Biurrun <[email protected]> writes:

> On some (BSD) systems _POSIX_C_SOURCE masks function definitions in
> system header files.  Avoid the #define in that case.
> This allows eliminating some BSD-specific hacks.
> ---
>  configure        |    4 +++-
>  doc/general.texi |    8 --------
>  2 files changed, 3 insertions(+), 9 deletions(-)
>
> diff --git a/configure b/configure
> index 2b5aeab..1354b79 100755
> --- a/configure
> +++ b/configure
> @@ -2310,7 +2310,9 @@ if test "$?" != 0; then
>      die "C compiler test failed."
>  fi
>  
> -add_cppflags -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112
> +add_cppflags -D_ISOC99_SOURCE
> +check_func_headers time.h nanosleep -D_POSIX_C_SOURCE=200112 &&
> +    add_cppflags -D_POSIX_C_SOURCE=200112
>  check_cflags -std=c99
>  check_cc -D_FILE_OFFSET_BITS=64 <<EOF && add_cppflags -D_FILE_OFFSET_BITS=64
>  #include <stdlib.h>

Note, nanosleep was moved to the Base section in POSIX.1-2008.

-- 
Måns Rullgård
[email protected]
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to