зеркало из https://github.com/mozilla/gecko-dev.git
Bug 469870: Upgraded nsprpub to NSPR_HEAD_20081216. r=kaie.
This commit is contained in:
Родитель
60e89b7539
Коммит
1d046d134d
|
@ -64,10 +64,10 @@
|
|||
#
|
||||
# ------------------------------------------------------------------
|
||||
|
||||
FROMTOP=/share/builds/components/nspr20/v4.7.2
|
||||
TOTOP=./v4.7.2
|
||||
NSPRDIR=nspr-4.7.2
|
||||
SOURCETAG=NSPR_4_7_2_RTM
|
||||
FROMTOP=/share/builds/components/nspr20/v4.7.4
|
||||
TOTOP=./v4.7.4
|
||||
NSPRDIR=nspr-4.7.4
|
||||
SOURCETAG=NSPR_4_7_4_RTM
|
||||
|
||||
#
|
||||
# enumerate Unix object directories on /s/b/c
|
||||
|
|
|
@ -113,12 +113,16 @@ PROGS = $(OBJDIR)/now$(PROG_SUFFIX)
|
|||
ifeq (,$(CROSS_COMPILE)$(filter-out OS2 WINNT,$(OS_ARCH)))
|
||||
TARGETS = $(PROGS)
|
||||
else
|
||||
ifeq ($(OS_ARCH),WINCE)
|
||||
TARGETS = $(PROGS)
|
||||
else
|
||||
PROGS += $(OBJDIR)/nsinstall$(PROG_SUFFIX)
|
||||
TARGETS = $(PROGS) $(PLSRCS:.pl=)
|
||||
endif
|
||||
endif
|
||||
|
||||
OUTOPTION = -o # end of the line
|
||||
ifeq (,$(filter-out WINNT WIN95,$(OS_TARGET)))
|
||||
ifeq (,$(filter-out WINNT WIN95 WINCE,$(OS_TARGET)))
|
||||
ifndef NS_USE_GCC
|
||||
OUTOPTION = -Fe
|
||||
endif
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
#include <sys/timeb.h>
|
||||
#elif defined(XP_UNIX) || defined(XP_OS2) || defined(XP_BEOS)
|
||||
#include <sys/time.h>
|
||||
#elif defined(WIN32)
|
||||
#elif defined(_WIN32)
|
||||
#include <windows.h>
|
||||
#else
|
||||
#error "Architecture not supported"
|
||||
|
@ -87,7 +87,7 @@ int main(int argc, char **argv)
|
|||
fprintf(stdout, "%lld", now);
|
||||
#endif
|
||||
|
||||
#elif defined(WIN32)
|
||||
#elif defined(_WIN32)
|
||||
__int64 now;
|
||||
FILETIME ft;
|
||||
GetSystemTimeAsFileTime(&ft);
|
||||
|
|
|
@ -42,3 +42,4 @@
|
|||
*/
|
||||
|
||||
#error "Do not include this header file."
|
||||
|
||||
|
|
|
@ -106,13 +106,13 @@ endif
|
|||
#
|
||||
|
||||
ifdef LIBRARY_NAME
|
||||
ifeq (,$(filter-out WINNT OS2,$(OS_ARCH)))
|
||||
ifeq (,$(filter-out WINNT WINCE OS2,$(OS_ARCH)))
|
||||
|
||||
#
|
||||
# Win95, Win16, and OS/2 require library names conforming to the 8.3 rule.
|
||||
# other platforms do not.
|
||||
#
|
||||
ifeq (,$(filter-out WIN95 OS2,$(OS_TARGET)))
|
||||
ifeq (,$(filter-out WIN95 WINCE OS2,$(OS_TARGET)))
|
||||
LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION)_s.$(LIB_SUFFIX)
|
||||
SHARED_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
|
||||
IMPORT_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).$(LIB_SUFFIX)
|
||||
|
@ -139,7 +139,7 @@ endif
|
|||
endif
|
||||
|
||||
ifndef TARGETS
|
||||
ifeq (,$(filter-out WINNT OS2,$(OS_ARCH)))
|
||||
ifeq (,$(filter-out WINNT WINCE OS2,$(OS_ARCH)))
|
||||
TARGETS = $(LIBRARY) $(SHARED_LIBRARY) $(IMPORT_LIBRARY)
|
||||
ifndef BUILD_OPT
|
||||
ifdef MSC_VER
|
||||
|
@ -409,12 +409,16 @@ $(OBJDIR)/%.$(OBJ_SUFFIX): %.cpp
|
|||
ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINNT)
|
||||
$(CCC) -Fo$@ -c $(CCCFLAGS) $(call abspath,$<)
|
||||
else
|
||||
ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINCE)
|
||||
$(CCC) -Fo$@ -c $(CCCFLAGS) $<
|
||||
else
|
||||
ifdef NEED_ABSOLUTE_PATH
|
||||
$(CCC) -o $@ -c $(CCCFLAGS) $(call abspath,$<)
|
||||
else
|
||||
$(CCC) -o $@ -c $(CCCFLAGS) $<
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
WCCFLAGS1 = $(subst /,\\,$(CFLAGS))
|
||||
WCCFLAGS2 = $(subst -I,-i=,$(WCCFLAGS1))
|
||||
|
@ -424,12 +428,16 @@ $(OBJDIR)/%.$(OBJ_SUFFIX): %.c
|
|||
ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINNT)
|
||||
$(CC) -Fo$@ -c $(CFLAGS) $(call abspath,$<)
|
||||
else
|
||||
ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINCE)
|
||||
$(CC) -Fo$@ -c $(CFLAGS) $<
|
||||
else
|
||||
ifdef NEED_ABSOLUTE_PATH
|
||||
$(CC) -o $@ -c $(CFLAGS) $(call abspath,$<)
|
||||
else
|
||||
$(CC) -o $@ -c $(CFLAGS) $<
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
$(OBJDIR)/%.$(OBJ_SUFFIX): %.s
|
||||
|
|
|
@ -689,7 +689,7 @@ test "$host_alias" != "$target_alias" &&
|
|||
|
||||
MOD_MAJOR_VERSION=4
|
||||
MOD_MINOR_VERSION=7
|
||||
MOD_PATCH_VERSION=2
|
||||
MOD_PATCH_VERSION=4
|
||||
NSPR_MODNAME=nspr20
|
||||
_HAVE_PTHREADS=
|
||||
USE_PTHREADS=
|
||||
|
@ -1110,7 +1110,7 @@ EOF
|
|||
beos*)
|
||||
DEFINES="$DEFINES -DDEBUG_${USER}"
|
||||
;;
|
||||
msvc*|mks*|cygwin*|mingw*|os2*)
|
||||
msvc*|mks*|cygwin*|mingw*|wince*|os2*)
|
||||
DEFINES="$DEFINES -DDEBUG_`echo ${USERNAME} | sed -e 's| |_|g'`"
|
||||
;;
|
||||
*)
|
||||
|
@ -2783,6 +2783,7 @@ if test -n "$CROSS_COMPILE"; then
|
|||
linux*) OS_ARCH=Linux ;;
|
||||
solaris*) OS_ARCH=SunOS OS_RELEASE=5 ;;
|
||||
mingw*) OS_ARCH=WINNT ;;
|
||||
wince*) OS_ARCH=WINCE ;;
|
||||
darwin*) OS_ARCH=Darwin ;;
|
||||
esac
|
||||
else
|
||||
|
@ -2946,7 +2947,7 @@ case "$host" in
|
|||
*-mingw*)
|
||||
NSINSTALL=nsinstall
|
||||
;;
|
||||
*-cygwin*|*-msvc*|*-mks*)
|
||||
*-cygwin*|*-msvc*|*-mks*|*-wince*)
|
||||
NSINSTALL='$(CYGWIN_WRAPPER) nsinstall'
|
||||
if test `echo "${PATH}" | grep -c \;` = 0; then
|
||||
CYGWIN_WRAPPER='sh $(topsrcdir)/build/cygwin-wrapper'
|
||||
|
@ -2980,17 +2981,17 @@ EOF
|
|||
DSO_LDOPTS='-brtl -bnortllib -bM:SRE -bnoentry -bexpall -blibpath:/usr/lib:/lib'
|
||||
ac_safe=`echo "sys/atomic_op.h" | sed 'y%./+-%__p_%'`
|
||||
echo $ac_n "checking for sys/atomic_op.h""... $ac_c" 1>&6
|
||||
echo "configure:2984: checking for sys/atomic_op.h" >&5
|
||||
echo "configure:2985: checking for sys/atomic_op.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 2989 "configure"
|
||||
#line 2990 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/atomic_op.h>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:2994: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:2995: \"$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*
|
||||
|
@ -3147,7 +3148,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:3151: checking for gethostbyaddr in -lbind" >&5
|
||||
echo "configure:3152: 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
|
||||
|
@ -3155,7 +3156,7 @@ else
|
|||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-lbind $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3159 "configure"
|
||||
#line 3160 "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
|
||||
|
@ -3166,7 +3167,7 @@ int main() {
|
|||
gethostbyaddr()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:3171: \"$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
|
||||
|
@ -4207,6 +4208,43 @@ EOF
|
|||
|
||||
;;
|
||||
|
||||
*-wince*)
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define XP_PC 1
|
||||
EOF
|
||||
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define WIN32 1
|
||||
EOF
|
||||
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define WINCE 1
|
||||
EOF
|
||||
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define _PR_GLOBAL_THREADS_ONLY 1
|
||||
EOF
|
||||
|
||||
|
||||
AR='lib -NOLOGO -OUT:"$@"'
|
||||
AR_FLAGS=
|
||||
|
||||
OBJ_SUFFIX=obj
|
||||
LIB_SUFFIX=lib
|
||||
DLL_SUFFIX=dll
|
||||
MKSHLIB='$(LD) -DLL $(DSO_LDOPTS) -OUT:$@'
|
||||
|
||||
PR_MD_ARCH_DIR=windows
|
||||
RESOLVE_LINK_SYMBOLS=1
|
||||
|
||||
MDCPUCFG_H=_win95.cfg
|
||||
LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
|
||||
LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
|
||||
|
||||
DLLFLAGS='-OUT:"$@"'
|
||||
_DEBUG_FLAGS=-Zi
|
||||
;;
|
||||
|
||||
*-ncr-sysv*)
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define XP_UNIX 1
|
||||
|
@ -4294,7 +4332,9 @@ EOF
|
|||
#define HAVE_BSD_FLOCK 1
|
||||
EOF
|
||||
|
||||
USE_NSPR_THREADS=1
|
||||
if test -z "$USE_NSPR_THREADS"; then
|
||||
USE_PTHREADS=1
|
||||
fi
|
||||
MDCPUCFG_H=_netbsd.cfg
|
||||
PR_MD_CSRCS=netbsd.c
|
||||
|
||||
|
@ -4501,17 +4541,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:4505: checking for machine/builtins.h" >&5
|
||||
echo "configure:4545: 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 4510 "configure"
|
||||
#line 4550 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <machine/builtins.h>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:4515: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:4555: \"$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*
|
||||
|
@ -4766,15 +4806,29 @@ EOF
|
|||
LD=/usr/ccs/bin/ld
|
||||
MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
|
||||
RESOLVE_LINK_SYMBOLS=1
|
||||
case "${OS_RELEASE}" in
|
||||
5.8|5.9)
|
||||
;;
|
||||
*)
|
||||
# It is safe to use the -Bdirect linker flag on Solaris 10 or later.
|
||||
USE_B_DIRECT=1
|
||||
;;
|
||||
esac
|
||||
if test -n "$GNU_CC"; then
|
||||
DSO_CFLAGS=-fPIC
|
||||
if `$CC -print-prog-name=ld` -v 2>&1 | grep -c GNU >/dev/null; then
|
||||
GCC_USE_GNU_LD=1
|
||||
fi
|
||||
DSO_LDOPTS='-shared -Wl,-h,$(notdir $@),-z,combreloc,-z,defs,-z,ignore,-Bdirect'
|
||||
DSO_LDOPTS='-shared -Wl,-h,$(notdir $@),-z,combreloc,-z,defs,-z,ignore'
|
||||
if test -n "$USE_B_DIRECT"; then
|
||||
DSO_LDOPTS="$DSO_LDOPTS,-Bdirect"
|
||||
fi
|
||||
else
|
||||
DSO_CFLAGS=-KPIC
|
||||
DSO_LDOPTS='-G -h $(notdir $@) -z combreloc -z defs -z ignore -Bdirect'
|
||||
DSO_LDOPTS='-G -h $(notdir $@) -z combreloc -z defs -z ignore'
|
||||
if test -n "$USE_B_DIRECT"; then
|
||||
DSO_LDOPTS="$DSO_LDOPTS -Bdirect"
|
||||
fi
|
||||
fi
|
||||
if test -n "$GNU_CC"; then
|
||||
CFLAGS="$CFLAGS -Wall"
|
||||
|
@ -5027,7 +5081,7 @@ case $target in
|
|||
;;
|
||||
*)
|
||||
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
|
||||
echo "configure:5031: checking for dlopen in -ldl" >&5
|
||||
echo "configure:5085: 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
|
||||
|
@ -5035,7 +5089,7 @@ else
|
|||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-ldl $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 5039 "configure"
|
||||
#line 5093 "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
|
||||
|
@ -5046,7 +5100,7 @@ int main() {
|
|||
dlopen()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:5050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:5104: \"$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
|
||||
|
@ -5063,17 +5117,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:5067: checking for dlfcn.h" >&5
|
||||
echo "configure:5121: 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 5072 "configure"
|
||||
#line 5126 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <dlfcn.h>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:5077: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:5131: \"$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*
|
||||
|
@ -5106,13 +5160,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:5110: checking whether ${CC-cc} needs -traditional" >&5
|
||||
echo "configure:5164: 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 5116 "configure"
|
||||
#line 5170 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sgtty.h>
|
||||
Autoconf TIOCGETP
|
||||
|
@ -5130,7 +5184,7 @@ rm -f conftest*
|
|||
|
||||
if test $ac_cv_prog_gcc_traditional = no; then
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 5134 "configure"
|
||||
#line 5188 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <termio.h>
|
||||
Autoconf TCGETA
|
||||
|
@ -5154,12 +5208,12 @@ fi
|
|||
for ac_func in lchown strerror
|
||||
do
|
||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||
echo "configure:5158: checking for $ac_func" >&5
|
||||
echo "configure:5212: 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 5163 "configure"
|
||||
#line 5217 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char $ac_func(); below. */
|
||||
|
@ -5182,7 +5236,7 @@ $ac_func();
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:5186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:5240: \"$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
|
||||
|
@ -5223,7 +5277,7 @@ hpux*)
|
|||
if test -z "$GNU_CC"; then
|
||||
|
||||
echo $ac_n "checking for +Olit support""... $ac_c" 1>&6
|
||||
echo "configure:5227: checking for +Olit support" >&5
|
||||
echo "configure:5281: 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
|
||||
|
@ -5262,7 +5316,7 @@ darwin*)
|
|||
*)
|
||||
|
||||
echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
|
||||
echo "configure:5266: checking for pthread_create in -lpthreads" >&5
|
||||
echo "configure:5320: checking for pthread_create in -lpthreads" >&5
|
||||
echo "
|
||||
#include <pthread.h>
|
||||
void *foo(void *v) { return v; }
|
||||
|
@ -5284,7 +5338,7 @@ echo "
|
|||
echo "$ac_t""no" 1>&6
|
||||
|
||||
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
|
||||
echo "configure:5288: checking for pthread_create in -lpthread" >&5
|
||||
echo "configure:5342: checking for pthread_create in -lpthread" >&5
|
||||
echo "
|
||||
#include <pthread.h>
|
||||
void *foo(void *v) { return v; }
|
||||
|
@ -5306,7 +5360,7 @@ echo "
|
|||
echo "$ac_t""no" 1>&6
|
||||
|
||||
echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
|
||||
echo "configure:5310: checking for pthread_create in -lc_r" >&5
|
||||
echo "configure:5364: checking for pthread_create in -lc_r" >&5
|
||||
echo "
|
||||
#include <pthread.h>
|
||||
void *foo(void *v) { return v; }
|
||||
|
@ -5328,7 +5382,7 @@ echo "
|
|||
echo "$ac_t""no" 1>&6
|
||||
|
||||
echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
|
||||
echo "configure:5332: checking for pthread_create in -lc" >&5
|
||||
echo "configure:5386: checking for pthread_create in -lc" >&5
|
||||
echo "
|
||||
#include <pthread.h>
|
||||
void *foo(void *v) { return v; }
|
||||
|
@ -5460,7 +5514,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:5464: checking whether ${CC-cc} accepts -pthread" >&5
|
||||
echo "configure:5518: 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
|
||||
|
@ -5483,7 +5537,7 @@ echo "configure:5464: 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:5487: checking whether ${CC-cc} accepts -pthreads" >&5
|
||||
echo "configure:5541: 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
|
||||
|
@ -5682,7 +5736,7 @@ EOF
|
|||
|
||||
fi
|
||||
;;
|
||||
*-mingw*|*-cygwin*|*-msvc*|*-mks*|*-os2*|*-beos*)
|
||||
*-mingw*|*-cygwin*|*-msvc*|*-mks*|*-wince*|*-os2*|*-beos*)
|
||||
USE_PTHREADS=
|
||||
_PTHREAD_LDFLAGS=
|
||||
USE_USER_PTHREADS=
|
||||
|
@ -6016,7 +6070,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
|
||||
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ dnl = Defaults
|
|||
dnl ========================================================
|
||||
MOD_MAJOR_VERSION=4
|
||||
MOD_MINOR_VERSION=7
|
||||
MOD_PATCH_VERSION=2
|
||||
MOD_PATCH_VERSION=4
|
||||
NSPR_MODNAME=nspr20
|
||||
_HAVE_PTHREADS=
|
||||
USE_PTHREADS=
|
||||
|
@ -384,7 +384,7 @@ if test -n "$MOZ_DEBUG"; then
|
|||
beos*)
|
||||
DEFINES="$DEFINES -DDEBUG_${USER}"
|
||||
;;
|
||||
msvc*|mks*|cygwin*|mingw*|os2*)
|
||||
msvc*|mks*|cygwin*|mingw*|wince*|os2*)
|
||||
DEFINES="$DEFINES -DDEBUG_`echo ${USERNAME} | sed -e 's| |_|g'`"
|
||||
;;
|
||||
*)
|
||||
|
@ -651,6 +651,7 @@ if test -n "$CROSS_COMPILE"; then
|
|||
linux*) OS_ARCH=Linux ;;
|
||||
solaris*) OS_ARCH=SunOS OS_RELEASE=5 ;;
|
||||
mingw*) OS_ARCH=WINNT ;;
|
||||
wince*) OS_ARCH=WINCE ;;
|
||||
darwin*) OS_ARCH=Darwin ;;
|
||||
esac
|
||||
else
|
||||
|
@ -817,7 +818,7 @@ case "$host" in
|
|||
*-mingw*)
|
||||
NSINSTALL=nsinstall
|
||||
;;
|
||||
*-cygwin*|*-msvc*|*-mks*)
|
||||
*-cygwin*|*-msvc*|*-mks*|*-wince*)
|
||||
NSINSTALL='$(CYGWIN_WRAPPER) nsinstall'
|
||||
if test `echo "${PATH}" | grep -c \;` = 0; then
|
||||
CYGWIN_WRAPPER='sh $(topsrcdir)/build/cygwin-wrapper'
|
||||
|
@ -1684,6 +1685,31 @@ tools are selected during the Xcode/Developer Tools installation.])
|
|||
|
||||
;;
|
||||
|
||||
*-wince*)
|
||||
AC_DEFINE(XP_PC)
|
||||
AC_DEFINE(WIN32)
|
||||
AC_DEFINE(WINCE)
|
||||
AC_DEFINE(_PR_GLOBAL_THREADS_ONLY)
|
||||
|
||||
AR='lib -NOLOGO -OUT:"$@"'
|
||||
AR_FLAGS=
|
||||
|
||||
OBJ_SUFFIX=obj
|
||||
LIB_SUFFIX=lib
|
||||
DLL_SUFFIX=dll
|
||||
MKSHLIB='$(LD) -DLL $(DSO_LDOPTS) -OUT:$@'
|
||||
|
||||
PR_MD_ARCH_DIR=windows
|
||||
RESOLVE_LINK_SYMBOLS=1
|
||||
|
||||
MDCPUCFG_H=_win95.cfg
|
||||
LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
|
||||
LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
|
||||
|
||||
DLLFLAGS='-OUT:"$@"'
|
||||
_DEBUG_FLAGS=-Zi
|
||||
;;
|
||||
|
||||
*-ncr-sysv*)
|
||||
AC_DEFINE(XP_UNIX)
|
||||
AC_DEFINE(SVR4)
|
||||
|
@ -1729,7 +1755,9 @@ mips-nec-sysv*)
|
|||
AC_DEFINE(XP_UNIX)
|
||||
AC_DEFINE(NETBSD)
|
||||
AC_DEFINE(HAVE_BSD_FLOCK)
|
||||
USE_NSPR_THREADS=1
|
||||
if test -z "$USE_NSPR_THREADS"; then
|
||||
USE_PTHREADS=1
|
||||
fi
|
||||
MDCPUCFG_H=_netbsd.cfg
|
||||
PR_MD_CSRCS=netbsd.c
|
||||
|
||||
|
@ -1989,15 +2017,29 @@ mips-sony-newsos*)
|
|||
LD=/usr/ccs/bin/ld
|
||||
MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
|
||||
RESOLVE_LINK_SYMBOLS=1
|
||||
case "${OS_RELEASE}" in
|
||||
5.8|5.9)
|
||||
;;
|
||||
*)
|
||||
# It is safe to use the -Bdirect linker flag on Solaris 10 or later.
|
||||
USE_B_DIRECT=1
|
||||
;;
|
||||
esac
|
||||
if test -n "$GNU_CC"; then
|
||||
DSO_CFLAGS=-fPIC
|
||||
if `$CC -print-prog-name=ld` -v 2>&1 | grep -c GNU >/dev/null; then
|
||||
GCC_USE_GNU_LD=1
|
||||
fi
|
||||
DSO_LDOPTS='-shared -Wl,-h,$(notdir $@),-z,combreloc,-z,defs,-z,ignore,-Bdirect'
|
||||
DSO_LDOPTS='-shared -Wl,-h,$(notdir $@),-z,combreloc,-z,defs,-z,ignore'
|
||||
if test -n "$USE_B_DIRECT"; then
|
||||
DSO_LDOPTS="$DSO_LDOPTS,-Bdirect"
|
||||
fi
|
||||
else
|
||||
DSO_CFLAGS=-KPIC
|
||||
DSO_LDOPTS='-G -h $(notdir $@) -z combreloc -z defs -z ignore -Bdirect'
|
||||
DSO_LDOPTS='-G -h $(notdir $@) -z combreloc -z defs -z ignore'
|
||||
if test -n "$USE_B_DIRECT"; then
|
||||
DSO_LDOPTS="$DSO_LDOPTS -Bdirect"
|
||||
fi
|
||||
fi
|
||||
if test -n "$GNU_CC"; then
|
||||
CFLAGS="$CFLAGS -Wall"
|
||||
|
@ -2594,8 +2636,8 @@ case "$target" in
|
|||
AC_DEFINE(_PR_LOCAL_THREADS_ONLY)
|
||||
fi
|
||||
;;
|
||||
*-mingw*|*-cygwin*|*-msvc*|*-mks*|*-os2*|*-beos*)
|
||||
dnl win32, os2 & beos cannot use pthreads
|
||||
*-mingw*|*-cygwin*|*-msvc*|*-mks*|*-wince*|*-os2*|*-beos*)
|
||||
dnl win32, wince, os2 & beos cannot use pthreads
|
||||
USE_PTHREADS=
|
||||
_PTHREAD_LDFLAGS=
|
||||
USE_USER_PTHREADS=
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
|
||||
#define PR_AF_INET6 30 /* same as AF_INET6 */
|
||||
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
#ifdef __LITTLE_ENDIAN__
|
||||
#undef IS_BIG_ENDIAN
|
||||
#define IS_LITTLE_ENDIAN 1
|
||||
#else
|
||||
|
|
|
@ -72,6 +72,7 @@
|
|||
#define _PR_HAVE_SOCKADDR_LEN
|
||||
#define _PR_STAT_HAS_ST_ATIMESPEC
|
||||
#define _PR_HAVE_LARGE_OFF_T
|
||||
#define _PR_HAVE_SYSV_SEMAPHORES
|
||||
#define PR_HAVE_SYSV_NAMED_SHARED_MEMORY
|
||||
|
||||
#define _PR_INET6
|
||||
|
|
|
@ -417,11 +417,21 @@ extern void _MD_CleanupBeforeExit(void);
|
|||
#elif defined(__arm__)
|
||||
/* ARM/Linux */
|
||||
#if defined(__GLIBC__) && __GLIBC__ >= 2
|
||||
#ifdef __ARM_EABI__
|
||||
/* EABI */
|
||||
#define _MD_GET_SP(_t) (_t)->md.context[0].__jmpbuf[8]
|
||||
#define _MD_SET_FP(_t, val) ((_t)->md.context[0].__jmpbuf[7] = (val))
|
||||
#define _MD_GET_SP_PTR(_t) &(_MD_GET_SP(_t))
|
||||
#define _MD_GET_FP_PTR(_t) (&(_t)->md.context[0].__jmpbuf[7])
|
||||
#define _MD_SP_TYPE __ptr_t
|
||||
#else /* __ARM_EABI__ */
|
||||
/* old ABI */
|
||||
#define _MD_GET_SP(_t) (_t)->md.context[0].__jmpbuf[20]
|
||||
#define _MD_SET_FP(_t, val) ((_t)->md.context[0].__jmpbuf[19] = (val))
|
||||
#define _MD_GET_SP_PTR(_t) &(_MD_GET_SP(_t))
|
||||
#define _MD_GET_FP_PTR(_t) (&(_t)->md.context[0].__jmpbuf[19])
|
||||
#define _MD_SP_TYPE __ptr_t
|
||||
#endif /* __ARM_EABI__ */
|
||||
#else
|
||||
#error "ARM/Linux pre-glibc2 not supported yet"
|
||||
#endif /* defined(__GLIBC__) && __GLIBC__ >= 2 */
|
||||
|
|
|
@ -46,9 +46,15 @@
|
|||
#define WIN32
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32_WCE
|
||||
#ifndef WINCE
|
||||
#define WINCE
|
||||
#endif
|
||||
#else
|
||||
#ifndef WIN95
|
||||
#define WIN95
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define PR_AF_INET6 23 /* same as AF_INET6 */
|
||||
|
||||
|
@ -98,7 +104,7 @@
|
|||
#define PR_ALIGN_OF_POINTER 4
|
||||
|
||||
#define PR_BYTES_PER_WORD_LOG2 2
|
||||
#define PR_BYTES_PER_DWORD_LOG2 2
|
||||
#define PR_BYTES_PER_DWORD_LOG2 3
|
||||
|
||||
#elif defined(_ALPHA_)
|
||||
|
||||
|
@ -242,6 +248,54 @@
|
|||
#define PR_BYTES_PER_WORD_LOG2 3
|
||||
#define PR_BYTES_PER_DWORD_LOG2 3
|
||||
|
||||
#elif defined(_ARM_)
|
||||
|
||||
#define IS_LITTLE_ENDIAN 1
|
||||
#undef IS_BIG_ENDIAN
|
||||
|
||||
#define PR_BYTES_PER_BYTE 1
|
||||
#define PR_BYTES_PER_SHORT 2
|
||||
#define PR_BYTES_PER_INT 4
|
||||
#define PR_BYTES_PER_INT64 8
|
||||
#define PR_BYTES_PER_LONG 4
|
||||
#define PR_BYTES_PER_FLOAT 4
|
||||
#define PR_BYTES_PER_WORD 4
|
||||
#define PR_BYTES_PER_DWORD 8
|
||||
#define PR_BYTES_PER_DOUBLE 8
|
||||
|
||||
#define PR_BITS_PER_BYTE 8
|
||||
#define PR_BITS_PER_SHORT 16
|
||||
#define PR_BITS_PER_INT 32
|
||||
#define PR_BITS_PER_INT64 64
|
||||
#define PR_BITS_PER_LONG 32
|
||||
#define PR_BITS_PER_FLOAT 32
|
||||
#define PR_BITS_PER_WORD 32
|
||||
#define PR_BITS_PER_DWORD 64
|
||||
#define PR_BITS_PER_DOUBLE 64
|
||||
|
||||
#define PR_BITS_PER_BYTE_LOG2 3
|
||||
#define PR_BITS_PER_SHORT_LOG2 4
|
||||
#define PR_BITS_PER_INT_LOG2 5
|
||||
#define PR_BITS_PER_INT64_LOG2 6
|
||||
#define PR_BITS_PER_LONG_LOG2 5
|
||||
#define PR_BITS_PER_FLOAT_LOG2 5
|
||||
#define PR_BITS_PER_WORD_LOG2 5
|
||||
#define PR_BITS_PER_DWORD_LOG2 6
|
||||
#define PR_BITS_PER_DOUBLE_LOG2 6
|
||||
|
||||
#define PR_ALIGN_OF_SHORT 2
|
||||
#define PR_ALIGN_OF_INT 4
|
||||
#define PR_ALIGN_OF_LONG 4
|
||||
#define PR_ALIGN_OF_INT64 8
|
||||
#define PR_ALIGN_OF_FLOAT 4
|
||||
#define PR_ALIGN_OF_WORD 4
|
||||
#define PR_ALIGN_OF_DWORD 8
|
||||
#define PR_ALIGN_OF_DOUBLE 4
|
||||
#define PR_ALIGN_OF_POINTER 4
|
||||
|
||||
#define PR_BYTES_PER_WORD_LOG2 2
|
||||
#define PR_BYTES_PER_DWORD_LOG2 3
|
||||
|
||||
#else /* defined(_M_IX86) || defined(_X86_) */
|
||||
|
||||
#error unknown processor architecture
|
||||
|
|
|
@ -56,6 +56,8 @@
|
|||
#define _PR_SI_ARCHITECTURE "x86-64"
|
||||
#elif defined(_IA64_)
|
||||
#define _PR_SI_ARCHITECTURE "ia64"
|
||||
#elif defined(_ARM_)
|
||||
#define _PR_SI_ARCHITECTURE "arm"
|
||||
#else
|
||||
#error unknown processor architecture
|
||||
#endif
|
||||
|
|
|
@ -51,7 +51,7 @@ PR_BEGIN_EXTERN_C
|
|||
#ifdef WINNT
|
||||
#include "md/_winnt.h"
|
||||
#include "md/_win32_errors.h"
|
||||
#elif defined(WIN95)
|
||||
#elif defined(WIN95) || defined(WINCE)
|
||||
#include "md/_win95.h"
|
||||
#include "md/_win32_errors.h"
|
||||
#elif defined(WIN16)
|
||||
|
|
|
@ -110,7 +110,7 @@ NSPR_API(PRInt32) PR_AtomicAdd(PRInt32 *ptr, PRInt32 val);
|
|||
** the macros and functions won't be compatible and can't be used
|
||||
** interchangeably.
|
||||
*/
|
||||
#if defined(_WIN32) && (_MSC_VER >= 1310)
|
||||
#if defined(_WIN32) && !defined(_WIN32_WCE) && (_MSC_VER >= 1310)
|
||||
|
||||
long __cdecl _InterlockedIncrement(long volatile *Addend);
|
||||
#pragma intrinsic(_InterlockedIncrement)
|
||||
|
|
|
@ -63,11 +63,11 @@ PR_BEGIN_EXTERN_C
|
|||
** The format of the version string is
|
||||
** "<major version>.<minor version>[.<patch level>] [<Beta>]"
|
||||
*/
|
||||
#define PR_VERSION "4.7.2"
|
||||
#define PR_VERSION "4.7.4 Beta"
|
||||
#define PR_VMAJOR 4
|
||||
#define PR_VMINOR 7
|
||||
#define PR_VPATCH 2
|
||||
#define PR_BETA PR_FALSE
|
||||
#define PR_VPATCH 4
|
||||
#define PR_BETA PR_TRUE
|
||||
|
||||
/*
|
||||
** PRVersionCheck
|
||||
|
|
|
@ -438,7 +438,7 @@ NSPR_API(void) PR_FreeAddrInfo(PRAddrInfo *addrInfo);
|
|||
** INPUTS:
|
||||
** void *enumPtr Index pointer of the enumeration. The enumeration
|
||||
** starts and ends with a value of NULL.
|
||||
** PRAddrInfo *addrInfo
|
||||
** const PRAddrInfo *addrInfo
|
||||
** The PRAddrInfo handle returned by a successful
|
||||
** call to PR_GetAddrInfoByName().
|
||||
** PRUint16 port The port number to be assigned as part of the
|
||||
|
@ -446,11 +446,11 @@ NSPR_API(void) PR_FreeAddrInfo(PRAddrInfo *addrInfo);
|
|||
** OUTPUTS:
|
||||
** PRNetAddr *result A pointer to an address structure that will be
|
||||
** filled in by the call to the enumeration if the
|
||||
** result of the call is greater than zero.
|
||||
** result of the call is not NULL.
|
||||
** RETURN:
|
||||
** void* The value that should be used for the next call
|
||||
** of the enumerator ('enumPtr'). The enumeration
|
||||
** is ended if this value is returned NULL.
|
||||
** is ended if this value is NULL.
|
||||
***********************************************************************/
|
||||
NSPR_API(void *) PR_EnumerateAddrInfo(
|
||||
void *enumPtr, const PRAddrInfo *addrInfo, PRUint16 port, PRNetAddr *result);
|
||||
|
@ -462,7 +462,7 @@ NSPR_API(void *) PR_EnumerateAddrInfo(
|
|||
** PR_GetAddrInfoByName().
|
||||
**
|
||||
** INPUTS:
|
||||
** PRAddrInfo *addrInfo
|
||||
** const PRAddrInfo *addrInfo
|
||||
** The PRAddrInfo handle returned by a successful
|
||||
** call to PR_GetAddrInfoByName().
|
||||
** RETURN:
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
#include <image.h>
|
||||
#endif
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
#if defined(XP_MACOSX) && defined(USE_MACH_DYLD)
|
||||
#include <CodeFragments.h>
|
||||
#include <TextUtils.h>
|
||||
#include <Types.h>
|
||||
|
@ -155,8 +155,8 @@ struct _imcb *IAC$GL_IMAGE_LIST = NULL;
|
|||
/*
|
||||
* On these platforms, symbols have a leading '_'.
|
||||
*/
|
||||
#if defined(SUNOS4) || defined(DARWIN) || defined(NEXTSTEP) \
|
||||
|| defined(WIN16) || defined(XP_OS2) \
|
||||
#if defined(SUNOS4) || (defined(DARWIN) && defined(USE_MACH_DYLD)) \
|
||||
|| defined(NEXTSTEP) || defined(WIN16) || defined(XP_OS2) \
|
||||
|| ((defined(OPENBSD) || defined(NETBSD)) && !defined(__ELF__))
|
||||
#define NEED_LEADING_UNDERSCORE
|
||||
#endif
|
||||
|
@ -179,7 +179,7 @@ struct PRLibrary {
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
#if defined(XP_MACOSX) && defined(USE_MACH_DYLD)
|
||||
CFragConnectionID connection;
|
||||
CFBundleRef bundle;
|
||||
Ptr main;
|
||||
|
@ -223,15 +223,7 @@ static int pr_ConvertUTF16toUTF8(LPCWSTR wname, LPSTR name, int len);
|
|||
/************************************************************************/
|
||||
|
||||
#if !defined(USE_DLFCN) && !defined(HAVE_STRERROR)
|
||||
static char* errStrBuf = NULL;
|
||||
#define ERR_STR_BUF_LENGTH 20
|
||||
static char* errno_string(PRIntn oserr)
|
||||
{
|
||||
if (errStrBuf == NULL)
|
||||
errStrBuf = PR_MALLOC(ERR_STR_BUF_LENGTH);
|
||||
PR_snprintf(errStrBuf, ERR_STR_BUF_LENGTH, "error %d", oserr);
|
||||
return errStrBuf;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void DLLErrorInternal(PRIntn oserr)
|
||||
|
@ -247,7 +239,9 @@ static void DLLErrorInternal(PRIntn oserr)
|
|||
#elif defined(HAVE_STRERROR)
|
||||
error = strerror(oserr); /* this should be okay */
|
||||
#else
|
||||
error = errno_string(oserr);
|
||||
char errStrBuf[ERR_STR_BUF_LENGTH];
|
||||
PR_snprintf(errStrBuf, sizeof(errStrBuf), "error %d", oserr);
|
||||
error = errStrBuf;
|
||||
#endif
|
||||
if (NULL != error)
|
||||
PR_SetErrorText(strlen(error), error);
|
||||
|
@ -382,10 +376,6 @@ void _PR_ShutdownLinker(void)
|
|||
free(_pr_currentLibPath);
|
||||
_pr_currentLibPath = NULL;
|
||||
}
|
||||
|
||||
#if !defined(USE_DLFCN) && !defined(HAVE_STRERROR)
|
||||
PR_DELETE(errStrBuf);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -629,7 +619,7 @@ pr_LoadMachDyldModule(const char *name)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
#if defined(XP_MACOSX) && defined(USE_MACH_DYLD)
|
||||
|
||||
/*
|
||||
** macLibraryLoadProc is a function definition for a Mac shared library
|
||||
|
@ -788,7 +778,7 @@ pr_LoadViaDyld(const char *name, PRLibrary *lm)
|
|||
return (lm->dlh != NULL || lm->image != NULL) ? PR_SUCCESS : PR_FAILURE;
|
||||
}
|
||||
|
||||
#endif /* XP_MACOSX */
|
||||
#endif /* XP_MACOSX && USE_MACH_DYLD */
|
||||
|
||||
#ifdef WIN95
|
||||
static HMODULE WINAPI
|
||||
|
@ -926,7 +916,7 @@ pr_LoadLibraryByPathname(const char *name, PRIntn flags)
|
|||
}
|
||||
#endif /* WIN32 || WIN16 */
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
#if defined(XP_MACOSX) && defined(USE_MACH_DYLD)
|
||||
{
|
||||
int i;
|
||||
PRStatus status;
|
||||
|
@ -954,7 +944,7 @@ pr_LoadLibraryByPathname(const char *name, PRIntn flags)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(XP_UNIX) && !defined(XP_MACOSX)
|
||||
#if defined(XP_UNIX) && !(defined(XP_MACOSX) && defined(USE_MACH_DYLD))
|
||||
#ifdef HAVE_DLL
|
||||
{
|
||||
#if defined(USE_DLFCN)
|
||||
|
@ -1018,7 +1008,7 @@ pr_LoadLibraryByPathname(const char *name, PRIntn flags)
|
|||
pr_loadmap = lm;
|
||||
}
|
||||
#endif /* HAVE_DLL */
|
||||
#endif /* XP_UNIX */
|
||||
#endif /* XP_UNIX && !(XP_MACOSX && USE_MACH_DYLD) */
|
||||
|
||||
lm->refCount = 1;
|
||||
|
||||
|
@ -1299,7 +1289,7 @@ PR_UnloadLibrary(PRLibrary *lib)
|
|||
}
|
||||
#endif /* XP_PC */
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
#if defined(XP_MACOSX) && defined(USE_MACH_DYLD)
|
||||
/* Close the connection */
|
||||
if (lib->connection)
|
||||
CloseConnection(&(lib->connection));
|
||||
|
@ -1398,7 +1388,7 @@ pr_FindSymbolInLib(PRLibrary *lm, const char *name)
|
|||
f = GetProcAddress(lm->dlh, name);
|
||||
#endif /* WIN32 || WIN16 */
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
#if defined(XP_MACOSX) && defined(USE_MACH_DYLD)
|
||||
/* add this offset to skip the leading underscore in name */
|
||||
#define SYM_OFFSET 1
|
||||
if (lm->bundle) {
|
||||
|
@ -1439,7 +1429,7 @@ pr_FindSymbolInLib(PRLibrary *lm, const char *name)
|
|||
f = NULL;
|
||||
}
|
||||
#undef SYM_OFFSET
|
||||
#endif /* XP_MACOSX */
|
||||
#endif /* XP_MACOSX && USE_MACH_DYLD */
|
||||
|
||||
#ifdef XP_BEOS
|
||||
if( B_NO_ERROR != get_image_symbol( (image_id)lm->dlh, name, B_SYMBOL_TYPE_TEXT, &f ) ) {
|
||||
|
@ -1627,7 +1617,8 @@ PR_IMPLEMENT(char *)
|
|||
PR_GetLibraryFilePathname(const char *name, PRFuncPtr addr)
|
||||
{
|
||||
#if defined(USE_DLFCN) && (defined(SOLARIS) || defined(FREEBSD) \
|
||||
|| defined(LINUX) || defined(__GNU__) || defined(__GLIBC__))
|
||||
|| defined(LINUX) || defined(__GNU__) || defined(__GLIBC__) \
|
||||
|| defined(DARWIN))
|
||||
Dl_info dli;
|
||||
char *result;
|
||||
|
||||
|
|
|
@ -42,15 +42,34 @@
|
|||
|
||||
#include "primpl.h"
|
||||
|
||||
#ifdef WINCE
|
||||
typedef DWORD (*IntervalFuncType)(void);
|
||||
static IntervalFuncType intervalFunc;
|
||||
#endif
|
||||
|
||||
void
|
||||
_PR_MD_INTERVAL_INIT()
|
||||
{
|
||||
#ifdef WINCE
|
||||
HMODULE mmtimerlib = LoadLibraryW(L"mmtimer.dll"); /* XXX leaked! */
|
||||
if (mmtimerlib) {
|
||||
intervalFunc = (IntervalFuncType)GetProcAddress(mmtimerlib,
|
||||
"timeGetTime");
|
||||
} else {
|
||||
intervalFunc = &GetTickCount;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
PRIntervalTime
|
||||
_PR_MD_GET_INTERVAL()
|
||||
{
|
||||
return timeGetTime(); /* milliseconds since system start */
|
||||
/* milliseconds since system start */
|
||||
#ifdef WINCE
|
||||
return (*intervalFunc)();
|
||||
#else
|
||||
return timeGetTime();
|
||||
#endif
|
||||
}
|
||||
|
||||
PRIntervalTime
|
||||
|
|
|
@ -247,6 +247,12 @@ PRInt32 _PR_MD_PR_POLL(PRPollDesc *pds, PRIntn npds, PRIntervalTime timeout)
|
|||
|
||||
if (0 != ready) return ready; /* no need to block */
|
||||
|
||||
/*
|
||||
* FD_SET does nothing if the fd_set's internal fd_array is full. If
|
||||
* nrd, nwt, or nex is greater than FD_SETSIZE, we know FD_SET must
|
||||
* have failed to insert an osfd into the corresponding fd_set, and
|
||||
* therefore we should fail.
|
||||
*/
|
||||
if ((nrd > FD_SETSIZE) || (nwt > FD_SETSIZE) || (nex > FD_SETSIZE)) {
|
||||
PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0);
|
||||
return -1;
|
||||
|
|
|
@ -812,7 +812,7 @@ PR_IMPLEMENT(PRStatus) PR_DeleteSemaphore(const char *name)
|
|||
*/
|
||||
#if (defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED)) \
|
||||
|| defined(FREEBSD) || defined(OPENBSD) || defined(BSDI) \
|
||||
|| defined(SYMBIAN)
|
||||
|| defined(DARWIN) || defined(SYMBIAN)
|
||||
/* union semun is defined by including <sys/sem.h> */
|
||||
#else
|
||||
/* according to X/OPEN we have to define it ourselves */
|
||||
|
|
|
@ -121,18 +121,27 @@ $lprog = shift;
|
|||
}
|
||||
|
||||
sub print_end {
|
||||
$lprog = shift;
|
||||
$lstatus = shift;
|
||||
($lprog, $exit_status, $exit_signal, $exit_core) = @_;
|
||||
|
||||
if ($lstatus == 0) {
|
||||
if (($exit_status == 0) && ($exit_signal == 0) && ($exit_core == 0)) {
|
||||
$str_status = "Passed";
|
||||
} else {
|
||||
$str_status = "FAILED";
|
||||
}
|
||||
if ($exit_signal != 0) {
|
||||
$str_signal = " - signal $exit_signal";
|
||||
} else {
|
||||
$str_signal = "";
|
||||
}
|
||||
if ($exit_core != 0) {
|
||||
$str_core = " - core dumped";
|
||||
} else {
|
||||
$str_core = "";
|
||||
}
|
||||
$now = getTime;
|
||||
# Full output
|
||||
print "\nEND TEST: $lprog ($now)\n";
|
||||
print "TEST STATUS: $lprog = $str_status (errno $lstatus)\n";
|
||||
print "TEST STATUS: $lprog = $str_status (exit status " . $exit_status . $str_signal . $str_core . ")\n";
|
||||
print "--------------------------------------------------\n\n";
|
||||
# Summary output
|
||||
print OF "\t\t\t$str_status\n";
|
||||
|
@ -147,6 +156,9 @@ $lprog = shift; # command to run
|
|||
setsid or die "setsid failed: $!";
|
||||
# Start test program
|
||||
exec("./$lprog");
|
||||
# We should not be here unless exec failed.
|
||||
print "Faild to exec $lprog";
|
||||
exit 1 << 8;
|
||||
}
|
||||
|
||||
sub ux_wait_timeout {
|
||||
|
@ -171,7 +183,7 @@ $ltimeout = shift; # timeout
|
|||
$ltimeout--;
|
||||
} else {
|
||||
# Child has ended
|
||||
$lstatus = $? % 256;
|
||||
$lstatus = $?;
|
||||
# Exit the wait loop and don't kill
|
||||
$ltimeout = -1;
|
||||
}
|
||||
|
@ -183,7 +195,7 @@ $ltimeout = shift; # timeout
|
|||
print "Timeout ! Kill child process $lpid\n";
|
||||
# Kill the child process and group
|
||||
kill(-9,$lpid);
|
||||
$lstatus = 1;
|
||||
$lstatus = 9;
|
||||
}
|
||||
|
||||
return $lstatus;
|
||||
|
@ -201,7 +213,11 @@ $prog = shift; # Program to test
|
|||
} else {
|
||||
# we are in the parent process
|
||||
$status = ux_wait_timeout($child_pid,$timeout);
|
||||
print_end($prog, $status);
|
||||
# See Perlvar for documentation of $?
|
||||
# exit status = $status >> 8
|
||||
# exit signal = $status & 127 (no signal = 0)
|
||||
# core dump = $status & 128 (no core = 0)
|
||||
print_end($prog, $status >> 8, $status & 127, $status & 128);
|
||||
}
|
||||
|
||||
return $status;
|
||||
|
@ -246,12 +262,13 @@ $prog = shift; # Program to test
|
|||
if ( $retwait == 0) {
|
||||
# the prog didn't finish after the timeout: kill
|
||||
$ProcessObj->Kill($status);
|
||||
print "Timeout ! Process killed with error code $status\n";
|
||||
print "Timeout ! Process killed with exit status $status\n";
|
||||
} else {
|
||||
# the prog finished before the timeout: get exit code
|
||||
# the prog finished before the timeout: get exit status
|
||||
$ProcessObj->GetExitCode($status);
|
||||
}
|
||||
print_end($prog,$status);
|
||||
# There is no signal, no core on Windows
|
||||
print_end($prog, $status, 0, 0);
|
||||
|
||||
return $status
|
||||
}
|
||||
|
@ -373,7 +390,6 @@ $prog = shift; # Program to test
|
|||
open_log;
|
||||
|
||||
foreach $current_prog (@progs) {
|
||||
# print "Current_prog=$current_prog\n";
|
||||
if ($osname =~ $WINOS) {
|
||||
win_test_prog($current_prog);
|
||||
} else {
|
||||
|
|
|
@ -52,9 +52,10 @@
|
|||
#include <stdlib.h>
|
||||
|
||||
/*
|
||||
* This release (4.7.2) is backward compatible with the
|
||||
* 4.0.x, 4.1.x, 4.2.x, 4.3.x, 4.4.x, 4.5.x, 4.6.x, 4.7, and
|
||||
* 4.7.1 releases. It, of course, is compatible with itself.
|
||||
* This release (4.7.4) is backward compatible with the
|
||||
* 4.0.x, 4.1.x, 4.2.x, 4.3.x, 4.4.x, 4.5.x, 4.6.x, 4.7,
|
||||
* 4.7.1, 4.7.2, and 4.7.3 releases. It, of course, is
|
||||
* compatible with itself.
|
||||
*/
|
||||
static char *compatible_version[] = {
|
||||
"4.0", "4.0.1", "4.1", "4.1.1", "4.1.2", "4.1.3",
|
||||
|
@ -62,7 +63,7 @@ static char *compatible_version[] = {
|
|||
"4.5", "4.5.1",
|
||||
"4.6", "4.6.1", "4.6.2", "4.6.3", "4.6.4", "4.6.5",
|
||||
"4.6.6", "4.6.7", "4.6.8",
|
||||
"4.7", "4.7.1", PR_VERSION
|
||||
"4.7", "4.7.1", "4.7.2", "4.7.3", PR_VERSION
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
Загрузка…
Ссылка в новой задаче