зеркало из https://github.com/mozilla/pjs.git
update nspr to 4.8.4 beta 1 r=ted, wtc
This commit is contained in:
Родитель
811b9b2f7d
Коммит
2eb8f86002
|
@ -3373,7 +3373,7 @@ EOF
|
|||
PR_MD_ASFILES=os_Darwin.s
|
||||
|
||||
# Add Mac OS X support for loading CFM & CFBundle plugins
|
||||
if test -f /System/Library/Frameworks/Carbon.framework/Carbon; then
|
||||
if test -f "${MACOS_SDK_DIR}/System/Library/Frameworks/Carbon.framework/Carbon"; then
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define XP_MACOSX 1
|
||||
EOF
|
||||
|
@ -4130,10 +4130,6 @@ EOF
|
|||
if test -n "$USE_64"; then
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define _AMD64_ 1
|
||||
EOF
|
||||
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define _M_AMD64 1
|
||||
EOF
|
||||
|
||||
else
|
||||
|
@ -4142,26 +4138,10 @@ EOF
|
|||
EOF
|
||||
|
||||
fi
|
||||
;;
|
||||
alpha)
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define _ALPHA_ 1
|
||||
EOF
|
||||
|
||||
;;
|
||||
mips)
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define _MIPS_ 1
|
||||
EOF
|
||||
|
||||
;;
|
||||
x86_64)
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define _AMD64_ 1
|
||||
EOF
|
||||
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define _M_AMD64 1
|
||||
EOF
|
||||
|
||||
USE_64=1
|
||||
|
@ -4169,10 +4149,6 @@ EOF
|
|||
ia64)
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define _IA64_ 1
|
||||
EOF
|
||||
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define _M_IA64 1
|
||||
EOF
|
||||
|
||||
USE_64=1
|
||||
|
@ -4184,14 +4160,6 @@ EOF
|
|||
|
||||
;;
|
||||
esac
|
||||
|
||||
if test "$USE_64"; then
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define _WIN64 1
|
||||
EOF
|
||||
|
||||
fi
|
||||
|
||||
;;
|
||||
|
||||
*-wince*|*-winmo*)
|
||||
|
@ -4508,17 +4476,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:4512: checking for machine/builtins.h" >&5
|
||||
echo "configure:4480: 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 4517 "configure"
|
||||
#line 4485 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <machine/builtins.h>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:4522: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:4490: \"$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*
|
||||
|
@ -5167,7 +5135,7 @@ case $target in
|
|||
;;
|
||||
*)
|
||||
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
|
||||
echo "configure:5171: checking for dlopen in -ldl" >&5
|
||||
echo "configure:5139: 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
|
||||
|
@ -5175,7 +5143,7 @@ else
|
|||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-ldl $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 5179 "configure"
|
||||
#line 5147 "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
|
||||
|
@ -5186,7 +5154,7 @@ int main() {
|
|||
dlopen()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:5190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:5158: \"$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
|
||||
|
@ -5203,17 +5171,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:5207: checking for dlfcn.h" >&5
|
||||
echo "configure:5175: 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 5212 "configure"
|
||||
#line 5180 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <dlfcn.h>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:5217: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:5185: \"$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*
|
||||
|
@ -5246,13 +5214,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:5250: checking whether ${CC-cc} needs -traditional" >&5
|
||||
echo "configure:5218: 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 5256 "configure"
|
||||
#line 5224 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sgtty.h>
|
||||
Autoconf TIOCGETP
|
||||
|
@ -5270,7 +5238,7 @@ rm -f conftest*
|
|||
|
||||
if test $ac_cv_prog_gcc_traditional = no; then
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 5274 "configure"
|
||||
#line 5242 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <termio.h>
|
||||
Autoconf TCGETA
|
||||
|
@ -5294,12 +5262,12 @@ fi
|
|||
for ac_func in lchown strerror
|
||||
do
|
||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||
echo "configure:5298: checking for $ac_func" >&5
|
||||
echo "configure:5266: 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 5303 "configure"
|
||||
#line 5271 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char $ac_func(); below. */
|
||||
|
@ -5322,7 +5290,7 @@ $ac_func();
|
|||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:5326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:5294: \"$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
|
||||
|
@ -5363,7 +5331,7 @@ hpux*)
|
|||
if test -z "$GNU_CC"; then
|
||||
|
||||
echo $ac_n "checking for +Olit support""... $ac_c" 1>&6
|
||||
echo "configure:5367: checking for +Olit support" >&5
|
||||
echo "configure:5335: 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
|
||||
|
@ -5402,7 +5370,7 @@ darwin*)
|
|||
*)
|
||||
|
||||
echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
|
||||
echo "configure:5406: checking for pthread_create in -lpthreads" >&5
|
||||
echo "configure:5374: checking for pthread_create in -lpthreads" >&5
|
||||
echo "
|
||||
#include <pthread.h>
|
||||
void *foo(void *v) { return v; }
|
||||
|
@ -5424,7 +5392,7 @@ echo "
|
|||
echo "$ac_t""no" 1>&6
|
||||
|
||||
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
|
||||
echo "configure:5428: checking for pthread_create in -lpthread" >&5
|
||||
echo "configure:5396: checking for pthread_create in -lpthread" >&5
|
||||
echo "
|
||||
#include <pthread.h>
|
||||
void *foo(void *v) { return v; }
|
||||
|
@ -5446,7 +5414,7 @@ echo "
|
|||
echo "$ac_t""no" 1>&6
|
||||
|
||||
echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
|
||||
echo "configure:5450: checking for pthread_create in -lc_r" >&5
|
||||
echo "configure:5418: checking for pthread_create in -lc_r" >&5
|
||||
echo "
|
||||
#include <pthread.h>
|
||||
void *foo(void *v) { return v; }
|
||||
|
@ -5468,7 +5436,7 @@ echo "
|
|||
echo "$ac_t""no" 1>&6
|
||||
|
||||
echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
|
||||
echo "configure:5472: checking for pthread_create in -lc" >&5
|
||||
echo "configure:5440: checking for pthread_create in -lc" >&5
|
||||
echo "
|
||||
#include <pthread.h>
|
||||
void *foo(void *v) { return v; }
|
||||
|
@ -5600,7 +5568,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:5604: checking whether ${CC-cc} accepts -pthread" >&5
|
||||
echo "configure:5572: 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
|
||||
|
@ -5623,7 +5591,7 @@ echo "configure:5604: 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:5627: checking whether ${CC-cc} accepts -pthreads" >&5
|
||||
echo "configure:5595: 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
|
||||
|
|
|
@ -1013,7 +1013,7 @@ case "$target" in
|
|||
PR_MD_ASFILES=os_Darwin.s
|
||||
|
||||
# Add Mac OS X support for loading CFM & CFBundle plugins
|
||||
if test -f /System/Library/Frameworks/Carbon.framework/Carbon; then
|
||||
if test -f "${MACOS_SDK_DIR}/System/Library/Frameworks/Carbon.framework/Carbon"; then
|
||||
AC_DEFINE(XP_MACOSX)
|
||||
OS_TARGET=MacOSX
|
||||
|
||||
|
@ -1626,36 +1626,22 @@ tools are selected during the Xcode/Developer Tools installation.])
|
|||
i*86)
|
||||
if test -n "$USE_64"; then
|
||||
AC_DEFINE(_AMD64_)
|
||||
AC_DEFINE(_M_AMD64)
|
||||
else
|
||||
AC_DEFINE(_X86_)
|
||||
fi
|
||||
;;
|
||||
alpha)
|
||||
AC_DEFINE(_ALPHA_)
|
||||
;;
|
||||
mips)
|
||||
AC_DEFINE(_MIPS_)
|
||||
;;
|
||||
x86_64)
|
||||
AC_DEFINE(_AMD64_)
|
||||
AC_DEFINE(_M_AMD64)
|
||||
USE_64=1
|
||||
;;
|
||||
ia64)
|
||||
AC_DEFINE(_IA64_)
|
||||
AC_DEFINE(_M_IA64)
|
||||
USE_64=1
|
||||
;;
|
||||
*)
|
||||
AC_DEFINE(_CPU_ARCH_NOT_DEFINED)
|
||||
;;
|
||||
esac
|
||||
|
||||
if test "$USE_64"; then
|
||||
AC_DEFINE(_WIN64)
|
||||
fi
|
||||
|
||||
;;
|
||||
|
||||
*-wince*|*-winmo*)
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
#
|
||||
# This is a list of local files which get copied to the mozilla:dist directory
|
||||
#
|
||||
|
||||
plarenas.h
|
||||
plarena.h
|
||||
plhash.h
|
|
@ -1,9 +0,0 @@
|
|||
#
|
||||
# This is a list of local files which get copied to the mozilla:dist directory
|
||||
#
|
||||
|
||||
plbase64.h
|
||||
plerror.h
|
||||
plgetopt.h
|
||||
plresolv.h
|
||||
plstr.h
|
|
@ -1,108 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998-2000
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/*
|
||||
* plresolv.h - asynchronous name resolution using DNS
|
||||
*/
|
||||
|
||||
#ifndef _PLRESOLV_H_
|
||||
#define _PLRESOLV_H_
|
||||
|
||||
/*
|
||||
** THIS IS WORK IN PROGRESS. DO NOT ATTEMPT TO USE ANY PORTION OF THIS
|
||||
** API UNTIL THIS MESSAGE NO LONGER EXISTS. IF YOU DO, THEN YOU SURRENDER
|
||||
** THE RIGHT TO COMPLAIN ABOUT ANY CONTENT.
|
||||
*/
|
||||
|
||||
#if defined(XP_UNIX)
|
||||
|
||||
#include <prtypes.h>
|
||||
#include <prnetdb.h>
|
||||
|
||||
NSPR_BEGIN_EXTERN_C
|
||||
|
||||
#define PL_RESOLVE_MAXHOSTENTBUF 1024
|
||||
#define PL_RESOLVE_DEFAULT_TIMEOUT 0
|
||||
|
||||
/* Error return codes */
|
||||
#define PL_RESOLVE_OK 0
|
||||
#define PL_RESOLVE_EWINIT 1 /* Failed to initialize window */
|
||||
#define PL_RESOLVE_EMAKE 2 /* Failed to create request */
|
||||
#define PL_RESOLVE_ELAUNCH 3 /* Error launching Async request */
|
||||
#define PL_RESOLVE_ETIMEDOUT 4 /* Request timed-out */
|
||||
#define PL_RESOLVE_EINVAL 5 /* Invalid argument */
|
||||
#define PL_RESOLVE_EOVERFLOW 6 /* Buffer Overflow */
|
||||
#define PL_RESOLVE_EUNKNOWN 7 /* berserk error */
|
||||
|
||||
/* ----------- Function Prototypes ----------------*/
|
||||
|
||||
PR_EXTERN(PRStatus) PL_ResolveName(
|
||||
const char *name, unsigned char *buf,
|
||||
PRIntn bufsize, PRIntervalTime timeout,
|
||||
PRHostEnt *hostentry, PRIntervalTime *ttl);
|
||||
|
||||
PR_EXTERN(PRStatus) PL_ResolveAddr(
|
||||
const PRNetAddr *address, unsigned char *buf,
|
||||
PRIntn bufsize, PRIntervalTime timeout,
|
||||
PRHostEnt *hostentry, PRIntervalTime *ttl);
|
||||
|
||||
typedef struct PLResolveStats {
|
||||
int re_errors;
|
||||
int re_nu_look;
|
||||
int re_na_look;
|
||||
int re_replies;
|
||||
int re_requests;
|
||||
int re_resends;
|
||||
int re_sent;
|
||||
int re_timeouts;
|
||||
} PLResolveStats;
|
||||
|
||||
typedef struct PLResoveInfo {
|
||||
PRBool enabled;
|
||||
PRUint32 numNameLookups;
|
||||
PRUint32 numAddrLookups;
|
||||
PRUint32 numLookupsInProgress;
|
||||
PLResolveStats stats;
|
||||
} PLResoveInfo;
|
||||
|
||||
PR_EXTERN(void) PL_ResolveInfo(PLResoveInfo *info);
|
||||
|
||||
NSPR_END_EXTERN_C
|
||||
|
||||
#endif /* defined(XP_UNIX) */
|
||||
|
||||
#endif /* _PLRESOLV_H_ */
|
|
@ -1,5 +0,0 @@
|
|||
#
|
||||
# This is a list of local files which get copied to the mozilla:dist directory
|
||||
#
|
||||
|
||||
prgc.h
|
|
@ -38,7 +38,7 @@
|
|||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
#
|
||||
#ident "$Id: prototype,v 1.5 2008/10/20 22:38:46 christophe.ravel.bugs%sun.com Exp $"
|
||||
#ident "$Id: prototype,v 1.6 2010/01/27 22:20:40 wtc%google.com Exp $"
|
||||
#
|
||||
# This required package information file contains a list of package contents.
|
||||
# The 'pkgmk' command uses this file to identify the contents of a package
|
||||
|
@ -118,5 +118,4 @@ f none usr/include/mps/plbase64.h 0644 root bin
|
|||
f none usr/include/mps/plerror.h 0644 root bin
|
||||
f none usr/include/mps/plgetopt.h 0644 root bin
|
||||
f none usr/include/mps/plhash.h 0644 root bin
|
||||
f none usr/include/mps/plresolv.h 0644 root bin
|
||||
f none usr/include/mps/plstr.h 0644 root bin
|
||||
|
|
|
@ -1,52 +0,0 @@
|
|||
#
|
||||
# This is a list of local files which get copied to the mozilla:dist directory
|
||||
#
|
||||
|
||||
nspr.h
|
||||
pratom.h
|
||||
prbit.h
|
||||
prclist.h
|
||||
prcmon.h
|
||||
prcountr.h
|
||||
prcvar.h
|
||||
prdtoa.h
|
||||
prenv.h
|
||||
prerr.h
|
||||
prerror.h
|
||||
prinet.h
|
||||
prinit.h
|
||||
prinrval.h
|
||||
prio.h
|
||||
pripcsem.h
|
||||
prlink.h
|
||||
prlock.h
|
||||
prlog.h
|
||||
prlong.h
|
||||
prmem.h
|
||||
prmon.h
|
||||
prmwait.h
|
||||
prnetdb.h
|
||||
prolock.h
|
||||
prpdce.h
|
||||
prprf.h
|
||||
prproces.h
|
||||
prrng.h
|
||||
prrwlock.h
|
||||
prshm.h
|
||||
prshma.h
|
||||
prsystem.h
|
||||
prthread.h
|
||||
prtime.h
|
||||
prtpool.h
|
||||
prtrace.h
|
||||
prtypes.h
|
||||
prvrsion.h
|
||||
prwin16.h
|
||||
|
||||
obsolete/protypes.h
|
||||
obsolete/prsem.h
|
||||
obsolete/probslet.h
|
||||
|
||||
private/prpriv.h
|
||||
private/pprio.h
|
||||
private/pprthred.h
|
|
@ -77,8 +77,10 @@
|
|||
#ifdef _PR_INET6
|
||||
#define _PR_HAVE_INET_NTOP
|
||||
#define _PR_HAVE_GETHOSTBYNAME2
|
||||
#ifdef _AIX51 /* AIX 4.3.3 does not have AI_NUMERICHOST. */
|
||||
#define _PR_HAVE_GETADDRINFO
|
||||
#endif
|
||||
#endif
|
||||
#define _PR_HAVE_SYSV_SEMAPHORES
|
||||
#define PR_HAVE_SYSV_NAMED_SHARED_MEMORY
|
||||
#define _PR_ACCEPT_INHERIT_NONBLOCK
|
||||
|
|
|
@ -106,51 +106,7 @@
|
|||
#define PR_BYTES_PER_WORD_LOG2 2
|
||||
#define PR_BYTES_PER_DWORD_LOG2 3
|
||||
|
||||
#elif defined(_ALPHA_)
|
||||
|
||||
#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_DOUBLE 8
|
||||
#define PR_BYTES_PER_WORD 4
|
||||
#define PR_BYTES_PER_DWORD 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_DOUBLE 64
|
||||
#define PR_BITS_PER_WORD 32
|
||||
|
||||
#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_DOUBLE_LOG2 6
|
||||
#define PR_BITS_PER_WORD_LOG2 5
|
||||
|
||||
#define PR_BYTES_PER_WORD_LOG2 2
|
||||
#define PR_BYTES_PER_DWORD_LOG2 3
|
||||
|
||||
#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_DOUBLE 8
|
||||
#define PR_ALIGN_OF_POINTER 4
|
||||
|
||||
#elif defined(_AMD64_)
|
||||
#elif defined(_M_X64) || defined(_M_AMD64) || defined(_AMD64_)
|
||||
|
||||
#define IS_LITTLE_ENDIAN 1
|
||||
#undef IS_BIG_ENDIAN
|
||||
|
@ -199,7 +155,7 @@
|
|||
#define PR_BYTES_PER_WORD_LOG2 3
|
||||
#define PR_BYTES_PER_DWORD_LOG2 3
|
||||
|
||||
#elif defined(_IA64_)
|
||||
#elif defined(_M_IA64) || defined(_IA64_)
|
||||
|
||||
#define IS_LITTLE_ENDIAN 1
|
||||
#undef IS_BIG_ENDIAN
|
||||
|
@ -248,7 +204,7 @@
|
|||
#define PR_BYTES_PER_WORD_LOG2 3
|
||||
#define PR_BYTES_PER_DWORD_LOG2 3
|
||||
|
||||
#elif defined(_ARM_)
|
||||
#elif defined(_M_ARM) || defined(_ARM_)
|
||||
|
||||
#define IS_LITTLE_ENDIAN 1
|
||||
#undef IS_BIG_ENDIAN
|
||||
|
|
|
@ -52,11 +52,11 @@
|
|||
#define _PR_SI_SYSNAME "WIN95"
|
||||
#if defined(_M_IX86) || defined(_X86_)
|
||||
#define _PR_SI_ARCHITECTURE "x86"
|
||||
#elif defined(_AMD64_)
|
||||
#elif defined(_M_X64) || defined(_M_AMD64) || defined(_AMD64_)
|
||||
#define _PR_SI_ARCHITECTURE "x86-64"
|
||||
#elif defined(_IA64_)
|
||||
#elif defined(_M_IA64) || defined(_IA64_)
|
||||
#define _PR_SI_ARCHITECTURE "ia64"
|
||||
#elif defined(_ARM_)
|
||||
#elif defined(_M_ARM) || defined(_ARM_)
|
||||
#define _PR_SI_ARCHITECTURE "arm"
|
||||
#else
|
||||
#error unknown processor architecture
|
||||
|
|
|
@ -100,51 +100,7 @@
|
|||
#define PR_BYTES_PER_WORD_LOG2 2
|
||||
#define PR_BYTES_PER_DWORD_LOG2 2
|
||||
|
||||
#elif defined(_ALPHA_)
|
||||
|
||||
#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_DOUBLE 8
|
||||
#define PR_BYTES_PER_WORD 4
|
||||
#define PR_BYTES_PER_DWORD 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_DOUBLE 64
|
||||
#define PR_BITS_PER_WORD 32
|
||||
|
||||
#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_DOUBLE_LOG2 6
|
||||
#define PR_BITS_PER_WORD_LOG2 5
|
||||
|
||||
#define PR_BYTES_PER_WORD_LOG2 2
|
||||
#define PR_BYTES_PER_DWORD_LOG2 3
|
||||
|
||||
#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_DOUBLE 8
|
||||
#define PR_ALIGN_OF_POINTER 4
|
||||
|
||||
#elif defined(_AMD64_)
|
||||
#elif defined(_M_X64) || defined(_M_AMD64) || defined(_AMD64_)
|
||||
|
||||
#define IS_LITTLE_ENDIAN 1
|
||||
#undef IS_BIG_ENDIAN
|
||||
|
@ -193,7 +149,7 @@
|
|||
#define PR_BYTES_PER_WORD_LOG2 3
|
||||
#define PR_BYTES_PER_DWORD_LOG2 3
|
||||
|
||||
#elif defined(_IA64_)
|
||||
#elif defined(_M_IA64) || defined(_IA64_)
|
||||
|
||||
#define IS_LITTLE_ENDIAN 1
|
||||
#undef IS_BIG_ENDIAN
|
||||
|
|
|
@ -66,9 +66,9 @@
|
|||
#define _PR_SI_SYSNAME "WINNT"
|
||||
#if defined(_M_IX86) || defined(_X86_)
|
||||
#define _PR_SI_ARCHITECTURE "x86"
|
||||
#elif defined(_AMD64_)
|
||||
#elif defined(_M_X64) || defined(_M_AMD64) || defined(_AMD64_)
|
||||
#define _PR_SI_ARCHITECTURE "x86-64"
|
||||
#elif defined(_IA64_)
|
||||
#elif defined(_M_IA64) || defined(_IA64_)
|
||||
#define _PR_SI_ARCHITECTURE "ia64"
|
||||
#else
|
||||
#error unknown processor architecture
|
||||
|
|
|
@ -189,6 +189,8 @@ NSPR_API(void) PR_LogPrint(const char *fmt, ...);
|
|||
*/
|
||||
NSPR_API(void) PR_LogFlush(void);
|
||||
|
||||
NSPR_API(void) PR_Assert(const char *s, const char *file, PRIntn ln);
|
||||
|
||||
#if defined(DEBUG) || defined(FORCE_PR_LOG)
|
||||
#define PR_LOGGING 1
|
||||
|
||||
|
@ -233,7 +235,6 @@ NSPR_API(void) PR_LogFlush(void);
|
|||
|
||||
#if defined(DEBUG) || defined(FORCE_PR_ASSERT)
|
||||
|
||||
NSPR_API(void) PR_Assert(const char *s, const char *file, PRIntn ln);
|
||||
#define PR_ASSERT(_expr) \
|
||||
((_expr)?((void)0):PR_Assert(# _expr,__FILE__,__LINE__))
|
||||
|
||||
|
|
|
@ -74,6 +74,9 @@
|
|||
#endif
|
||||
#ifdef AIX
|
||||
#include <sys/ldr.h>
|
||||
#ifndef L_IGNOREUNLOAD /* AIX 4.3.3 does not have L_IGNOREUNLOAD. */
|
||||
#define L_IGNOREUNLOAD 0x10000000
|
||||
#endif
|
||||
#endif
|
||||
#ifdef OSF1
|
||||
#include <loader.h>
|
||||
|
|
|
@ -72,7 +72,7 @@ typedef enum _WSA_COMPATIBILITY_BEHAVIOR_ID {
|
|||
} WSA_COMPATIBILITY_BEHAVIOR_ID, *PWSA_COMPATIBILITY_BEHAVIOR_ID;
|
||||
|
||||
/* from sdkddkver.h */
|
||||
#define NTDDI_LONGHORN 0x06000000
|
||||
#define NTDDI_WIN6 0x06000000 /* Windows Vista */
|
||||
|
||||
/* from winsock2.h */
|
||||
#define WSAEVENT HANDLE
|
||||
|
@ -175,7 +175,7 @@ _PR_MD_SOCKET(int af, int type, int flags)
|
|||
int ret_dummy;
|
||||
|
||||
mode.BehaviorId = WsaBehaviorAutoTuning;
|
||||
mode.TargetOsVersion = NTDDI_LONGHORN;
|
||||
mode.TargetOsVersion = NTDDI_WIN6;
|
||||
if (wsaioctlProc(sock, SIO_SET_COMPATIBILITY_MODE,
|
||||
(char *)&mode, sizeof(mode),
|
||||
dummy, 4, &ret_dummy, 0, NULL) == SOCKET_ERROR)
|
||||
|
|
|
@ -2084,7 +2084,7 @@ gethex( CONST char **sp, U *rvp, int rounding, int sign)
|
|||
#endif
|
||||
Bfree(b);
|
||||
}
|
||||
#endif /*}!NO_HEX_FP*/
|
||||
#endif /*!NO_HEX_FP}*/
|
||||
|
||||
static int
|
||||
#ifdef KR_headers
|
||||
|
@ -2131,7 +2131,13 @@ quorem
|
|||
bxe = bx + n;
|
||||
q = *bxe / (*sxe + 1); /* ensure q <= true quotient */
|
||||
#ifdef DEBUG
|
||||
#ifdef NO_STRTOD_BIGCOMP
|
||||
/*debug*/ if (q > 9)
|
||||
#else
|
||||
/* An oversized q is possible when quorem is called from bigcomp and */
|
||||
/* the input is near, e.g., twice the smallest denormalized number. */
|
||||
/*debug*/ if (q > 15)
|
||||
#endif
|
||||
/*debug*/ Bug("oversized quotient in quorem");
|
||||
#endif
|
||||
if (q) {
|
||||
|
@ -2217,8 +2223,29 @@ quorem
|
|||
return q;
|
||||
}
|
||||
|
||||
#ifndef NO_STRTOD_BIGCOMP
|
||||
#if defined(Avoid_Underflow) || !defined(NO_STRTOD_BIGCOMP) /*{*/
|
||||
static double
|
||||
sulp
|
||||
#ifdef KR_headers
|
||||
(x, bc) U *x; BCinfo *bc;
|
||||
#else
|
||||
(U *x, BCinfo *bc)
|
||||
#endif
|
||||
{
|
||||
U u;
|
||||
double rv;
|
||||
int i;
|
||||
|
||||
rv = ulp(x);
|
||||
if (!bc->scale || (i = 2*P + 1 - ((word0(x) & Exp_mask) >> Exp_shift)) <= 0)
|
||||
return rv; /* Is there an example where i <= 0 ? */
|
||||
word0(&u) = Exp_1 + (i << Exp_shift);
|
||||
word1(&u) = 0;
|
||||
return rv * u.d;
|
||||
}
|
||||
#endif /*}*/
|
||||
|
||||
#ifndef NO_STRTOD_BIGCOMP
|
||||
static void
|
||||
bigcomp
|
||||
#ifdef KR_headers
|
||||
|
@ -2377,7 +2404,7 @@ bigcomp
|
|||
}
|
||||
if (!dsign)
|
||||
goto rethi1;
|
||||
dval(rv) += 2.*ulp(rv);
|
||||
dval(rv) += 2.*sulp(rv,bc);
|
||||
}
|
||||
else {
|
||||
bc->inexact = 0;
|
||||
|
@ -2394,17 +2421,27 @@ bigcomp
|
|||
else if (dd < 0) {
|
||||
if (!dsign) /* does not happen for round-near */
|
||||
retlow1:
|
||||
dval(rv) -= ulp(rv);
|
||||
dval(rv) -= sulp(rv,bc);
|
||||
}
|
||||
else if (dd > 0) {
|
||||
if (dsign) {
|
||||
rethi1:
|
||||
dval(rv) += ulp(rv);
|
||||
dval(rv) += sulp(rv,bc);
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* Exact half-way case: apply round-even rule. */
|
||||
if (word1(rv) & 1) {
|
||||
if ((j = ((word0(rv) & Exp_mask) >> Exp_shift) - bc->scale) <= 0) {
|
||||
i = 1 - j;
|
||||
if (i <= 31) {
|
||||
if (word1(rv) & (0x1 << i))
|
||||
goto odd;
|
||||
}
|
||||
else if (word0(rv) & (0x1 << (i-32)))
|
||||
goto odd;
|
||||
}
|
||||
else if (word1(rv) & 1) {
|
||||
odd:
|
||||
if (dsign)
|
||||
goto rethi1;
|
||||
goto retlow1;
|
||||
|
@ -2427,7 +2464,7 @@ strtod
|
|||
#endif
|
||||
{
|
||||
int bb2, bb5, bbe, bd2, bd5, bbbits, bs2, c, e, e1;
|
||||
int esign, i, j, k, nd, nd0, nf, nz, nz0, sign;
|
||||
int esign, i, j, k, nd, nd0, nf, nz, nz0, nz1, sign;
|
||||
CONST char *s, *s0, *s1;
|
||||
double aadj, aadj1;
|
||||
Long L;
|
||||
|
@ -2435,6 +2472,9 @@ strtod
|
|||
ULong y, z;
|
||||
BCinfo bc;
|
||||
Bigint *bb, *bb1, *bd, *bd0, *bs, *delta;
|
||||
#ifdef Avoid_Underflow
|
||||
ULong Lsb, Lsb1;
|
||||
#endif
|
||||
#ifdef SET_INEXACT
|
||||
int oldinexact;
|
||||
#endif
|
||||
|
@ -2454,7 +2494,7 @@ strtod
|
|||
CONST char *s2;
|
||||
#endif
|
||||
|
||||
sign = nz0 = nz = bc.dplen = bc.uflchk = 0;
|
||||
sign = nz0 = nz1 = nz = bc.dplen = bc.uflchk = 0;
|
||||
dval(&rv) = 0.;
|
||||
for(s = s00;;s++) switch(*s) {
|
||||
case '-':
|
||||
|
@ -2504,6 +2544,8 @@ strtod
|
|||
z = 10*z + c - '0';
|
||||
nd0 = nd;
|
||||
bc.dp0 = bc.dp1 = s - s0;
|
||||
for(s1 = s; s1 > s0 && *--s1 == '0'; )
|
||||
++nz1;
|
||||
#ifdef USE_LOCALE
|
||||
s1 = localeconv()->decimal_point;
|
||||
if (c == *s1) {
|
||||
|
@ -2552,7 +2594,7 @@ strtod
|
|||
y = 10*y + c;
|
||||
else if (nd <= DBL_DIG + 1)
|
||||
z = 10*z + c;
|
||||
nz = 0;
|
||||
nz = nz1 = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2817,6 +2859,8 @@ strtod
|
|||
>> Exp_shift)) > 0) {
|
||||
/* scaled rv is denormal; clear j low bits */
|
||||
if (j >= 32) {
|
||||
if (j > 54)
|
||||
goto undfl;
|
||||
word1(&rv) = 0;
|
||||
if (j >= 53)
|
||||
word0(&rv) = (P+2)*Exp_msk1;
|
||||
|
@ -2860,7 +2904,7 @@ strtod
|
|||
|
||||
/* Put digits into bd: true value = bd * 10^e */
|
||||
|
||||
bc.nd = nd;
|
||||
bc.nd = nd - nz1;
|
||||
#ifndef NO_STRTOD_BIGCOMP
|
||||
bc.nd0 = nd0; /* Only needed if nd > strtod_diglim, but done here */
|
||||
/* to silence an erroneous warning about bc.nd0 */
|
||||
|
@ -2873,7 +2917,7 @@ strtod
|
|||
if (i > nd0)
|
||||
j += bc.dplen;
|
||||
for(;;) {
|
||||
if (--j <= bc.dp1 && j >= bc.dp0)
|
||||
if (--j < bc.dp1 && j >= bc.dp0)
|
||||
j = bc.dp0 - 1;
|
||||
if (s0[j] != '0')
|
||||
break;
|
||||
|
@ -2918,12 +2962,21 @@ strtod
|
|||
bs2++;
|
||||
#endif
|
||||
#ifdef Avoid_Underflow
|
||||
Lsb = LSB;
|
||||
Lsb1 = 0;
|
||||
j = bbe - bc.scale;
|
||||
i = j + bbbits - 1; /* logb(rv) */
|
||||
if (i < Emin) /* denormal */
|
||||
j += P - Emin;
|
||||
else
|
||||
j = P + 1 - bbbits;
|
||||
if (i < Emin) { /* denormal */
|
||||
i = Emin - i;
|
||||
j -= i;
|
||||
if (i < 32)
|
||||
Lsb <<= i;
|
||||
else if (i < 52)
|
||||
Lsb1 = Lsb << (i-32);
|
||||
else
|
||||
Lsb1 = Exp_mask;
|
||||
}
|
||||
#else /*Avoid_Underflow*/
|
||||
#ifdef Sudden_Underflow
|
||||
#ifdef IBM
|
||||
|
@ -2971,7 +3024,7 @@ strtod
|
|||
bc.dsign = delta->sign;
|
||||
delta->sign = 0;
|
||||
i = cmp(delta, bs);
|
||||
#ifndef NO_STRTOD_BIGCOMP
|
||||
#ifndef NO_STRTOD_BIGCOMP /*{*/
|
||||
if (bc.nd > nd && i <= 0) {
|
||||
if (bc.dsign)
|
||||
break; /* Must use bigcomp(). */
|
||||
|
@ -2982,13 +3035,10 @@ strtod
|
|||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
bc.nd = nd;
|
||||
i = -1; /* Discarded digits make delta smaller. */
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#ifdef Honor_FLT_ROUNDS
|
||||
#endif /*}*/
|
||||
#ifdef Honor_FLT_ROUNDS /*{*/
|
||||
if (bc.rounding != 1) {
|
||||
if (i < 0) {
|
||||
/* Error is less than an ulp */
|
||||
|
@ -3022,7 +3072,7 @@ strtod
|
|||
}
|
||||
}
|
||||
apply_adj:
|
||||
#ifdef Avoid_Underflow
|
||||
#ifdef Avoid_Underflow /*{*/
|
||||
if (bc.scale && (y = word0(&rv) & Exp_mask)
|
||||
<= 2*P*Exp_msk1)
|
||||
word0(&adj) += (2*P+1)*Exp_msk1 - y;
|
||||
|
@ -3036,7 +3086,7 @@ strtod
|
|||
}
|
||||
else
|
||||
#endif /*Sudden_Underflow*/
|
||||
#endif /*Avoid_Underflow*/
|
||||
#endif /*Avoid_Underflow}*/
|
||||
dval(&rv) += adj.d*ulp(&rv);
|
||||
}
|
||||
break;
|
||||
|
@ -3053,7 +3103,7 @@ strtod
|
|||
adj.d = y;
|
||||
}
|
||||
}
|
||||
#ifdef Avoid_Underflow
|
||||
#ifdef Avoid_Underflow /*{*/
|
||||
if (bc.scale && (y = word0(&rv) & Exp_mask) <= 2*P*Exp_msk1)
|
||||
word0(&adj) += (2*P+1)*Exp_msk1 - y;
|
||||
#else
|
||||
|
@ -3069,31 +3119,31 @@ strtod
|
|||
goto cont;
|
||||
}
|
||||
#endif /*Sudden_Underflow*/
|
||||
#endif /*Avoid_Underflow*/
|
||||
#endif /*Avoid_Underflow}*/
|
||||
adj.d *= ulp(&rv);
|
||||
if (bc.dsign) {
|
||||
if (word0(&rv) == Big0 && word1(&rv) == Big1)
|
||||
goto ovfl;
|
||||
goto ovflfree;
|
||||
dval(&rv) += adj.d;
|
||||
}
|
||||
else
|
||||
dval(&rv) -= adj.d;
|
||||
goto cont;
|
||||
}
|
||||
#endif /*Honor_FLT_ROUNDS*/
|
||||
#endif /*}Honor_FLT_ROUNDS*/
|
||||
|
||||
if (i < 0) {
|
||||
/* Error is less than half an ulp -- check for
|
||||
* special case of mantissa a power of two.
|
||||
*/
|
||||
if (bc.dsign || word1(&rv) || word0(&rv) & Bndry_mask
|
||||
#ifdef IEEE_Arith
|
||||
#ifdef IEEE_Arith /*{*/
|
||||
#ifdef Avoid_Underflow
|
||||
|| (word0(&rv) & Exp_mask) <= (2*P+1)*Exp_msk1
|
||||
#else
|
||||
|| (word0(&rv) & Exp_mask) <= Exp_msk1
|
||||
#endif
|
||||
#endif
|
||||
#endif /*}*/
|
||||
) {
|
||||
#ifdef SET_INEXACT
|
||||
if (!delta->x[0] && delta->wds <= 1)
|
||||
|
@ -3184,18 +3234,39 @@ strtod
|
|||
#ifdef IBM
|
||||
goto cont;
|
||||
#else
|
||||
#ifndef NO_STRTOD_BIGCOMP
|
||||
if (bc.nd > nd)
|
||||
goto cont;
|
||||
#endif
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
#ifndef ROUND_BIASED
|
||||
#ifdef Avoid_Underflow
|
||||
if (Lsb1) {
|
||||
if (!(word0(&rv) & Lsb1))
|
||||
break;
|
||||
}
|
||||
else if (!(word1(&rv) & Lsb))
|
||||
break;
|
||||
#else
|
||||
if (!(word1(&rv) & LSB))
|
||||
break;
|
||||
#endif
|
||||
#endif
|
||||
if (bc.dsign)
|
||||
#ifdef Avoid_Underflow
|
||||
dval(&rv) += sulp(&rv, &bc);
|
||||
#else
|
||||
dval(&rv) += ulp(&rv);
|
||||
#endif
|
||||
#ifndef ROUND_BIASED
|
||||
else {
|
||||
#ifdef Avoid_Underflow
|
||||
dval(&rv) -= sulp(&rv, &bc);
|
||||
#else
|
||||
dval(&rv) -= ulp(&rv);
|
||||
#endif
|
||||
#ifndef Sudden_Underflow
|
||||
if (!dval(&rv)) {
|
||||
if (bc.nd >nd) {
|
||||
|
@ -3267,8 +3338,17 @@ strtod
|
|||
dval(&rv) += adj.d;
|
||||
if ((word0(&rv) & Exp_mask) >=
|
||||
Exp_msk1*(DBL_MAX_EXP+Bias-P)) {
|
||||
if (word0(&rv0) == Big0 && word1(&rv0) == Big1)
|
||||
if (word0(&rv0) == Big0 && word1(&rv0) == Big1) {
|
||||
#ifdef Honor_FLT_ROUNDS
|
||||
ovflfree:
|
||||
#endif
|
||||
Bfree(bb);
|
||||
Bfree(bd);
|
||||
Bfree(bs);
|
||||
Bfree(bd0);
|
||||
Bfree(delta);
|
||||
goto ovfl;
|
||||
}
|
||||
word0(&rv) = Big0;
|
||||
word1(&rv) = Big1;
|
||||
goto cont;
|
||||
|
@ -3288,9 +3368,23 @@ strtod
|
|||
dval(&aadj2) = aadj1;
|
||||
word0(&aadj2) += (2*P+1)*Exp_msk1 - y;
|
||||
aadj1 = dval(&aadj2);
|
||||
}
|
||||
adj.d = aadj1 * ulp(&rv);
|
||||
dval(&rv) += adj.d;
|
||||
if (rv.d == 0.)
|
||||
#ifdef NO_STRTOD_BIGCOMP
|
||||
goto undfl;
|
||||
#else
|
||||
{
|
||||
if (bc.nd > nd)
|
||||
bc.dsign = 1;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
adj.d = aadj1 * ulp(&rv);
|
||||
dval(&rv) += adj.d;
|
||||
}
|
||||
#else
|
||||
#ifdef Sudden_Underflow
|
||||
if ((word0(&rv) & Exp_mask) <= P*Exp_msk1) {
|
||||
|
@ -3373,8 +3467,10 @@ strtod
|
|||
Bfree(bd0);
|
||||
Bfree(delta);
|
||||
#ifndef NO_STRTOD_BIGCOMP
|
||||
if (bc.nd > nd)
|
||||
if (bc.nd > nd && bc.dsign) {
|
||||
bc.e0 += nz1;
|
||||
bigcomp(&rv, s0, &bc);
|
||||
}
|
||||
#endif
|
||||
#ifdef SET_INEXACT
|
||||
if (bc.inexact) {
|
||||
|
|
|
@ -98,7 +98,8 @@ int main(int argc, char** argv)
|
|||
PR_FreeLibraryName(libName);
|
||||
if (lib == NULL) {
|
||||
PRInt32 textLength = PR_GetErrorTextLength();
|
||||
char *text = (char*)PR_MALLOC(textLength);
|
||||
char *text = (char*)PR_MALLOC(textLength + 1);
|
||||
text[0] = '\0';
|
||||
(void)PR_GetErrorText(text);
|
||||
fprintf(
|
||||
stderr, "PR_LoadLibrary failed (%d, %d, %s)\n",
|
||||
|
|
Загрузка…
Ссылка в новой задаче