From 9e735e6c7755f0079371c6dc8cc105d1ac261449 Mon Sep 17 00:00:00 2001 From: "cls%seawood.org" Date: Mon, 15 Mar 2004 06:35:14 +0000 Subject: [PATCH] #215581 r=mark smith OS/2 changes for GCC 3.2.2 git-svn-id: svn://10.0.0.236/trunk@153973 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/directory/c-sdk/configure | 61 +++++++++---------- mozilla/directory/c-sdk/configure.in | 16 ++--- .../directory/c-sdk/ldap/build/genexports.pl | 6 +- .../directory/c-sdk/ldap/include/portable.h | 5 +- 4 files changed, 45 insertions(+), 43 deletions(-) diff --git a/mozilla/directory/c-sdk/configure b/mozilla/directory/c-sdk/configure index 0418608451a..b548903cb20 100755 --- a/mozilla/directory/c-sdk/configure +++ b/mozilla/directory/c-sdk/configure @@ -4362,30 +4362,29 @@ EOF cat >> confdefs.h <<\EOF #define OS2 1 +EOF + + cat >> confdefs.h <<\EOF +#define TCPV40HDRS 1 EOF AR=emxomfar - AR_FLAGS='-p256 r $@' + AR_FLAGS='r $@' LD='$(CC)' - CFLAGS="$CFLAGS -Wall -Zmtd -Zomf" - CXXFLAGS="$CFLAGS -Wall -Zmtd -Zomf" + CFLAGS="$CFLAGS -Wall -Zomf" + CXXFLAGS="$CFLAGS -Wall -Zomf" MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@' DSO_CFLAGS= - DSO_LDOPTS='-Zomf -Zdll -Zmtd' + DSO_LDOPTS='-Zomf -Zdll' _OPTIMIZE_FLAGS=-O3 _DEBUG_FLAGS="-g -fno-inline" if test -n "$MOZ_OPTIMIZE"; then DSO_LDOPTS="$DSO_LDOPTS -Zlinker /EXEPACK:2 -Zlinker /PACKCODE -Zlinker /PACKDATA" fi - OS_LIBS="-lsocket -lemxio" + OS_LIBS="-lsocket" IMPLIB='emximp -o' FILTER='emxexp -o' - if test -z "$EMXOMFLD_LINKER"; then - # using LINK386.EXE - DSO_LDOPTS="$DSO_LDOPTS -Zlinker /NOO" - fi - # GCC for OS/2 currently predefines these, but we don't want them DEFINES="$DEFINES -Uunix -U__unix -U__unix__" @@ -4458,17 +4457,17 @@ EOF ac_safe=`echo "machine/builtins.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for machine/builtins.h""... $ac_c" 1>&6 -echo "configure:4462: checking for machine/builtins.h" >&5 +echo "configure:4461: 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:4472: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4471: \"$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* @@ -4866,12 +4865,12 @@ esac if test -z "$SKIP_LIBRARY_CHECKS"; then echo $ac_n "checking for dlopen""... $ac_c" 1>&6 -echo "configure:4870: checking for dlopen" >&5 +echo "configure:4869: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4897: \"$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 @@ -4913,7 +4912,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:4917: checking for dlopen in -ldl" >&5 +echo "configure:4916: 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 @@ -4921,7 +4920,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:4935: \"$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 @@ -4960,13 +4959,13 @@ fi if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 -echo "configure:4964: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:4963: 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 @@ -4984,7 +4983,7 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < Autoconf TCGETA @@ -5008,12 +5007,12 @@ fi for ac_func in lchown strerror do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5012: checking for $ac_func" >&5 +echo "configure:5011: 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:5039: \"$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 @@ -5074,7 +5073,7 @@ fi echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 -echo "configure:5078: checking for pthread_create in -lpthreads" >&5 +echo "configure:5077: checking for pthread_create in -lpthreads" >&5 echo " #include void *foo(void *v) { int a = 1; } @@ -5096,7 +5095,7 @@ echo " echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:5100: checking for pthread_create in -lpthread" >&5 +echo "configure:5099: checking for pthread_create in -lpthread" >&5 echo " #include void *foo(void *v) { int a = 1; } @@ -5118,7 +5117,7 @@ echo " echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 -echo "configure:5122: checking for pthread_create in -lc_r" >&5 +echo "configure:5121: checking for pthread_create in -lc_r" >&5 echo " #include void *foo(void *v) { int a = 1; } @@ -5140,7 +5139,7 @@ echo " echo "$ac_t""no" 1>&6 echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6 -echo "configure:5144: checking for pthread_create in -lc" >&5 +echo "configure:5143: checking for pthread_create in -lc" >&5 echo " #include void *foo(void *v) { int a = 1; } @@ -5290,7 +5289,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:5294: checking whether ${CC-cc} accepts -pthread" >&5 +echo "configure:5293: 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 @@ -5306,7 +5305,7 @@ echo "configure:5294: 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:5310: checking whether ${CC-cc} accepts -pthreads" >&5 +echo "configure:5309: 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/mozilla/directory/c-sdk/configure.in b/mozilla/directory/c-sdk/configure.in index 4575a11e108..eb311e23cbe 100644 --- a/mozilla/directory/c-sdk/configure.in +++ b/mozilla/directory/c-sdk/configure.in @@ -1506,28 +1506,24 @@ mips-sony-newsos*) # AC_DEFINE(USE_OS2_TOOLKIT_HEADERS) AC_DEFINE(XP_OS2_EMX) AC_DEFINE(OS2) + AC_DEFINE(TCPV40HDRS) AR=emxomfar - AR_FLAGS='-p256 r $@' + AR_FLAGS='r $@' LD='$(CC)' - CFLAGS="$CFLAGS -Wall -Zmtd -Zomf" - CXXFLAGS="$CFLAGS -Wall -Zmtd -Zomf" + CFLAGS="$CFLAGS -Wall -Zomf" + CXXFLAGS="$CFLAGS -Wall -Zomf" MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@' DSO_CFLAGS= - DSO_LDOPTS='-Zomf -Zdll -Zmtd' + DSO_LDOPTS='-Zomf -Zdll' _OPTIMIZE_FLAGS=-O3 _DEBUG_FLAGS="-g -fno-inline" if test -n "$MOZ_OPTIMIZE"; then DSO_LDOPTS="$DSO_LDOPTS -Zlinker /EXEPACK:2 -Zlinker /PACKCODE -Zlinker /PACKDATA" fi - OS_LIBS="-lsocket -lemxio" + OS_LIBS="-lsocket" IMPLIB='emximp -o' FILTER='emxexp -o' - if test -z "$EMXOMFLD_LINKER"; then - # using LINK386.EXE - DSO_LDOPTS="$DSO_LDOPTS -Zlinker /NOO" - fi - # GCC for OS/2 currently predefines these, but we don't want them DEFINES="$DEFINES -Uunix -U__unix -U__unix__" diff --git a/mozilla/directory/c-sdk/ldap/build/genexports.pl b/mozilla/directory/c-sdk/ldap/build/genexports.pl index bea926fd72e..39696739bf4 100755 --- a/mozilla/directory/c-sdk/ldap/build/genexports.pl +++ b/mozilla/directory/c-sdk/ldap/build/genexports.pl @@ -193,10 +193,14 @@ print_export { } # finally, print out an appropriate export line - if ( $type eq "Win32" || $type eq "OS2" ) { + if ( $type eq "Win32" ) { if ( $symtype ne "G" ) { print "\t$symbol\t\t\@$ordinal\n"; } + } elsif ( $type eq "OS2" ) { + if ( $symtype ne "G" ) { + print "\t_$symbol\t\t\@$ordinal\n"; + } } elsif ( $type eq "Win16" ) { if ( $symtype eq "C" ) { print "\t_$symbol\t\t\@$ordinal\n"; diff --git a/mozilla/directory/c-sdk/ldap/include/portable.h b/mozilla/directory/c-sdk/ldap/include/portable.h index 543a4714c2f..2ee0f466e9e 100644 --- a/mozilla/directory/c-sdk/ldap/include/portable.h +++ b/mozilla/directory/c-sdk/ldap/include/portable.h @@ -342,7 +342,10 @@ extern char *strdup(); #define BSD_TIME 1 /* for servers/slapd/log.h */ #endif /* sunos4 || osf */ -#if !defined(_WINDOWS) && !defined(macintosh) && !defined(XP_OS2) +#if defined(XP_OS2) +#include /* for htonl, et.al. */ +#include /* for inet_addr() */ +#elif !defined(_WINDOWS) && !defined(macintosh) #include #if !defined(XP_BEOS) #include /* for inet_addr() */