Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

added conditional compilation guards for unistd.h (ifndef OS_WIN) (is…

…sue #7)
  • Loading branch information...
commit 8e2cf415bb3b1616f3f0cbe4a8d40d87ee137398 1 parent bb20039
Dmitri S authored February 15, 2013
9  ipc/chromium/src/base/file_util.cc
@@ -6,13 +6,12 @@
6 6
 
7 7
 #if defined(OS_WIN)
8 8
 #include <io.h>
  9
+// commented out #if defined(ANDROID) to prevent the compile error 
  10
+// due to undefine ftrunctate on Linux
  11
+#else
  12
+#include <unistd.h>
9 13
 #endif
10 14
 #include <stdio.h>
11  
-// /home/dsavints/dev/hack/dominator/ipc/chromium/src/base/file_util.cc (D.S.)
12  
-// commented out #if defined(ANDROID) to prevent the compile error due to undefine ftrunctate
13  
-//#if defined(ANDROID)
14  
-#include <unistd.h>
15  
-//#endif
16 15
 
17 16
 #include <fstream>
18 17
 
2  ipc/chromium/src/base/file_util_linux.cc
@@ -5,8 +5,10 @@
5 5
 #include "base/file_util.h"
6 6
 
7 7
 #include <fcntl.h>
  8
+#ifndef OS_WIN
8 9
 // https://bugzilla.mozilla.org/show_bug.cgi?id=736765 - added unistd.h to avoid compile error (DS)
9 10
 #include <unistd.h>
  11
+#endif
10 12
 
11 13
 #include <string>
12 14
 #include <vector>
5  ipc/chromium/src/base/message_pump_libevent.cc
@@ -6,8 +6,11 @@
6 6
 
7 7
 #include <errno.h>
8 8
 #include <fcntl.h>
9  
-// https://bugzilla.mozilla.org/show_bug.cgi?id=746526 - added unistd.h to avoid compile error (D.S.)
  9
+#ifndef OS_WIN
  10
+// https://bugzilla.mozilla.org/show_bug.cgi?id=746526 - added unistd.h 
  11
+// to avoid compile error on Linux 
10 12
 #include <unistd.h>
  13
+#endif
11 14
 
12 15
 #include "eintr_wrapper.h"
13 16
 #include "base/logging.h"
2  ipc/chromium/src/base/time_posix.cc
@@ -3,7 +3,9 @@
3 3
 // found in the LICENSE file.
4 4
 
5 5
 #include "base/time.h"
  6
+#ifndef OS_WIN
6 7
 #include <unistd.h>
  8
+#endif
7 9
 
8 10
 #ifdef OS_MACOSX
9 11
 #include <mach/mach_time.h>

0 notes on commit 8e2cf41

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