Bug 166412: ported NSPR to AIX 5.1. AIX 5.1 is the same as AIX 4.3 as far

as NSPR is concerned.  Invented a new macro AIX4_3_PLUS to indicate AIX 4.3
or higher.
Modified files: configure configure.in _pth.h prnetdb.c
This commit is contained in:
wtc%netscape.com 2002-12-11 23:10:41 +00:00
parent a57a9b5ba7
commit 901980a0bb
4 changed files with 57 additions and 30 deletions

72
nsprpub/configure vendored
View File

@ -2983,7 +2983,7 @@ EOF
EOF
cat >> confdefs.h <<\EOF
#define AIX4_3 1
#define AIX4_3_PLUS 1
EOF
cat >> confdefs.h <<\EOF
@ -3004,6 +3004,10 @@ EOF
cat >> confdefs.h <<\EOF
#define _PR_HAVE_OFF64_T 1
EOF
cat >> confdefs.h <<\EOF
#define AIX4_3_PLUS 1
EOF
cat >> confdefs.h <<\EOF
@ -3062,7 +3066,7 @@ EOF
_DEBUG_FLAGS='-gdwarf-2 -O0'
MKSHLIB='$(CCC) $(DSO_LDOPTS) -o $@'
echo $ac_n "checking for gethostbyaddr in -lbind""... $ac_c" 1>&6
echo "configure:3066: checking for gethostbyaddr in -lbind" >&5
echo "configure:3070: checking for gethostbyaddr in -lbind" >&5
ac_lib_var=`echo bind'_'gethostbyaddr | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -3070,7 +3074,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lbind $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3074 "configure"
#line 3078 "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
@ -3081,7 +3085,7 @@ int main() {
gethostbyaddr()
; return 0; }
EOF
if { (eval echo configure:3085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3089: \"$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
@ -4243,17 +4247,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:4247: checking for machine/builtins.h" >&5
echo "configure:4251: 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
#line 4252 "configure"
#line 4256 "configure"
#include "confdefs.h"
#include <machine/builtins.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4257: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:4261: \"$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*
@ -4761,12 +4765,12 @@ esac
if test -z "$SKIP_LIBRARY_CHECKS"; then
echo $ac_n "checking for dlopen""... $ac_c" 1>&6
echo "configure:4765: checking for dlopen" >&5
echo "configure:4769: 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 4770 "configure"
#line 4774 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char dlopen(); below. */
@ -4789,7 +4793,7 @@ dlopen();
; return 0; }
EOF
if { (eval echo configure:4793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:4797: \"$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
@ -4808,7 +4812,7 @@ else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
echo "configure:4812: checking for dlopen in -ldl" >&5
echo "configure:4816: 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
@ -4816,7 +4820,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4820 "configure"
#line 4824 "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
@ -4827,7 +4831,7 @@ int main() {
dlopen()
; return 0; }
EOF
if { (eval echo configure:4831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:4835: \"$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
@ -4855,13 +4859,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:4859: checking whether ${CC-cc} needs -traditional" >&5
echo "configure:4863: 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 4865 "configure"
#line 4869 "configure"
#include "confdefs.h"
#include <sgtty.h>
Autoconf TIOCGETP
@ -4879,7 +4883,7 @@ rm -f conftest*
if test $ac_cv_prog_gcc_traditional = no; then
cat > conftest.$ac_ext <<EOF
#line 4883 "configure"
#line 4887 "configure"
#include "confdefs.h"
#include <termio.h>
Autoconf TCGETA
@ -4903,12 +4907,12 @@ fi
for ac_func in lchown strerror
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:4907: checking for $ac_func" >&5
echo "configure:4911: 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 4912 "configure"
#line 4916 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -4931,7 +4935,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:4935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:4939: \"$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
@ -4970,7 +4974,7 @@ hpux*)
if test -z "$GNU_CC"; then
echo $ac_n "checking for +Olit support""... $ac_c" 1>&6
echo "configure:4974: checking for +Olit support" >&5
echo "configure:4978: 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
@ -5004,7 +5008,7 @@ esac
echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
echo "configure:5008: checking for pthread_create in -lpthreads" >&5
echo "configure:5012: checking for pthread_create in -lpthreads" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@ -5026,7 +5030,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
echo "configure:5030: checking for pthread_create in -lpthread" >&5
echo "configure:5034: checking for pthread_create in -lpthread" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@ -5048,7 +5052,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
echo "configure:5052: checking for pthread_create in -lc_r" >&5
echo "configure:5056: checking for pthread_create in -lc_r" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@ -5070,7 +5074,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
echo "configure:5074: checking for pthread_create in -lc" >&5
echo "configure:5078: checking for pthread_create in -lc" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@ -5222,7 +5226,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:5226: checking whether ${CC-cc} accepts -pthread" >&5
echo "configure:5230: 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
@ -5245,7 +5249,7 @@ echo "configure:5226: 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:5249: checking whether ${CC-cc} accepts -pthreads" >&5
echo "configure:5253: 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
@ -5341,6 +5345,20 @@ EOF
if test -n "$USE_PTHREADS"; then
cat >> confdefs.h <<\EOF
#define _PR_HAVE_THREADSAFE_GETHOST 1
EOF
fi
;;
*)
if test -z "$USE_NSPR_THREADS"; then
cat >> confdefs.h <<\EOF
#define HAVE_POINTER_LOCALTIME_R 1
EOF
fi
if test -n "$USE_PTHREADS"; then
cat >> confdefs.h <<\EOF
#define _PR_HAVE_THREADSAFE_GETHOST 1
EOF
fi
@ -5734,7 +5752,7 @@ s%\[%\\&%g
s%\]%\\&%g
s%\$%$$%g
EOF
DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' ' | tr '\015' ' '`
rm -f conftest.defs

View File

@ -720,7 +720,7 @@ case "$target" in
aix4.3*)
AC_DEFINE(AIX_TIMERS)
AC_DEFINE(_PR_HAVE_OFF64_T)
AC_DEFINE(AIX4_3)
AC_DEFINE(AIX4_3_PLUS)
AC_DEFINE(HAVE_SOCKLEN_T)
AC_DEFINE(HAVE_FCNTL_FILE_LOCKING)
USE_IPV6=1
@ -729,6 +729,7 @@ case "$target" in
*)
AC_DEFINE(AIX_TIMERS)
AC_DEFINE(_PR_HAVE_OFF64_T)
AC_DEFINE(AIX4_3_PLUS)
AC_DEFINE(HAVE_SOCKLEN_T)
AC_DEFINE(HAVE_FCNTL_FILE_LOCKING)
USE_IPV6=1
@ -2179,6 +2180,14 @@ case "$target" in
AC_DEFINE(_PR_HAVE_THREADSAFE_GETHOST)
fi
;;
*)
if test -z "$USE_NSPR_THREADS"; then
AC_DEFINE(HAVE_POINTER_LOCALTIME_R)
fi
if test -n "$USE_PTHREADS"; then
AC_DEFINE(_PR_HAVE_THREADSAFE_GETHOST)
fi
;;
esac
;;
*-bsdi*)

View File

@ -188,7 +188,7 @@
/*
* These platforms don't have sigtimedwait()
*/
#if (defined(AIX) && !defined(AIX4_3)) || defined(LINUX) \
#if (defined(AIX) && !defined(AIX4_3_PLUS)) || defined(LINUX) \
|| defined(FREEBSD) || defined(NETBSD) || defined(OPENBSD) \
|| defined(BSDI) || defined(VMS) || defined(UNIXWARE) \
|| defined(DARWIN)

View File

@ -98,7 +98,7 @@ PRLock *_pr_dnsLock = NULL;
#endif
#if defined(OSF1) \
|| defined(AIX4_3) || (defined(AIX) && defined(_THREAD_SAFE)) \
|| defined(AIX4_3_PLUS) || (defined(AIX) && defined(_THREAD_SAFE)) \
|| (defined(HPUX10_10) && defined(_REENTRANT)) \
|| (defined(HPUX10_20) && defined(_REENTRANT))
#define _PR_HAVE_GETPROTO_R