GetIPCChannel()->SetAbortOnError(true);
-#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS)
+#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS) || defined(OS_HURD)
mShutdownFunc =
(NP_PLUGINSHUTDOWN)PR_FindFunctionSymbol(mLibrary, "NP_Shutdown");
AssertPluginThread();
MOZ_ASSERT(mIsChrome);
-#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS)
+#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS) || defined(OS_HURD)
return IPC_OK();
#elif defined(OS_WIN) || defined(OS_MACOSX)
*_retval = mGetEntryPointsFunc(&mFunctions);
#endif
NPError result;
-#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS)
+#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS) || defined(OS_HURD)
result = mInitializeFunc(&sBrowserFuncs, &mFunctions);
#elif defined(OS_WIN) || defined(OS_MACOSX)
result = mInitializeFunc(&sBrowserFuncs);
// we get this from the plugin
NP_PLUGINSHUTDOWN mShutdownFunc;
-#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS)
+#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS) || defined(OS_HURD)
NP_PLUGINUNIXINIT mInitializeFunc;
#elif defined(OS_WIN) || defined(OS_MACOSX)
NP_PLUGININIT mInitializeFunc;
'OS_BSD': 1,
})
+ elif CONFIG['OS_ARCH'] == 'GNU':
+ DEFINES.update({
+ 'OS_HURD': 1,
+ })
+
else:
DEFINES['OS_LINUX'] = 1
'src/base/message_pump_glib.cc',
]
-if os_solaris:
+if os_solaris or os_hurd:
SOURCES += [
'src/base/process_util_linux.cc',
'src/base/time_posix.cc',
#if defined(OS_POSIX)
# include "base/message_pump_libevent.h"
#endif
-#if defined(OS_LINUX) || defined(OS_BSD)
+#if defined(OS_LINUX) || defined(OS_BSD)|| defined(OS_HURD)
# if defined(MOZ_WIDGET_GTK)
# include "base/message_pump_glib.h"
# endif
if (type_ == TYPE_UI) {
# if defined(OS_MACOSX)
pump_ = base::MessagePumpMac::Create();
-# elif defined(OS_LINUX) || defined(OS_BSD)
+# elif defined(OS_LINUX) || defined(OS_BSD) || defined(OS_HURD)
pump_ = new base::MessagePumpForUI();
# endif // OS_LINUX
} else if (type_ == TYPE_IO) {
#if defined(ANDROID)
static const rlim_t kSystemDefaultMaxFds = 1024;
static const char kFDDir[] = "/proc/self/fd";
-#elif defined(OS_LINUX) || defined(OS_SOLARIS)
+#elif defined(OS_LINUX) || defined(OS_SOLARIS) || defined(OS_HURD)
static const rlim_t kSystemDefaultMaxFds = 8192;
static const char kFDDir[] = "/proc/self/fd";
#elif defined(OS_MACOSX)
# define OS_MACOSX 1
#elif defined(__linux__) || defined(__GLIBC__) || defined(__GNU__)
# define OS_LINUX 1
+# define OS_HURD 1
#elif defined(__DragonFly__)
# define OS_DRAGONFLY 1
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
// For access to standard POSIX features, use OS_POSIX instead of a more
// specific macro.
#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) || \
- defined(OS_SOLARIS)
+ defined(OS_SOLARIS) || defined(OS_HURD)
# define OS_POSIX 1
#endif
os_posix = 0
os_macosx = 0
os_bsd = 0
+os_hurd = 0
os_linux = 0
os_solaris = 0
elif CONFIG['OS_ARCH'] == 'SunOS':
os_solaris = 1
libevent_include_suffix = 'solaris'
+ # attempt to get GNU hurd into the build again, further modification probably needed
+ elif CONFIG['OS_ARCH'] == 'GNU':
+ os_hurd = 1
+ libevent_include_suffix = 'gnu'
else:
os_linux = 1
if CONFIG['OS_TARGET'] == 'Android':
// and passing wstrings from one config to the other is unsafe. So
// we split the logic here.
-# if defined(OS_POSIX)
+# if defined(OS_POSIX) || defined(OS_HURD)
# if defined(MOZ_WIDGET_GTK)
if (mProcessType == GeckoProcessType_Content) {
// disable IM module to avoid sandbox violation
MOZ_ASSERT(gGREBinPath);
nsCString path;
NS_CopyUnicodeToNative(nsDependentString(gGREBinPath), path);
-# if defined(OS_LINUX) || defined(OS_BSD)
+# if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_HURD)
const char* ld_library_path = PR_GetEnv("LD_LIBRARY_PATH");
nsCString new_ld_lib_path(path.get());
childArgv.push_back(pidstring);
if (!CrashReporter::IsDummy()) {
-# if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS)
+# if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS) || defined(OS_HURD)
int childCrashFd, childCrashRemapFd;
if (!CrashReporter::CreateNotificationPipeForChild(&childCrashFd,
&childCrashRemapFd)) {
# define R01_sig(p) ((p)->sc_frame.fixreg[1])
# define R32_sig(p) ((p)->sc_frame.srr0)
# endif
-#elif defined(__linux__) || defined(__sun)
+#elif defined(__linux__) || defined(__sun) || defined(__GNU__)
# if defined(__linux__)
# define EIP_sig(p) ((p)->uc_mcontext.gregs[REG_EIP])
# define EBP_sig(p) ((p)->uc_mcontext.gregs[REG_EBP])