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.
This commit is contained in:
athenian200 2019-10-01 18:28:10 -05:00 committed by Roy Tam
commit afb2e3a054
38 changed files with 682 additions and 32 deletions

View file

@ -16,6 +16,9 @@
#include "nsDebug.h"
#include "nsISupportsImpl.h"
#include "nsXULAppAPI.h"
#if defined(__sun__) || defined(__sun)
#include <unistd.h>
#endif
using namespace mozilla;
using namespace std;
@ -267,9 +270,19 @@ ProcessLink::OnChannelOpened()
MonitorAutoLock lock(*mChan->mMonitor);
mExistingListener = mTransport->set_listener(this);
// The queue we want here is defined in the namespace 'std' on Solaris, which
// also has another function called queue in a different namespace. Need to
// determine whether queue is defined in 'std' on other supported platforms
// before possibly removing ifdefs.
#ifdef DEBUG
if (mExistingListener) {
#if defined(XP_SOLARIS)
std::queue<Message> pending;
#else
queue<Message> pending;
#endif
mExistingListener->GetQueuedMessages(pending);
MOZ_ASSERT(pending.empty());
}
@ -285,8 +298,11 @@ void
ProcessLink::OnTakeConnectedChannel()
{
AssertIOThread();
#if defined(XP_SOLARIS)
std::queue<Message> pending;
#else
queue<Message> pending;
#endif
{
MonitorAutoLock lock(*mChan->mMonitor);