NSPR 3.5 Release
Table of Contents
- What's New
- Library Version Specification
- Release Components
- Test Data
- Reporting bugs
- Building from source
- Contact Info
2.1 New functions and features1. Support for 64-bit features on Solaris 2.7 and AIX 4.3.2
A new port of NSPR with 64-bit support is available for Solaris 2.7 and AIX 4.3.2. This is in addition to a 32-bit library for AIX 4.3.2 and Solaris 2.6.2. Inter-process Communication
Shared memory (named and anonymous) and named semaphores for inter-process communication are available.3. A new function for sending parts of a file across a socket connection along with optional header and trailer data.
The new interfaces and test programs (for sample usage) for shared memory are found in:
Header files: prshm.h, prshma.h
Test programs: pr/tests/nameshm1.c, pr/tests/anonfm.c
For semaphores, the interface declarations and test cases are in
Header file: pripcsem.h
Test programs: pr/tests/sema.c, semaping.c and semapong.c
A new function, PR_SendFile, is available to send a specified length of file data from an arbitrary offset, along with optional header and/or trailer data. This function is implemented using a native sendfile function on platforms with such a facility. The features of PR_SendFile are a superset of the existing PR_TransmitFile interface. However, PR_SendFile is not implemented as a method in the PRIOMethods table and it cannot be invoked on a4. Simultaneous support for IPv4 and IPv6
Header file: prio.h
Test program: pr/tests/socket.c
Both IPv4 and IPv6 sockets can now be used in the same process. This feature is available, by default, on AIX 4.3.2, which is currently the only platform supporting IPv6 as a basic feature. For other platforms, a NSPR library with IPv4 and IPv6 support can be built by setting the environment variable USE_IPV6 to 1.5. Improved support for native threads on Windows NT
Header files: prio.h, prnetdb.h
Test programs: pr/tests/gethost.c, ipv6.c, socket.c
For applications that use only global (native) threads on NT, an environment variable, NSPR_NATIVE_THREADS_ONLY, can be set at runtime for better support. In this mode, only Win32 threads (and no fibers) are created even when an application specifies local threads. This allows an application to make a blocking call from any thread without blocking the entire application. The performance of some functions is improved; the PRLock/Unlock interfaces, for example, directly call the native lock functions on NT. Currently, the multiwait interfaces in NSPR are not supported in this mode.6. Cancellation of IO requests on NT
A new function, PR_NT_CancelIO,
is available to cancel outstanding IO operations on NT. Prior to the availability
this feature, an I/O operation that times out or is interrupted required the closing of the file descriptor. Now, the
outstanding IO operation can be canceled with PR_NT_CancelIO and new IO requests issued for that file descriptor.
Header file: private/pprio.h
Test program: pr/tests/socket.c
7. Improved IO performance on Unix
NSPR now implements multiple
IO continuation threads for improved scalability, especially on MP systems.
performance is also improved by optimized processing of multiple IO requests for the same file descriptor.
2.2 Bug fixesAll of the bug fixes from NSPR releases 3.1.1 and 3.1.2 are present in the 3.5 release, in addition to the following fixes:
361007 -- Recording the internal name in NSPR shared libraries
2. Bug 360959 -- message "Unrecognized NSPR_LOG_MODULE:..."
3. Bug 345378 -- The default layered acceptread method (pl_DefAcceptread) is incorrect
4. Bug 353121 -- Porting to DEC's IPv6 EAK Version X6.3
5. Bug 346686 -- Improving error-code mapping functions
6. Bug 361694 -- prmwait.c: Order of initialization in TimerInit for NT
7. Bug 357769 -- NSPR init should not assume that stdin/out/err are valid file descriptors
8. Bug 362221 -- PR_WaitProcess and PR_DetachProcess do not free the PRProcess structure on Unix
9. Bug 362233 -- PR_VersionCheck is incorrect
10. Bug 361686 -- Blocking IO functions modify thread state without acquiring thread lock
11. Bug 361659 -- ntio.c: _PR_MD_CLOSE should check me->io_suspended
12. Bugzilla bug 5358 -- PR_StackPush and PR_StackPop are not implemented on Solaris/x86
13. Bugzilla bug 10201 -- HP-UX 10.20 nees x bit set on shared libraries
14. Bugzilla bug 11455 -- -mno-486 added to PLATFORM_FLAGS
2.3 Obsolete interfaceThe asynchronous resolver library (arlib or libares) is no longer part of the NSPR distribution (since the 3.1.1 release).
The full release number of nspr library can be determined in several ways:
1. The nspr library exports a function, libVersionPoint, that can be
called to retrieve the version of the library. The function and data
prototypes are available for other libraries to provide similar version
2. On Win32 systems, the version number is embedded in the resource descriptor of the DLL and can be viewed using Windows Explorer. On Unix system, the "what" command of sccs or the "ident" command of rcs can be used to obtain the version information.
3. The PR_VersionCheck function can be called to check for compatibility; given a version number the function returns success condition if the version of the nspr library loaded into the application is compatible.
|Thread Model||Build Name||Comments|
|Solaris||2.6||SparcWorks C/C++ 4.2||2.6
|2.7/64-bit||SparcWorks C/C++ 5.0||2.7/64-bit||pthreads||SunOS5.7_64_OPT.OBJ|
|Windows||95||Visual C++ 6.0||95
|threads||WIN954.0_OPT.OBJ||MSVC 6.0 SP3|
|Win NT||4.0SP4||Visual C++ 6.0||4.0SP4
|WINNT4.0_OPT.OBJ||MSVC 6.0 SP3|
|AIX||4.3.2||C Set ++ for AIX 3.6.4 - xlC||4.3.2||pthreads||AIX4.3_OPT.OBJ||Required patch:
|4.3.2/64-bit||C Set ++ for AIX 3.6.4 - xlC||4.3.2/64-bit||pthreads||AIX4.3_64_OPT.OBJ||Required patch:
|Tru64 UNIX (the new name of Digital UNIX)||4.0D||Digital C++ v6.1-027
Digital CC v5.6-079
|pthreads||OSF1V4.0D_OPT.OBJ||Certification of NSPR on 4.0E is recommended but not required by Compaq|
|Linux||2.2 (Red Hat 6.0)||egcs-1.1.2||2.2||pthreads||Linux2.2_x86_glibc_PTH_OPT.OBJ||glibc-2.1-x (x=0.990222 or later)|
Important changes to note are:
Irix binaries are not available in this release; Irix is no longer supported as a Tier-1 platform.
Two binaries are supported for Solaris3. AIX
1. A Solaris 2.6 binary is for 32-bit applications running on Solaris 2.6 and 2.7.
2. A 64-bit Solaris 2.7 binary for 64-bit applications running on Solaris 2.7
Solaris 2.5.1 is not supported.
To use purify on Solaris, libpthread should be explicitly specified in the list of libraries passed to the linker, ahead of other system libraries such as -lposix4, -lsocket, -ldl, etc.,.
Two versions are supported for AIX 4.3.2, one for 32-bit and another for 64-bit mode. AIX 4.2 is no longer supported.
The AIX patch "PTF U463956"
is required; this patch contains a fix for a bug in the send_file function
that causes data
corruption. If the revision level of an AIX system is 184.108.40.206 or higher, the installation of this patch is implied. To use
NSPR 3.5 on a system without this patch, the environment variable NSPR_AIX_SEND_FILE_USE_DISABLED should
be set to 1.
The bug in send_file appears
to be present in 64-bit mode even when this patch is installed. So, the
NSPR_AIX_SEND_FILE_USE_DISABLED should be set to 1 when using the 64-bit build of NSPR.
The type of the 'len' argument
to the streambuf::setbuf() method changed from 'int' to 'long' in 64-bit
AIX. This makes the
compiler think the setbuf method of the derived class PRfilebuf hides the same-named virtual function of the base class.
So libprstrms3.so is broken on 64-bit AIX. (Bugsplat bug# 361776.)
The HP-UX 10.10 and 10.20 releases are no longer supported.
Linux is now supported only
for kernel version of 2.2 on the Redhat 6.0 release. The binaries are built
egcs-1.1.2 compiler and glibc-2.1.x library.
6. Win NT and Win 95
The NSPR libraries for both Windows platforms are built with VC 6.0 (SP3).
For the nspr library, backward compatibility does not preclude the addition of new error codes to the set of nspr error codes already defined. An application should allow for nspr functions returning error codes not documented for the particular release with which it is linked. This helps to retain backward compatibility as new error codes are added upon discovery of new information about platform-specific error codes.
6.1 Platform DirectoryThe platform-dependent name of the directory where the components are placed is of the form
SunOS5.6_OPT.OBJ (optimized build)
AIX4.3_64_DBG.OBJ (64-bit, debug build)
6.2 Implementation StrategyFor the implementation of nspr, different strategies are used on different platforms. On some platforms the nspr threads map directly to the native threads on the platform, while on others nspr supports both threads that are scheduled by nspr and the native threads.
The default implementation strategies in this release are:
- pthreads: all Unix platforms
- classic: Win NT (combined MxN model, with Windows threads and fibers)
- native threads: Win95
6.3 ComponentsUnder each <platform> directory, there are:
1. include directory, containing the header files
2. lib directory, containing the libraries. Three libraries are built on all platforms: nspr, plc, plds. One other
library is built on server platforms only: prstrms. Only shared (dynamic link) versions of the libraries are built.
The nspr library exports the core nspr functions.
The plc (Portable Library C) library is a separate library from
the core nspr20. You do
not need to use plc if you just want to use the core nspr20 functions. The plc library currently
contains thread-safe string functions and functions for processing command-line options.
The plds (Portable Library Data Structures) library supports data structures such as arenas, hash tables, and event queues. It is important to note that services of plds are not thread-safe. To use these services in a multi-threaded environment, clients have to implement their own thread-safe access, by acquiring locks/monitors, for example.
For Solaris platforms with UltraSparc processors only, a platform-specific library, libultrasparc, is also supplied. This library implements optimized versions of atomic operations by using the features present in the UltraSparc (V9) processors, but not in the Sparc (V8) processors. This library is linked into libnspr, with the name libatomic, by use of the auxiliary filter mechanism of the Solaris linker. To use this library at runtime, on UltraSparc systems, libultrasparc21.so should be copied into a file named libatomic.so and the new file should be present in the path searched by the linker, set using LD_LIBRARY_PATH.
3. bin directory, containing a perl script, compile-et.pl, and a Java
4. mdheader.jar, jar file for the header files.
5. mdbinary.jar, jar for the libraries, executable programs, and scripts.
- platform (Solaris 2.6, HP-UX 11.0, etc.)
- number of cpus in the system
- a stack trace, in the event of a crash
- reproducibility of the problem
- location of core dump, if available, along with those for the libraries and executables
NSPR20_RELEASE_3_5. You can check out the source from CVS by
cvs co -r NSPR20_RELEASE_3_5 ns/nspr20
To build, do
http://warp/projects/hardcore/prj-nspr20 - nspr home page
nsprgroup - the nspr team
nspr20clients - mailing list for nspr clients
netscape.public.mozilla.nspr - nspr newsgroup at mozilla.org