From 4105ebb6ed85aaffec5e4469a939945fb9eea066 Mon Sep 17 00:00:00 2001 From: athenian200 Date: Tue, 1 Oct 2019 18:28:10 -0500 Subject: MoonchildProductions#1251 - Part 4: Core build system changes, lots of libevent/IPC junk. This is mostly ifdefs, but as you can see, Solaris is actually a lot like Linux. They're both more SysV than BSD at core, and most of the differences have more to do with Solaris not using glibc than anything else. I still need to audit a lot of these changes and understand why they're needed and what the alternative approaches are. After this patch, most of the core functionality needed to build Solaris is here. --- config/external/nspr/pr/moz.build | 14 ++++++++++++++ config/external/nspr/prcpucfg.h | 2 ++ 2 files changed, 16 insertions(+) (limited to 'config') diff --git a/config/external/nspr/pr/moz.build b/config/external/nspr/pr/moz.build index af710f850..02811aae8 100644 --- a/config/external/nspr/pr/moz.build +++ b/config/external/nspr/pr/moz.build @@ -51,6 +51,19 @@ elif CONFIG['OS_TARGET'] == 'Darwin': ] 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', @@ -224,6 +237,7 @@ EXPORTS.nspr.md += [ '/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', ] diff --git a/config/external/nspr/prcpucfg.h b/config/external/nspr/prcpucfg.h index 5f7962733..8769abeeb 100644 --- a/config/external/nspr/prcpucfg.h +++ b/config/external/nspr/prcpucfg.h @@ -22,6 +22,8 @@ #include "md/_openbsd.cfg" #elif defined(__linux__) #include "md/_linux.cfg" +#elif defined(__sun__) +#include "md/_solaris.cfg" #else #error "Unsupported platform!" #endif -- cgit v1.2.3