You are currently viewing a snapshot of taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to, please file a bug.

NSPR 4.4.1 Release


Table of Contents

  1. Introduction
  2. What's New
  3. Library Version Specification
  4. Platforms
  5. Compatibility
  6. Release Components
  7. Test Data
  8. Reporting bugs
  9. Building from source
  10. Contact Info

1. Introduction

The NSPR 4.4.1 release is available at /share/builds/components/nspr20/v4.4.1.

NSPR 4.4 designates the NSPR in Mozilla 1.4/Netscape 7.1. We also describe the changes in NSPR 4.4 in this document.

2. What's New

NSPR 4.4.1 provides some new features and some bug fixes..

2.1 New functions and features

The following new functions or features have been added in NSPR 4.4.
  • Added function PR_GetPathSeparator(). See Bugzilla bug 171883. This function returns the character used to separate the directories listed in a search path, such as the PATH environment variable.

2.2 Bug fixes

The following table shows a summary of bug fixes in NSPR 4.4 and 4.4.1.
  • Bug 104529: PR_fprintf I/O function misbehaves with standard output.
  • Bugs 124958, 221385, 217121: fixed a crash in strftime (called by PR_FormatTime) on OpenBSD, FreeBSD, and Mac OS X.
  • Bug 126932: NSPR tests don't run on OS/2.
  • Bug 126937: PR_GetSysfdTableMax incorrectly implemented on OS/2, PR_SetSysfdTableSize not implemented.
  • Bug 188246: Build NSPR with GCC 3.x.
  • Bug 190538: Size/Speed optimizations for OS/2.
  • Bug 198634: Fixes to OS/2 threading code.
  • Bug 199901: OS/2 - Cookies don't work (PR_snprintf problem).
  • Bug 200335: The zone allocator does not work on Mac OS X (Darwin).
  • Bug 200561: Cannot load NSS programs due to failure on AIX platform.
  • Bug 202826: NSPR should use __declspec instead of _declspec.
  • Bug 203317: getipnodebyxxxx routines not threadsafe on OpenVMS.
  • Bug 204092: Build NSPR on Solaris with -xO4 optimization.
  • Bug 205582: NSPR maps EHOSTUNREACH to PR_UNKNOWN_ERROR on Unix.
  • Bug 206815: Purify UMR in PR_Poll's poll() call.
  • Bug 207421: XSLT format-number() function formats number incorrectly causing it to be rounded down and the fractional part to begin with a colon (:).
  • Bug 207614: prcpucfg.h always updated.
  • Bug 211512: PR_Connect() fails on panther beta.
  • Bug 212708: nspr pulls in libdl on macosx.
  • Bug 214411: Solaris native thread support: GetThreadPrivate fails if thread not created via NSPR.
  • Bug 217501: Use sane libpath in NSPR libraries.
  • Bug 217968: mozilla/nsprpub/pr/tests/servr_uk.c", line 66.9: 1506-236 (W) Macro name STACKSIZE has been redefined.
  • Bug 225260: Link NSPR dynamic shared libraries with the -headerpad_max_install_names option.
  • Bug 226686: The WINNT version of PR_Accept leaks a socket handle if it fails.

3. Library Name and Versioning

The binaries for this release are named libnspr4 (nspr4 on Win 95).

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 information.
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.

4. Platforms

The set of supported platforms is listed in the following table. For most platforms, a single release of the nspr library is used to support all the current releases of the OS.


5. Compatibility

The NSPR 4.4.1 release is backward compatible with NSPR 4.0.x, 4.1.x, 4.2.x, 4.3.x, and 4.4.

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. Release Components

The main components of this release are a set of shared libraries and header files for each platform. A debug build and a release (optimized) build of the libraries are made available for each platform.

6.1 Platform Directory

The platform-dependent name of the directory where the components are placed is of the form

<os-name><os-version>[_<compiler>][cpu-arch][_<implementation strategy>][_<addr-bits>]_<DBG|OPT>.OBJ

For example,
SunOS5.8_OPT.OBJ (optimized build)
HP-UXB.11.00_64_DBG.OBJ (64-bit, debug build)

6.2 Implementation Strategy

For 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 Components

Under 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, libnspr_flt, is also supplied. (libnspr_flt replaces the libultrasparc library in NSPR 4.2.x or earlier.) 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 by use of the auxiliary filter mechanism of the Solaris linker. To use this library at runtime on UltraSPARC systems, should be installed in a subdirectory named cpu/sparcv8plus relative to the directory where resides.

3. bin directory, containing a perl script,, and a Java bundle,
4. mdheader.jar, jar file for the header files.
5. mdbinary.jar, jar for the libraries, executable programs, and scripts.

7. Test Data

All the major functional areas of nspr were tested using the programs in the nspr test suite. Both functional and stress tests in the pr/tests directory were successfully run on multi-processor systems for most platforms, except for Win95/98.

8. Reporting bugs

Bugs discovered should be reported by filing a report in Bugzilla. The following information is required
  • platform (Solaris 8, 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

9. Building from source

This release is built from the source, at the CVS repository rooted at, with the CVS tag
NSPR_4_4_1_RTM. You can check out the source from CVS by
cvs co -r NSPR_4_4_1_RTM mozilla/nsprpub

To build, do
cd mozilla/nsprpub
gmake export

10. Contact Info - NSPR documentation
netscape.public.mozilla.nspr - nspr newsgroup at