Bugzilla bug 219913: define _PR_HAVE_THREADSAFE_GETHOST for OS/2 so that

we can issue concurrent gethostbyname calls.  Moved the definition of
_PR_GLOBAL_THREADS_ONLY, BSD_SELECT, and TCPV40HDRS from configure.in to
_os2.h.
Modified files: configure configure.in _os2.h
This commit is contained in:
wchang0222%aol.com 2003-11-16 01:10:49 +00:00
Родитель 6dda3d9c41
Коммит 47c0cfa43e
3 изменённых файлов: 24 добавлений и 40 удалений

54
nsprpub/configure поставляемый
Просмотреть файл

@ -4626,14 +4626,6 @@ EOF
cat >> confdefs.h <<\EOF
#define XP_PC 1
EOF
cat >> confdefs.h <<\EOF
#define BSD_SELECT 1
EOF
cat >> confdefs.h <<\EOF
#define _PR_GLOBAL_THREADS_ONLY 1
EOF
LIB_SUFFIX=lib
@ -4653,10 +4645,6 @@ EOF
cat >> confdefs.h <<\EOF
#define OS2 1
EOF
cat >> confdefs.h <<\EOF
#define TCPV40HDRS 1
EOF
AR=emxomfar
@ -4686,10 +4674,6 @@ EOF
cat >> confdefs.h <<\EOF
#define OS2 4
EOF
cat >> confdefs.h <<\EOF
#define TCPV40HDRS 1
EOF
cat >> confdefs.h <<\EOF
@ -4750,7 +4734,7 @@ case $target in
;;
*)
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
echo "configure:4754: checking for dlopen in -ldl" >&5
echo "configure:4738: 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
@ -4758,7 +4742,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4762 "configure"
#line 4746 "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
@ -4769,7 +4753,7 @@ int main() {
dlopen()
; return 0; }
EOF
if { (eval echo configure:4773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:4757: \"$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
@ -4786,17 +4770,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:4790: checking for dlfcn.h" >&5
echo "configure:4774: 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
#line 4795 "configure"
#line 4779 "configure"
#include "confdefs.h"
#include <dlfcn.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4800: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:4784: \"$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*
@ -4829,13 +4813,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:4833: checking whether ${CC-cc} needs -traditional" >&5
echo "configure:4817: 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 4839 "configure"
#line 4823 "configure"
#include "confdefs.h"
#include <sgtty.h>
Autoconf TIOCGETP
@ -4853,7 +4837,7 @@ rm -f conftest*
if test $ac_cv_prog_gcc_traditional = no; then
cat > conftest.$ac_ext <<EOF
#line 4857 "configure"
#line 4841 "configure"
#include "confdefs.h"
#include <termio.h>
Autoconf TCGETA
@ -4877,12 +4861,12 @@ fi
for ac_func in lchown strerror
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:4881: checking for $ac_func" >&5
echo "configure:4865: 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 4886 "configure"
#line 4870 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -4905,7 +4889,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:4909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:4893: \"$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
@ -4944,7 +4928,7 @@ hpux*)
if test -z "$GNU_CC"; then
echo $ac_n "checking for +Olit support""... $ac_c" 1>&6
echo "configure:4948: checking for +Olit support" >&5
echo "configure:4932: 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
@ -4978,7 +4962,7 @@ esac
echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
echo "configure:4982: checking for pthread_create in -lpthreads" >&5
echo "configure:4966: checking for pthread_create in -lpthreads" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@ -5000,7 +4984,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
echo "configure:5004: checking for pthread_create in -lpthread" >&5
echo "configure:4988: checking for pthread_create in -lpthread" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@ -5022,7 +5006,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
echo "configure:5026: checking for pthread_create in -lc_r" >&5
echo "configure:5010: checking for pthread_create in -lc_r" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@ -5044,7 +5028,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
echo "configure:5048: checking for pthread_create in -lc" >&5
echo "configure:5032: checking for pthread_create in -lc" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@ -5196,7 +5180,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:5200: checking whether ${CC-cc} accepts -pthread" >&5
echo "configure:5184: 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
@ -5219,7 +5203,7 @@ echo "configure:5200: 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:5223: checking whether ${CC-cc} accepts -pthreads" >&5
echo "configure:5207: 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

Просмотреть файл

@ -1788,8 +1788,6 @@ mips-sony-newsos*)
*-os2*)
AC_DEFINE(XP_OS2)
AC_DEFINE(XP_PC)
AC_DEFINE(BSD_SELECT)
AC_DEFINE(_PR_GLOBAL_THREADS_ONLY)
LIB_SUFFIX=lib
DLL_SUFFIX=dll
RC=rc.exe
@ -1803,7 +1801,6 @@ mips-sony-newsos*)
if test -n "$GNU_CC"; then
AC_DEFINE(XP_OS2_EMX)
AC_DEFINE(OS2)
AC_DEFINE(TCPV40HDRS)
AR=emxomfar
AR_FLAGS='r $@'
CFLAGS="$CFLAGS -Wall -Zomf"
@ -1827,7 +1824,6 @@ mips-sony-newsos*)
elif test "$VACPP" = "yes"; then
AC_DEFINE(XP_OS2_VACPP)
AC_DEFINE(OS2,4)
AC_DEFINE(TCPV40HDRS)
AC_DEFINE(_X86_)
OBJ_SUFFIX=obj
AS=alp

Просмотреть файл

@ -84,7 +84,9 @@ APIRET _Optlink SemReleasex86(PRAMSEM, ULONG);
#define _PR_SI_ARCHITECTURE "x86" /* XXXMB hardcode for now */
#define HAVE_DLL
#define _PR_GLOBAL_THREADS_ONLY
#undef HAVE_THREAD_AFFINITY
#define _PR_HAVE_THREADSAFE_GETHOST
#define _PR_HAVE_ATOMIC_OPS
#define HANDLE unsigned long
@ -240,6 +242,9 @@ extern PRInt32 _MD_CloseFile(PRInt32 osfd);
/* --- Socket IO stuff --- */
#define TCPV40HDRS
#define BSD_SELECT
/* The ones that don't map directly may need to be re-visited... */
#ifdef XP_OS2_VACPP
#define EPIPE EBADF
@ -301,7 +306,6 @@ extern PRInt32 _MD_CloseSocket(PRInt32 osfd);
#define _MD_INIT_IO (_PR_MD_INIT_IO)
#define _MD_PR_POLL (_PR_MD_PR_POLL)
/* win95 doesn't have async IO */
#define _MD_SOCKET (_PR_MD_SOCKET)
extern PRInt32 _MD_SocketAvailable(PRFileDesc *fd);
#define _MD_SOCKETAVAILABLE _MD_SocketAvailable