summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/common/common.scons13
-rw-r--r--chrome/common/ipc_channel_posix.cc8
-rw-r--r--chrome/common/ipc_tests.scons27
3 files changed, 36 insertions, 12 deletions
diff --git a/chrome/common/common.scons b/chrome/common/common.scons
index 5f4d8fa..eda51df 100644
--- a/chrome/common/common.scons
+++ b/chrome/common/common.scons
@@ -90,7 +90,6 @@ if env['PLATFORM'] == 'win32':
'gfx/icon_util.cc',
'gfx/path.cc',
'gfx/text_elider.cc',
- 'ipc_channel_win.cc',
'ipc_channel_proxy.cc',
'ipc_logging.cc',
'ipc_message_utils.cc',
@@ -112,6 +111,18 @@ if env['PLATFORM'] == 'win32':
'worker_thread_ticker.cc',
])
+
+if env['PLATFORM'] == 'win32':
+ # Windows specific files
+ input_files.extend([
+ 'ipc_channel_win.cc',
+ ])
+else:
+ input_files.extend([
+ 'ipc_channel_posix.cc',
+ ])
+
+
if env['PLATFORM'] in ('posix', 'win32'):
# TODO(port): This should be enabled for all platforms.
env.ChromeStaticLibrary('common', input_files)
diff --git a/chrome/common/ipc_channel_posix.cc b/chrome/common/ipc_channel_posix.cc
index 45573ae..9a30f80 100644
--- a/chrome/common/ipc_channel_posix.cc
+++ b/chrome/common/ipc_channel_posix.cc
@@ -4,12 +4,12 @@
#include "chrome/common/ipc_channel_posix.h"
+#include <errno.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <stddef.h>
-#include <sys/un.h>
#include "base/logging.h"
#include "base/process_util.h"
@@ -18,6 +18,12 @@
#include "chrome/common/chrome_counters.h"
#include "chrome/common/ipc_message_utils.h"
+#if defined(OS_LINUX)
+#include <linux/un.h>
+#elif defined(OS_MACOSX)
+#include <sys/un.h>
+#endif
+
namespace IPC {
//------------------------------------------------------------------------------
diff --git a/chrome/common/ipc_tests.scons b/chrome/common/ipc_tests.scons
index 91c8363..48b098e 100644
--- a/chrome/common/ipc_tests.scons
+++ b/chrome/common/ipc_tests.scons
@@ -20,6 +20,11 @@ env.SConscript([
'$ZLIB_DIR/using_zlib.scons',
], {'env':env})
+if env['PLATFORM'] in ('posix', 'darwin'):
+ env.SConscript([
+ '$LIBEVENT_DIR/using_libevent.scons',
+ ], {'env':env})
+
# TODO(sgk): convert into a using_*.scons pattern when we update WebKit.
env.Append(
CPPPATH = [
@@ -69,15 +74,17 @@ if env['PLATFORM'] == 'win32':
],
)
-if env['PLATFORM'] == 'win32':
- # TODO(port): Port this.
- input_files = [
- 'ipc_fuzzing_tests.cc',
- 'ipc_tests.cc',
+input_files = [
+ 'ipc_fuzzing_tests.cc',
+ 'ipc_tests.cc',
+
+ '$BASE_DIR/perftimer$OBJSUFFIX',
+]
- '$BASE_DIR/perftimer$OBJSUFFIX',
- ]
+if env['PLATFORM'] == 'posix':
+ # TODO(port): These tests don't work yet.
+ input_files.remove('ipc_fuzzing_tests.cc')
- ipc_tests = env.ChromeTestProgram('ipc_tests', input_files)
- i = env.Install('$TARGET_ROOT', ipc_tests)
- Alias('chrome', i)
+ipc_tests = env.ChromeTestProgram('ipc_tests', input_files)
+i = env.Install('$TARGET_ROOT', ipc_tests)
+Alias('chrome', i)