diff -Nurd -x'*~' nspr-4.8.4.orig/mozilla/nsprpub/config/rules.mk nspr-4.8.4/mozilla/nsprpub/config/rules.mk
--- nspr-4.8.4.orig/mozilla/nsprpub/config/rules.mk	2009-12-09 16:24:37.000000000 -0500
+++ nspr-4.8.4/mozilla/nsprpub/config/rules.mk	2010-03-26 00:47:38.000000000 -0400
@@ -131,7 +131,8 @@
 SHARED_LIBRARY	= $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION)_shr.a
 else
 ifdef MKSHLIB
-SHARED_LIBRARY	= $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
+SO_VERSION=0d
+SHARED_LIBRARY	= $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(SO_VERSION).$(DLL_SUFFIX)
 endif
 endif
 
diff -Nurd -x'*~' nspr-4.8.4.orig/mozilla/nsprpub/configure nspr-4.8.4/mozilla/nsprpub/configure
--- nspr-4.8.4.orig/mozilla/nsprpub/configure	2010-02-08 13:41:35.000000000 -0500
+++ nspr-4.8.4/mozilla/nsprpub/configure	2010-03-26 00:48:02.000000000 -0400
@@ -108,6 +108,16 @@
 infodir='${prefix}/info'
 mandir='${prefix}/man'
 
+# NLS nuisances.
+# Only set these to C if already set.  These must not be set unconditionally
+# because not all systems understand e.g. LANG=C (notably SCO).
+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+# Non-C LC_CTYPE values break the ctype check.
+if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
+
 # Initialize some other variables.
 subdirs=
 MFLAGS= MAKEFLAGS=
@@ -496,16 +506,6 @@
   esac
 done
 
-# NLS nuisances.
-# Only set these to C if already set.  These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
-
 # confdefs.h avoids OS command line length limits that DEFS can exceed.
 rm -rf conftest* confdefs.h
 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
@@ -1218,8 +1218,6 @@
       powerpc-apple-darwin8*:i?86-apple-darwin*)
                                                 _SAVE_CFLAGS=$CFLAGS 
         _SAVE_CXXFLAGS=$CXXLAGS
-        CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk $CFLAGS"
-        CXXFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk $CXXFLAGS"
         ;;        
     esac            
 
@@ -3362,7 +3360,7 @@
             ;;
     esac
     DSO_CFLAGS=-fPIC
-    DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name @executable_path/$@ -headerpad_max_install_names'
+    DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name $(libdir)/$@ -headerpad_max_install_names'
     _OPTIMIZE_FLAGS=-O2
     MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
     STRIP="$STRIP -x -S"
@@ -3371,6 +3369,8 @@
     MDCPUCFG_H=_darwin.cfg
     PR_MD_CSRCS=darwin.c
     PR_MD_ASFILES=os_Darwin.s
+    LIBNSPR='$(dist_libdir)/libnspr$(MOD_MAJOR_VERSION).$(SO_VERSION).dylib'
+    LIBPLC='$(dist_libdir)/libplc$(MOD_MAJOR_VERSION).$(SO_VERSION).dylib'
 
     # Add Mac OS X support for loading CFM & CFBundle plugins
     if test -f "${MACOS_SDK_DIR}/System/Library/Frameworks/Carbon.framework/Carbon"; then
diff -Nurd -x'*~' nspr-4.8.4.orig/mozilla/nsprpub/pr/src/md/unix/unix.c nspr-4.8.4/mozilla/nsprpub/pr/src/md/unix/unix.c
--- nspr-4.8.4.orig/mozilla/nsprpub/pr/src/md/unix/unix.c	2010-02-09 22:03:35.000000000 -0500
+++ nspr-4.8.4/mozilla/nsprpub/pr/src/md/unix/unix.c	2010-05-23 14:47:55.000000000 -0400
@@ -3627,7 +3627,7 @@
  * that calls poll(), we emulate poll() using select().
  */
 
-int poll(struct pollfd *filedes, unsigned long nfds, int timeout)
+int __attribute__((visibility("hidden"))) poll(struct pollfd *filedes, unsigned long nfds, int timeout)
 {
     int i;
     int rv;
diff -Nurd -x'*~' nspr-4.8.4.orig/mozilla/nsprpub/pr/src/misc/prtime.c nspr-4.8.4/mozilla/nsprpub/pr/src/misc/prtime.c
--- nspr-4.8.4.orig/mozilla/nsprpub/pr/src/misc/prtime.c	2009-08-26 17:26:18.000000000 -0400
+++ nspr-4.8.4/mozilla/nsprpub/pr/src/misc/prtime.c	2010-03-26 00:48:02.000000000 -0400
@@ -1526,7 +1526,7 @@
                 case TT_EET: zone_offset =  2 * 60; break;
                 case TT_JST: zone_offset =  9 * 60; break;
                 default:
-                  PR_ASSERT (0);
+                  return PR_FAILURE;
                   break;
                 }
         }
@@ -1574,11 +1574,12 @@
           struct tm localTime;
           time_t secs;
 
-          PR_ASSERT(result->tm_month > -1 &&
+          if(!(result->tm_month > -1 &&
                     result->tm_mday > 0 &&
                     result->tm_hour > -1 &&
                     result->tm_min > -1 &&
-                    result->tm_sec > -1);
+                    result->tm_sec > -1)) 
+		return PR_FAILURE;
 
             /*
              * To obtain time_t from a tm structure representing the local
