diff --git a/nsprpub/configure b/nsprpub/configure index 9a74f99a357d..3ea8213806d5 100755 --- a/nsprpub/configure +++ b/nsprpub/configure @@ -3810,19 +3810,7 @@ EOF EOF cat >> confdefs.h <<\EOF -#define _POSIX_SOURCE 1 -EOF - - cat >> confdefs.h <<\EOF -#define _BSD_SOURCE 1 -EOF - - cat >> confdefs.h <<\EOF -#define _SVID_SOURCE 1 -EOF - - cat >> confdefs.h <<\EOF -#define _LARGEFILE64_SOURCE 1 +#define _GNU_SOURCE 1 EOF cat >> confdefs.h <<\EOF @@ -3837,8 +3825,8 @@ EOF ;; esac - CFLAGS="$CFLAGS -ansi -Wall" - CXXFLAGS="$CXXFLAGS -ansi -Wall" + CFLAGS="$CFLAGS -Wall" + CXXFLAGS="$CXXFLAGS -Wall" MDCPUCFG_H=_linux.cfg PR_MD_CSRCS=linux.c MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@' @@ -4416,17 +4404,17 @@ EOF _OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Olimit 4000" ac_safe=`echo "machine/builtins.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for machine/builtins.h""... $ac_c" 1>&6 -echo "configure:4420: checking for machine/builtins.h" >&5 +echo "configure:4408: checking for machine/builtins.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4430: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4418: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4988,7 +4976,7 @@ case $target in ;; *) echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:4992: checking for dlopen in -ldl" >&5 +echo "configure:4980: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4996,7 +4984,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5024,17 +5012,17 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6 -echo "configure:5028: checking for dlfcn.h" >&5 +echo "configure:5016: checking for dlfcn.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5038: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5026: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5067,13 +5055,13 @@ esac if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 -echo "configure:5071: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:5059: checking whether ${CC-cc} needs -traditional" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_pattern="Autoconf.*'x'" cat > conftest.$ac_ext < Autoconf TIOCGETP @@ -5091,7 +5079,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < Autoconf TCGETA @@ -5115,12 +5103,12 @@ fi for ac_func in lchown strerror do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5119: checking for $ac_func" >&5 +echo "configure:5107: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5184,7 +5172,7 @@ hpux*) if test -z "$GNU_CC"; then echo $ac_n "checking for +Olit support""... $ac_c" 1>&6 -echo "configure:5188: checking for +Olit support" >&5 +echo "configure:5176: checking for +Olit support" >&5 if eval "test \"`echo '$''{'ac_cv_hpux_usable_olit_option'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5223,7 +5211,7 @@ darwin*) *) echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 -echo "configure:5227: checking for pthread_create in -lpthreads" >&5 +echo "configure:5215: checking for pthread_create in -lpthreads" >&5 echo " #include void *foo(void *v) { return v; } @@ -5245,7 +5233,7 @@ echo " echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:5249: checking for pthread_create in -lpthread" >&5 +echo "configure:5237: checking for pthread_create in -lpthread" >&5 echo " #include void *foo(void *v) { return v; } @@ -5267,7 +5255,7 @@ echo " echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 -echo "configure:5271: checking for pthread_create in -lc_r" >&5 +echo "configure:5259: checking for pthread_create in -lc_r" >&5 echo " #include void *foo(void *v) { return v; } @@ -5289,7 +5277,7 @@ echo " echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6 -echo "configure:5293: checking for pthread_create in -lc" >&5 +echo "configure:5281: checking for pthread_create in -lc" >&5 echo " #include void *foo(void *v) { return v; } @@ -5443,7 +5431,7 @@ if test -n "$USE_PTHREADS"; then rm -f conftest* ac_cv_have_dash_pthread=no echo $ac_n "checking whether ${CC-cc} accepts -pthread""... $ac_c" 1>&6 -echo "configure:5447: checking whether ${CC-cc} accepts -pthread" >&5 +echo "configure:5435: checking whether ${CC-cc} accepts -pthread" >&5 echo 'int main() { return 0; }' | cat > conftest.c ${CC-cc} -pthread -o conftest conftest.c > conftest.out 2>&1 if test $? -eq 0; then @@ -5466,7 +5454,7 @@ echo "configure:5447: checking whether ${CC-cc} accepts -pthread" >&5 ac_cv_have_dash_pthreads=no if test "$ac_cv_have_dash_pthread" = "no"; then echo $ac_n "checking whether ${CC-cc} accepts -pthreads""... $ac_c" 1>&6 -echo "configure:5470: checking whether ${CC-cc} accepts -pthreads" >&5 +echo "configure:5458: checking whether ${CC-cc} accepts -pthreads" >&5 echo 'int main() { return 0; }' | cat > conftest.c ${CC-cc} -pthreads -o conftest conftest.c > conftest.out 2>&1 if test $? -eq 0; then diff --git a/nsprpub/configure.in b/nsprpub/configure.in index c8657a4a60e2..e4276ef47e54 100644 --- a/nsprpub/configure.in +++ b/nsprpub/configure.in @@ -1342,18 +1342,15 @@ tools are selected during the Xcode/Developer Tools installation.]) IMPL_STRATEGY=_PTH fi AC_DEFINE(XP_UNIX) - AC_DEFINE(_POSIX_SOURCE) - AC_DEFINE(_BSD_SOURCE) - AC_DEFINE(_SVID_SOURCE) - AC_DEFINE(_LARGEFILE64_SOURCE) + AC_DEFINE(_GNU_SOURCE) AC_DEFINE(HAVE_FCNTL_FILE_LOCKING) case "${target_os}" in linux*) AC_DEFINE(LINUX) ;; esac - CFLAGS="$CFLAGS -ansi -Wall" - CXXFLAGS="$CXXFLAGS -ansi -Wall" + CFLAGS="$CFLAGS -Wall" + CXXFLAGS="$CXXFLAGS -Wall" MDCPUCFG_H=_linux.cfg PR_MD_CSRCS=linux.c MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@' diff --git a/nsprpub/pr/src/linking/Makefile.in b/nsprpub/pr/src/linking/Makefile.in index b6c3125c35a0..9b82aca205df 100644 --- a/nsprpub/pr/src/linking/Makefile.in +++ b/nsprpub/pr/src/linking/Makefile.in @@ -62,11 +62,6 @@ TARGETS = $(OBJS) INCLUDES = -I$(dist_includedir) -I$(topsrcdir)/pr/include -I$(topsrcdir)/pr/include/private -# For Dl_info and dladdr. -ifeq (,$(filter-out Linux GNU GNU_%,$(OS_TARGET))) -DEFINES += -D_GNU_SOURCE -endif - # On Mac OS X use flat #includes. ifeq ($(OS_TARGET),MacOSX) INCLUDES += -I$(MACOS_SDK_DIR)/Developer/Headers/FlatCarbon diff --git a/nsprpub/pr/src/pthreads/Makefile.in b/nsprpub/pr/src/pthreads/Makefile.in index ddda70916afc..006a3e8cbcce 100644 --- a/nsprpub/pr/src/pthreads/Makefile.in +++ b/nsprpub/pr/src/pthreads/Makefile.in @@ -67,11 +67,6 @@ INCLUDES = -I$(dist_includedir) -I$(topsrcdir)/pr/include -I$(topsrcdir)/pr/incl DEFINES += -D_NSPR_BUILD_ -ifeq ($(OS_ARCH),Linux) -# for pthread_mutexattr_settype -DEFINES += -D_XOPEN_SOURCE=500 -endif - include $(topsrcdir)/config/rules.mk export:: $(TARGETS)