Skip to content
Browse files

added standard style conditional compilation guards for unistd.h (ifn…

…def OS_WIN) (issue #7)
  • Loading branch information...
1 parent 8e2cf41 commit 3abacc591916ce4cbfa492a1bdfac8dc9b2a8190 Dmitry Savintsev committed Feb 15, 2013
View
7 ipc/chromium/src/base/file_util.cc
@@ -6,12 +6,11 @@
#if defined(OS_WIN)
#include <io.h>
-// commented out #if defined(ANDROID) to prevent the compile error
-// due to undefine ftrunctate on Linux
-#else
-#include <unistd.h>
#endif
#include <stdio.h>
+#if defined(ANDROID) || defined(OS_POSIX)
+#include <unistd.h>
+#endif
#include <fstream>
View
3 ipc/chromium/src/base/file_util_linux.cc
@@ -5,8 +5,7 @@
#include "base/file_util.h"
#include <fcntl.h>
-#ifndef OS_WIN
-// https://bugzilla.mozilla.org/show_bug.cgi?id=736765 - added unistd.h to avoid compile error (DS)
+#if defined(ANDROID) || defined(OS_POSIX)
#include <unistd.h>
#endif
View
4 ipc/chromium/src/base/message_pump_libevent.cc
@@ -6,9 +6,7 @@
#include <errno.h>
#include <fcntl.h>
-#ifndef OS_WIN
-// https://bugzilla.mozilla.org/show_bug.cgi?id=746526 - added unistd.h
-// to avoid compile error on Linux
+#if defined(ANDROID) || defined(OS_POSIX)
#include <unistd.h>
#endif
View
7 ipc/chromium/src/base/time_posix.cc
@@ -3,9 +3,6 @@
// found in the LICENSE file.
#include "base/time.h"
-#ifndef OS_WIN
-#include <unistd.h>
-#endif
#ifdef OS_MACOSX
#include <mach/mach_time.h>
@@ -17,6 +14,10 @@
#include <time.h>
#endif
+#if defined(ANDROID) || defined(OS_POSIX)
+#include <unistd.h>
+#endif
+
#include <limits>
#include "base/basictypes.h"

0 comments on commit 3abacc5

Please sign in to comment.
Something went wrong with that request. Please try again.