Bug 1354576 - Allow to build NSPR on Solaris again. r=ted
authorPetr Sumbera <petr.sumbera@oracle.com>
Tue, 30 May 2017 01:36:00 -0700
changeset 413055 2240d6e36324d77bff5260084243f863b74dfcdd
parent 413054 7fe1ee54c97bcb6cf7a96b3ee05c1d6f5e23e766
child 413056 eb6d181cfc9714264d12ff2b01c3f4028ec7bf0e
push id1490
push usermtabara@mozilla.com
push dateMon, 31 Jul 2017 14:08:16 +0000
treeherdermozilla-release@70e32e6bf15e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs1354576
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1354576 - Allow to build NSPR on Solaris again. r=ted
config/external/nspr/pr/moz.build
config/external/nspr/prcpucfg.h
--- a/config/external/nspr/pr/moz.build
+++ b/config/external/nspr/pr/moz.build
@@ -51,16 +51,29 @@ elif CONFIG['OS_TARGET'] == 'Darwin':
         HAVE_POINTER_LOCALTIME_R=True,
     )
     SOURCES += [
         '/nsprpub/pr/src/md/unix/darwin.c',
         '/nsprpub/pr/src/md/unix/os_Darwin.s',
     ]
     if not CONFIG['MOZ_IOS']:
         DEFINES['HAVE_CRT_EXTERNS_H'] = True
+elif CONFIG['OS_TARGET'] == 'SunOS':
+    DEFINES.update(
+        HAVE_FCNTL_FILE_LOCKING=True,
+        HAVE_SOCKLEN_T=True,
+        _PR_HAVE_OFF64_T=True,
+        _PR_INET6=True,
+    )
+    DEFINES['SOLARIS'] = True
+    SOURCES += ['/nsprpub/pr/src/md/unix/solaris.c']
+    if CONFIG['CPU_ARCH'] == 'x86_64':
+        SOURCES += ['/nsprpub/pr/src/md/unix/os_SunOS_x86_64.s']
+    elif CONFIG['CPU_ARCH'] == 'x86':
+        SOURCES += ['/nsprpub/pr/src/md/unix/os_SunOS_x86.s']
 elif CONFIG['OS_TARGET'] == 'WINNT':
     OS_LIBS += [
         'advapi32',
         'ws2_32',
         'mswsock',
         'winmm',
     ]
     DEFINES.update(
@@ -224,16 +237,17 @@ EXPORTS.nspr += [
 ]
 
 EXPORTS.nspr.md += [
     '/nsprpub/pr/include/md/_darwin.cfg',
     '/nsprpub/pr/include/md/_freebsd.cfg',
     '/nsprpub/pr/include/md/_linux.cfg',
     '/nsprpub/pr/include/md/_netbsd.cfg',
     '/nsprpub/pr/include/md/_openbsd.cfg',
+    '/nsprpub/pr/include/md/_solaris.cfg',
     '/nsprpub/pr/include/md/_win95.cfg',
 ]
 
 EXPORTS.nspr.private += [
     '/nsprpub/pr/include/private/pprio.h',
     '/nsprpub/pr/include/private/pprthred.h',
     '/nsprpub/pr/include/private/prpriv.h',
 ]
--- a/config/external/nspr/prcpucfg.h
+++ b/config/external/nspr/prcpucfg.h
@@ -17,13 +17,15 @@
 #elif defined(__FreeBSD__)
 #include "md/_freebsd.cfg"
 #elif defined(__NetBSD__)
 #include "md/_netbsd.cfg"
 #elif defined(__OpenBSD__)
 #include "md/_openbsd.cfg"
 #elif defined(__linux__)
 #include "md/_linux.cfg"
+#elif defined(__sun__)
+#include "md/_solaris.cfg"
 #else
 #error "Unsupported platform!"
 #endif
 
 #endif /* NSPR_PRCPUCFG_H_ */