summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorleaf%mozilla.org <devnull@localhost>2000-02-27 10:43:31 +0000
committerleaf%mozilla.org <devnull@localhost>2000-02-27 10:43:31 +0000
commitb2bee0ec54cbb17e853eb2dd5ae1cce2ac170efb (patch)
treeb1bf74cbb393831f03ee3f3e47476fef23705772
parente7959141721d3235114d54d4a2c08ed860e66940 (diff)
downloadnspr-hg-SeaMonkey_M14_BRANCH.tar.gz
Merging changes from the NSPRPUB_RELEASE_4_0_20000223 tag for autoconf,SeaMonkey_M14_no_crypto_RELEASESeaMonkey_M14_BRANCH
mac fixes.
-rw-r--r--config/autoconf.mk.in1
-rw-r--r--config/rules.mk2
-rwxr-xr-xconfigure213
-rw-r--r--configure.in9
-rw-r--r--pr/src/md/mac/macsockotpt.c26
-rw-r--r--pr/src/misc/prnetdb.c8
-rw-r--r--pr/tests/Makefile.in9
-rw-r--r--pr/tests/macbuild/NSPR20TestApp.mcpbin93392 -> 97544 bytes
8 files changed, 186 insertions, 82 deletions
diff --git a/config/autoconf.mk.in b/config/autoconf.mk.in
index 3c7e77a3..83b7a86f 100644
--- a/config/autoconf.mk.in
+++ b/config/autoconf.mk.in
@@ -26,6 +26,7 @@ CC = @CC@
CCC = @CXX@
AR = @AR@
AR_FLAGS = @AR_FLAGS@
+LD = @LD@
RANLIB = @RANLIB@
PERL = @PERL@
DLLTOOL = @DLLTOOL@
diff --git a/config/rules.mk b/config/rules.mk
index 476ea0ea..b885c33e 100644
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -62,14 +62,12 @@ endif
ifdef USE_AUTOCONF
ifdef INTERNAL_TOOLS
-ifdef CROSS_COMPILE
CC=$(HOST_CC)
CCC=$(HOST_CXX)
CFLAGS=$(HOST_CFLAGS)
CXXFLAGS=$(HOST_CXXFLAGS)
endif
endif
-endif
#
# This makefile contains rules for building the following kinds of
diff --git a/configure b/configure
index 0496847f..56a87989 100755
--- a/configure
+++ b/configure
@@ -1490,13 +1490,50 @@ done
test -n "$AS" || AS=":"
fi
+ if test -z "$LD"; then
+ for ac_prog in "${target_alias}-ld" "${target}-ld"
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1500: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$LD"; then
+ ac_cv_prog_LD="$LD" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_LD="$ac_prog"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+LD="$ac_cv_prog_LD"
+if test -n "$LD"; then
+ echo "$ac_t""$LD" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+test -n "$LD" && break
+done
+test -n "$LD" || LD=":"
+
+ fi
if test -z "$DLLTOOL"; then
for ac_prog in "${target_alias}-dlltool" "${target}-dlltool"
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1500: checking for $ac_word" >&5
+echo "configure:1537: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1533,7 +1570,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1537: checking for $ac_word" >&5
+echo "configure:1574: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1568,7 +1605,7 @@ else
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1572: checking for $ac_word" >&5
+echo "configure:1609: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1598,7 +1635,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1602: checking for $ac_word" >&5
+echo "configure:1639: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1649,7 +1686,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1653: checking for $ac_word" >&5
+echo "configure:1690: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1681,7 +1718,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1685: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1722: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -1692,12 +1729,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 1696 "configure"
+#line 1733 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:1701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -1723,12 +1760,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1727: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1764: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1732: checking whether we are using GNU C" >&5
+echo "configure:1769: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1737,7 +1774,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1741: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1778: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -1756,7 +1793,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1760: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1797: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1792,7 +1829,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1796: checking for $ac_word" >&5
+echo "configure:1833: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1824,7 +1861,7 @@ test -n "$CXX" || CXX="gcc"
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1828: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+echo "configure:1865: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -1835,12 +1872,12 @@ cross_compiling=$ac_cv_prog_cxx_cross
cat > conftest.$ac_ext << EOF
-#line 1839 "configure"
+#line 1876 "configure"
#include "confdefs.h"
int main(){return(0);}
EOF
-if { (eval echo configure:1844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cxx_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -1866,12 +1903,12 @@ if test $ac_cv_prog_cxx_works = no; then
{ echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1870: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1907: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
cross_compiling=$ac_cv_prog_cxx_cross
echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
-echo "configure:1875: checking whether we are using GNU C++" >&5
+echo "configure:1912: checking whether we are using GNU C++" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1880,7 +1917,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1884: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1921: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gxx=yes
else
ac_cv_prog_gxx=no
@@ -1899,7 +1936,7 @@ ac_test_CXXFLAGS="${CXXFLAGS+set}"
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS=
echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
-echo "configure:1903: checking whether ${CXX-g++} accepts -g" >&5
+echo "configure:1940: checking whether ${CXX-g++} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1933,7 +1970,7 @@ fi
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1937: checking for $ac_word" >&5
+echo "configure:1974: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1965,7 +2002,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1969: checking for $ac_word" >&5
+echo "configure:2006: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_AS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2006,7 +2043,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2010: checking for $ac_word" >&5
+echo "configure:2047: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2042,12 +2079,53 @@ test -n "$AR" && break
done
test -n "$AR" || AR=":"
+ for ac_prog in ld
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2088: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$LD" in
+ /*)
+ ac_cv_path_LD="$LD" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_LD="$LD" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_LD="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ ;;
+esac
+fi
+LD="$ac_cv_path_LD"
+if test -n "$LD"; then
+ echo "$ac_t""$LD" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+test -n "$LD" && break
+done
+test -n "$LD" || LD=":"
+
for ac_prog in dlltool
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2051: checking for $ac_word" >&5
+echo "configure:2129: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_DLLTOOL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2088,7 +2166,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2092: checking for $ac_word" >&5
+echo "configure:2170: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_WINDRES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2152,7 +2230,7 @@ rm -f a.out
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:2156: checking for a BSD compatible install" >&5
+echo "configure:2234: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2205,7 +2283,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:2209: checking whether ln -s works" >&5
+echo "configure:2287: checking whether ln -s works" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2230,7 +2308,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2234: checking for $ac_word" >&5
+echo "configure:2312: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2284,6 +2362,9 @@ OS_TEST=`uname -m`
case "$host" in
*-mingw*)
;;
+*-beos*)
+ HOST_CFLAGS="$HOST_CFLAGS -DXP_BEOS -DBeOS -DBEOS -D_POSIX_SOURCE"
+ ;;
*)
HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX"
;;
@@ -2826,6 +2907,10 @@ EOF
#define XP_PC 1
EOF
+ cat >> confdefs.h <<\EOF
+#define NONAMELESSUNION 1
+EOF
+
PR_MD_ARCH_DIR=windows
if test -z "$GNU_CC"; then
OBJ_SUFFIX=obj
@@ -3028,7 +3113,7 @@ fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:3032: checking how to run the C preprocessor" >&5
+echo "configure:3117: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -3043,13 +3128,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 3047 "configure"
+#line 3132 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3138: \"$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
:
@@ -3060,13 +3145,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 3064 "configure"
+#line 3149 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3070: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3155: \"$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
:
@@ -3077,13 +3162,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 3081 "configure"
+#line 3166 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3087: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3172: \"$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
:
@@ -3109,13 +3194,13 @@ echo "$ac_t""$CPP" 1>&6
if test $ac_cv_prog_gcc = yes; then
echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
-echo "configure:3113: checking whether ${CC-cc} needs -traditional" >&5
+echo "configure:3198: 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 <<EOF
-#line 3119 "configure"
+#line 3204 "configure"
#include "confdefs.h"
#include <sgtty.h>
Autoconf TIOCGETP
@@ -3133,7 +3218,7 @@ rm -f conftest*
if test $ac_cv_prog_gcc_traditional = no; then
cat > conftest.$ac_ext <<EOF
-#line 3137 "configure"
+#line 3222 "configure"
#include "confdefs.h"
#include <termio.h>
Autoconf TCGETA
@@ -3157,12 +3242,12 @@ fi
for ac_func in lchown strerror
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3161: checking for $ac_func" >&5
+echo "configure:3246: 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 <<EOF
-#line 3166 "configure"
+#line 3251 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3185,7 +3270,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3274: \"$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
@@ -3213,7 +3298,7 @@ done
echo $ac_n "checking for pthread_attr_init in -lpthread""... $ac_c" 1>&6
-echo "configure:3217: checking for pthread_attr_init in -lpthread" >&5
+echo "configure:3302: checking for pthread_attr_init in -lpthread" >&5
ac_lib_var=`echo pthread'_'pthread_attr_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3221,7 +3306,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpthread $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3225 "configure"
+#line 3310 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3232,7 +3317,7 @@ int main() {
pthread_attr_init()
; return 0; }
EOF
-if { (eval echo configure:3236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3321: \"$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
@@ -3251,7 +3336,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_attr_init in -lc_r""... $ac_c" 1>&6
-echo "configure:3255: checking for pthread_attr_init in -lc_r" >&5
+echo "configure:3340: checking for pthread_attr_init in -lc_r" >&5
ac_lib_var=`echo c_r'_'pthread_attr_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3259,7 +3344,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lc_r $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3263 "configure"
+#line 3348 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3270,7 +3355,7 @@ int main() {
pthread_attr_init()
; return 0; }
EOF
-if { (eval echo configure:3274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3359: \"$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
@@ -3289,7 +3374,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_attr_init in -lc""... $ac_c" 1>&6
-echo "configure:3293: checking for pthread_attr_init in -lc" >&5
+echo "configure:3378: checking for pthread_attr_init in -lc" >&5
ac_lib_var=`echo c'_'pthread_attr_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3297,7 +3382,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lc $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3301 "configure"
+#line 3386 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3308,7 +3393,7 @@ int main() {
pthread_attr_init()
; return 0; }
EOF
-if { (eval echo configure:3312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3397: \"$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
@@ -3435,7 +3520,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:3439: checking whether ${CC-cc} accepts -pthread" >&5
+echo "configure:3524: 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
@@ -3505,12 +3590,12 @@ EOF
esac
echo $ac_n "checking for pthread_create""... $ac_c" 1>&6
-echo "configure:3509: checking for pthread_create" >&5
+echo "configure:3594: checking for pthread_create" >&5
if eval "test \"`echo '$''{'ac_cv_func_pthread_create'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3514 "configure"
+#line 3599 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char pthread_create(); below. */
@@ -3533,7 +3618,7 @@ pthread_create();
; return 0; }
EOF
-if { (eval echo configure:3537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_pthread_create=yes"
else
@@ -3552,7 +3637,7 @@ else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
-echo "configure:3556: checking for pthread_create in -lpthread" >&5
+echo "configure:3641: checking for pthread_create in -lpthread" >&5
ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3560,7 +3645,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpthread $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3564 "configure"
+#line 3649 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3571,7 +3656,7 @@ int main() {
pthread_create()
; return 0; }
EOF
-if { (eval echo configure:3575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3660: \"$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
@@ -3670,12 +3755,12 @@ EOF
esac
echo $ac_n "checking for dlopen""... $ac_c" 1>&6
-echo "configure:3674: checking for dlopen" >&5
+echo "configure:3759: checking for dlopen" >&5
if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3679 "configure"
+#line 3764 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char dlopen(); below. */
@@ -3698,7 +3783,7 @@ dlopen();
; return 0; }
EOF
-if { (eval echo configure:3702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_dlopen=yes"
else
@@ -3717,7 +3802,7 @@ else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:3721: checking for dlopen in -ldl" >&5
+echo "configure:3806: 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
@@ -3725,7 +3810,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3729 "configure"
+#line 3814 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3736,7 +3821,7 @@ int main() {
dlopen()
; return 0; }
EOF
-if { (eval echo configure:3740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3825: \"$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
@@ -3830,6 +3915,7 @@ fi
+
trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
@@ -4040,6 +4126,7 @@ s%@CXX@%$CXX%g
s%@RANLIB@%$RANLIB%g
s%@AR@%$AR%g
s%@AS@%$AS%g
+s%@LD@%$LD%g
s%@DLLTOOL@%$DLLTOOL%g
s%@WINDRES@%$WINDRES%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
diff --git a/configure.in b/configure.in
index 1f2db5d4..aa7fa6a0 100644
--- a/configure.in
+++ b/configure.in
@@ -195,6 +195,9 @@ if test "$target" != "$host"; then
if test -z "$AS"; then
AC_CHECK_PROGS(AS, "${target_alias}-as" "${target}-as", :)
fi
+ if test -z "$LD"; then
+ AC_CHECK_PROGS(LD, "${target_alias}-ld" "${target}-ld", :)
+ fi
if test -z "$DLLTOOL"; then
AC_CHECK_PROGS(DLLTOOL, "${target_alias}-dlltool" "${target}-dlltool", :)
fi
@@ -207,6 +210,7 @@ else
AC_PROG_RANLIB
AC_PATH_PROGS(AS, as, $CC)
AC_PATH_PROGS(AR, ar, :)
+ AC_PATH_PROGS(LD, ld, :)
AC_PATH_PROGS(DLLTOOL, dlltool, :)
AC_PATH_PROGS(WINDRES, windres, :)
if test -z "$HOST_CC"; then
@@ -255,6 +259,9 @@ dnl ========================================================
case "$host" in
*-mingw*)
;;
+*-beos*)
+ HOST_CFLAGS="$HOST_CFLAGS -DXP_BEOS -DBeOS -DBEOS -D_POSIX_SOURCE"
+ ;;
*)
HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX"
;;
@@ -584,6 +591,7 @@ case "$target" in
*-mingw*)
AC_DEFINE(XP_PC)
+ AC_DEFINE(NONAMELESSUNION)
PR_MD_ARCH_DIR=windows
if test -z "$GNU_CC"; then
OBJ_SUFFIX=obj
@@ -1052,6 +1060,7 @@ AC_SUBST(AR)
AC_SUBST(AR_FLAGS)
AC_SUBST(AS)
AC_SUBST(ASFLAGS)
+AC_SUBST(LD)
AC_SUBST(DLLTOOL)
AC_SUBST(WINDRES)
AC_SUBST(RANLIB)
diff --git a/pr/src/md/mac/macsockotpt.c b/pr/src/md/mac/macsockotpt.c
index 31a123cd..7b6e4441 100644
--- a/pr/src/md/mac/macsockotpt.c
+++ b/pr/src/md/mac/macsockotpt.c
@@ -614,6 +614,7 @@ PRInt32 _MD_listen(PRFileDesc *fd, PRIntn backlog)
goto ErrorExit;
}
+ addr.inet.family = AF_INET;
addr.inet.port = addr.inet.ip = 0;
bindReq.addr.maxlen = PR_NETADDR_SIZE (&addr);
@@ -697,12 +698,6 @@ PRInt32 _MD_getsockname(PRFileDesc *fd, PRNetAddr *addr, PRUint32 *addrlen)
goto ErrorExit;
}
-#if !defined(_PR_INET6)
- addr->inet.family = AF_INET;
-#endif
-
- PR_ASSERT(PR_NETADDR_SIZE(addr) >= (*addrlen));
-
bindReq.addr.len = *addrlen;
bindReq.addr.maxlen = *addrlen;
bindReq.addr.buf = (UInt8*) addr;
@@ -726,6 +721,7 @@ PRInt32 _MD_getsockname(PRFileDesc *fd, PRNetAddr *addr, PRUint32 *addrlen)
if (err != kOTNoError)
goto ErrorExit;
+ *addrlen = PR_NETADDR_SIZE(addr);
return kOTNoError;
ErrorExit:
@@ -1157,9 +1153,15 @@ PRInt32 _MD_accept(PRFileDesc *fd, PRNetAddr *addr, PRUint32 *addrlen, PRInterva
memset(&call, 0 , sizeof(call));
- call.addr.maxlen = PR_NETADDR_SIZE(&callAddr);
- call.addr.len = PR_NETADDR_SIZE(&callAddr);
- call.addr.buf = (UInt8*) &callAddr;
+ if (addr != NULL) {
+ call.addr.maxlen = *addrlen;
+ call.addr.len = *addrlen;
+ call.addr.buf = (UInt8*) addr;
+ } else {
+ call.addr.maxlen = sizeof(callAddr);
+ call.addr.len = sizeof(callAddr);
+ call.addr.buf = (UInt8*) &callAddr;
+ }
do {
PrepareForAsyncCompletion(me, fd->secret->md.osfd);
@@ -1199,6 +1201,7 @@ PRInt32 _MD_accept(PRFileDesc *fd, PRNetAddr *addr, PRUint32 *addrlen, PRInterva
PR_ASSERT(err == kOTNoError);
// Bind to a local port; let the system assign it.
+ bindAddr.inet.family = AF_INET;
bindAddr.inet.port = bindAddr.inet.ip = 0;
bindReq.addr.maxlen = PR_NETADDR_SIZE (&bindAddr);
@@ -1229,8 +1232,6 @@ PRInt32 _MD_accept(PRFileDesc *fd, PRNetAddr *addr, PRUint32 *addrlen, PRInterva
if (err != kOTNoError)
goto ErrorExit;
- if (addr != NULL)
- *addr = callAddr;
if (addrlen != NULL)
*addrlen = call.addr.len;
@@ -1270,6 +1271,7 @@ PRInt32 _MD_connect(PRFileDesc *fd, PRNetAddr *addr, PRUint32 addrlen, PRInterva
// Bind to a local port; let the system assign it.
+ bindAddr.inet.family = AF_INET;
bindAddr.inet.port = bindAddr.inet.ip = 0;
bindReq.addr.maxlen = PR_NETADDR_SIZE (&bindAddr);
@@ -1814,7 +1816,7 @@ _MD_getpeername(PRFileDesc *fd, PRNetAddr *addr, PRUint32 *addrlen)
TBind peerAddr;
OSErr err;
- if (*addrlen < PR_NETADDR_SIZE(addr)) {
+ if (*addrlen < sizeof(InetAddress)) {
err = (OSErr) kEINVALErr;
goto ErrorExit;
diff --git a/pr/src/misc/prnetdb.c b/pr/src/misc/prnetdb.c
index a8aa7d10..f31374b3 100644
--- a/pr/src/misc/prnetdb.c
+++ b/pr/src/misc/prnetdb.c
@@ -114,15 +114,15 @@ PR_EXTERN(PRBool) _pr_ipv6_is_present;
((a)->pr_s6_addr[14] == 0) && \
((a)->pr_s6_addr[15] == 0x1U))
-const PRIPv6Addr _pr_in6addr_any = { 0, 0, 0, 0,
+const PRIPv6Addr _pr_in6addr_any = {{{ 0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
- 0, 0, 0, 0 };
+ 0, 0, 0, 0 }}};
-const PRIPv6Addr _pr_in6addr_loopback = { 0, 0, 0, 0,
+const PRIPv6Addr _pr_in6addr_loopback = {{{ 0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
- 0, 0, 0, 0x1U };
+ 0, 0, 0, 0x1U }}};
/*
* The values at bytes 10 and 11 are compared using pointers to
* 8-bit fields, and not 32-bit fields, to make the comparison work on
diff --git a/pr/tests/Makefile.in b/pr/tests/Makefile.in
index 720dc68a..30dad6d7 100644
--- a/pr/tests/Makefile.in
+++ b/pr/tests/Makefile.in
@@ -443,7 +443,11 @@ endif # !USE_AUTOCONF
include $(topsrcdir)/config/rules.mk
-ifndef USE_AUTOCONF
+ifdef USE_AUTOCONF
+$(OBJDIR)/%$(PROG_SUFFIX): %.c
+ $(CC) $< -o $@ $(CFLAGS) $(LDOPTS) $(LIBPLC) $(LIBPR) $(OS_LIBS)
+
+else
AIX_PRE_4_2 = 0
ifeq ($(OS_ARCH),AIX)
ifeq ($(OS_RELEASE),4.1)
@@ -512,6 +516,7 @@ install:: export
clean::
rm -f $(TARGETS)
+ifndef USE_AUTOCONF
# The prpoll test calls BSD socket functions, so it needs to link
# with -lsocket on some platforms.
ifeq ($(OS_ARCH),SunOS)
@@ -534,6 +539,8 @@ $(OBJDIR)/testfile: $(OBJDIR)/testfile.o
$(PURE) $(CC) $(XCFLAGS) $< $(LDOPTS) $(LIBPLC) $(LIBPR) $(LIBPTHREAD) $(EXTRA_LIBS) -o $@
endif
+endif # !USE_AUTOCONF
+
#
# Run the test programs with no arguments
#
diff --git a/pr/tests/macbuild/NSPR20TestApp.mcp b/pr/tests/macbuild/NSPR20TestApp.mcp
index 27092055..aad1a297 100644
--- a/pr/tests/macbuild/NSPR20TestApp.mcp
+++ b/pr/tests/macbuild/NSPR20TestApp.mcp
Binary files differ