On Sat, Apr 30, 2011 at 01:54:57PM -0400, Brad wrote: > On 30/04/11 1:03 PM, Diogo Franco wrote: >> FreeBSD, unlike (whatever OS the default -D are trying to fix), >> defines every symbol by default; conformance defines are supposed to >> restrict FreeBSD's definitions to only the requested specification. >> >> Fix this by defining conformance flags only when we are not building >> against FreeBSD's libc. >> --- >> configure | 5 ++++- >> 1 files changed, 4 insertions(+), 1 deletions(-) >> >> diff --git a/configure b/configure >> index 2b5aeab..0d39f07 100755 >> --- a/configure >> +++ b/configure >> @@ -2310,7 +2310,6 @@ if test "$?" != 0; then >> die "C compiler test failed." >> fi >> >> -add_cppflags -D_ISOC99_SOURCE -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> >> @@ -2376,9 +2375,11 @@ case $target_os in >> dragonfly) >> enable malloc_aligned >> disable symver >> + fbsd_libc=1 >> ;; >> freebsd) >> enable malloc_aligned >> + fbsd_libc=1 >> ;; >> bsd/os) >> add_extralibs -lpoll -lgnugetopt >> @@ -2499,6 +2500,8 @@ case $target_os in >> ;; >> esac >> >> +test -z "$fbsd_libc"&& add_cppflags -D_ISOC99_SOURCE >> -D_POSIX_C_SOURCE=200112 >> + >> echo >> "config:$arch:$subarch:$cpu:$target_os:$cc_ident:$LIBAV_CONFIGURATION">config.fate >> >> check_cpp_condition stdlib.h "defined(__PIC__) || defined(__pic__) || >> defined(PIC)"&& enable pic > > This isn't specific to just FreeBSD but all BSD and derived OS's. .e.g. > FreeBSD, OpenBSD, NetBSD, DragonFly and OS X. Also _ISOC99_SOURCE isn't > an issue, just defining _POSIX_C_SOURCE. Then the hacks in > libavdevice/bktr.c and libavutil/ppc/cpu.c can be removed and > the -D_XOPEN_SOURCE=600 for NetBSD which didn't actually fix > anything at the time it was added.
What about the -D__EXTENSIONS__ employed by Solaris? Diego _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
