NSPR 4.1 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 featuresThe following new functions or features have been added.
- Added flags support to PR_Recv(), PR_Send(), PR_RecvFrom(), See Bugzilla: 17223. In particular, allows the caller to PEEK at messages waiting without receiving data.
- Added function PR_GetMemMapAlignment(). See Bugzilla: 38996. This function is provided because some platforms require the offset value passed to PR_MemMap() to be aligned: on Unix, it is page size; on windows it is "allocation granularity".
- Added support for layered nonblocking connect . See Bugzilla: 40778.
- NSPR changes its license from NPL 1.1 to the dual-license of MPL/GPL. See BugZilla: 42367 .
- Added function PR_GetNumberOfProcessors(). See BugZilla: 25981. This new function returns the number of CPUs on the running system.
- Added function PR_SetEnv(). See BugZilla:25982 .
- Implement PR_AcceptRead(), PR_TransmitFile() across all platforms, taking advantage of platform dependent features that provide equivalent function or using emulated capability on platforms that do not provide those features. See BugZilla: 34920.
2.2 Bug fixesThe following table shows a summary of bug-fixes in NSPR 4.1. The table includes bugs fixed in NSPR 4.0.1 and 4.0.2.
|4090||PR_Open()'s PR_APPEND flag is a no-op|
|5518||Win32: PRSeekWhence values are passed to SetFilePointer.|
|17223||Support the flags argument to PR_Recv, PR_Send, PR_RecvFrom,|
|26506||The DNS lock is not needed with native threads.|
|30914||PR_PushIOLayer should not swap the contents of the fd's|
|31437||Process ERANGE error on Solaris|
|31697||Porting NSPR to Mac OS X (Rhapsody)|
|32779||PR_Interrupt should increment the condition variable's pendi|
|33652||PR_AcceptRead should not align PRNetAddr on the size of void|
|35405||rcnetdb.cpp uses == to compare two PRIPv6Addr structures|
|37146||The atomic.c test prints incorrect output|
|38599||Better implementation of PR_Poll on Unix|
|39674||Remove the Unix sigprocmask calls in prnetdb.c|
|39696||Assembly code implementation of NSPR atomic routines for Sol|
|39731||PR_GetInheritedFD doesn't support pipes|
|39942||PR_SetError calls free.|
|40529||Some error returns in PR_GetIPNodeByName don't properly clea|
|40629||NSPR's /dev/zero fd gets inherited by child processes|
|40941||Patches for Linux/IA64|
|41832||Pthreads: PR_WaitCondVar does not set error code on failure|
|42714||Remove NSPR's dependency on winmm.dll|
|42874||ntsec.c: OpenProcessToken may fail with ERROR_ACCESS_DENIED|
|42900||PR_Connect doesn't time out in the NT version|
|43507||PR_EnableClockInterrupts calls _PR_InitStuff.|
|45181||NSPR assumes the FD_CLOEXEC flag is cleared.|
|45432||Leaking PRLibrary if a library won't load|
|46506||Use pthreads by default on FreeBSD.|
|46909||Mac's prcpucfg.h should not define _PR_LOCAL_THREADS_ONLY.|
|50386||PR_Sleep() may return uninitialized variable.|
|17806||The value of the out_flags fields when PR_Poll returns 0 or|
|46166||function may return undefined value|
|46525||UMR in OpenProcessToken called from PR_NT_InitSids [ntsec.c|
|30902||True atomic implementation of NSPR atomic routines for Unix/|
|31049||PR_Accept crashes if the listening socket is an emulated IPv|
|31120||ntio.c: _PR_Unblock_IO_Wait sets the wrong thr_bound_cpu.|
|32184||PL_HashTableEnumerateEntries isn't stable over PL_HashTableR|
|32234||prcpucfg.h breaks compiles, needs comment delimeters|
|33740||need to change os2io.c for write errors and create new files|
|34048||NSPR library loading fix: specify fragment names of the DLLs|
|35408||PR_NewTCPSocketPair needs to create a thread to do the conne|
|37272||macsockotpt.c: inet_addr() should return -1 rather than asse|
|37761||assert in nslocalstore.cpp|
|39967||crash due to missing stylesheet|
|45141||Unable to build retail NSPR|
|45623||function returns uninitialized variable|
|36170||NSPR's shared library loader doesn't properly report errors|
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
8 (32bit & 64bit)
|7 (64-bit)||SparcWorks C/C++ 5.0||7 (64-bit)
|Windows||NT 4.0, SP6a||MSVC 6.0, SP4||95 OSR2
|Win NT||NT 4.0, SP6a||MSVC 6.0, SP4||NT4.0, SP6a
|AIX||4.3.3||C Set ++ for AIX 3.6.4 - xlC||4.3.3||pthreads||AIX4.3_OPT.OBJ|
|4.3.3/64-bit||C Set ++ for AIX 3.6.4 - xlC||4.3.3/64-bit||pthreads||AIX4.3_64_OPT.OBJ|
|Tru64 UNIX (the new name of Digital UNIX)||4.0D||Digital C++ v6.1-027
Digital CC v5.6-079
|Linux||Red Hat 6.1||egcs-1.1.2||RH 6.1
Cooperatively Developed Platforms
|Thread Model||Build Name||Owner||Comments|
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. 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 nspr. You do
not need to use plc if you just want to use the core nspr 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 and hash tables. 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, libultrasparc4.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
NSPRPUB_RELEASE_4_1. You can check out the source from CVS by
cvs co -r NSPRPUB_RELEASE_4_1 mozilla/nsprpub
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