Bug 753046 - Add IPC support for BSDs, ipc/glue part. r=cjones

This commit is contained in:
Martin Husemann 2012-08-28 23:16:29 +02:00
parent 15d5f62603
commit f741a2a7bc
2 changed files with 6 additions and 6 deletions

View File

@ -437,7 +437,7 @@ GeckoChildProcessHost::PerformAsyncLaunchInternal(std::vector<std::string>& aExt
// and passing wstrings from one config to the other is unsafe. So
// we split the logic here.
#if defined(OS_LINUX) || defined(OS_MACOSX)
#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
base::environment_map newEnvVars;
base::ChildPrivileges privs = kLowRightsSubprocesses ?
base::UNPRIVILEGED :
@ -455,8 +455,8 @@ GeckoChildProcessHost::PerformAsyncLaunchInternal(std::vector<std::string>& aExt
if (NS_SUCCEEDED(rv)) {
nsCString path;
greDir->GetNativePath(path);
# ifdef OS_LINUX
# ifdef MOZ_WIDGET_ANDROID
# if defined(OS_LINUX) || defined(OS_BSD)
# if defined(MOZ_WIDGET_ANDROID) || defined(OS_BSD)
path += "/lib";
# endif // MOZ_WIDGET_ANDROID
const char *ld_library_path = PR_GetEnv("LD_LIBRARY_PATH");
@ -575,7 +575,7 @@ GeckoChildProcessHost::PerformAsyncLaunchInternal(std::vector<std::string>& aExt
childArgv.push_back(pidstring);
#if defined(MOZ_CRASHREPORTER)
# if defined(OS_LINUX)
# if defined(OS_LINUX) || defined(OS_BSD)
int childCrashFd, childCrashRemapFd;
if (!CrashReporter::CreateNotificationPipeForChild(
&childCrashFd, &childCrashRemapFd))
@ -612,7 +612,7 @@ GeckoChildProcessHost::PerformAsyncLaunchInternal(std::vector<std::string>& aExt
#endif
base::LaunchApp(childArgv, mFileMap,
#if defined(OS_LINUX) || defined(OS_MACOSX)
#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
newEnvVars, privs,
#endif
false, &process, arch);

View File

@ -8,7 +8,7 @@
#ifndef mozilla_ipc_SharedMemorySysV_h
#define mozilla_ipc_SharedMemorySysV_h
#if defined(OS_LINUX) && !defined(ANDROID)
#if (defined(OS_LINUX) && !defined(ANDROID)) || defined(OS_BSD)
// SysV shared memory isn't available on Windows, but we define the
// following macro so that #ifdefs are clearer (compared to #ifdef