diff options
author | binji@chromium.org <binji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-21 18:11:34 +0000 |
---|---|---|
committer | binji@chromium.org <binji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-21 18:11:34 +0000 |
commit | 126b284377c8011d5699c1327dbb5241fc817cb3 (patch) | |
tree | 607471a03cad3a0f1c1e18d53700cfd2b43efa0d /native_client_sdk | |
parent | 97505bd6308400290f1e1b8f224b593a056ad89e (diff) | |
download | chromium_src-126b284377c8011d5699c1327dbb5241fc817cb3.zip chromium_src-126b284377c8011d5699c1327dbb5241fc817cb3.tar.gz chromium_src-126b284377c8011d5699c1327dbb5241fc817cb3.tar.bz2 |
[NaCl SDK] Fix SDK waterfall: unistd.h does not exist on windows.
BUG=none
TBR=noelallen@chromium.org
Review URL: https://codereview.chromium.org/17234004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207878 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'native_client_sdk')
7 files changed, 28 insertions, 8 deletions
diff --git a/native_client_sdk/src/build_tools/sdk_files.list b/native_client_sdk/src/build_tools/sdk_files.list index 16da40f..8866439 100644 --- a/native_client_sdk/src/build_tools/sdk_files.list +++ b/native_client_sdk/src/build_tools/sdk_files.list @@ -257,6 +257,7 @@ include/nacl_io/osinttypes.h include/nacl_io/osmman.h include/nacl_io/osstat.h include/nacl_io/ostypes.h +include/nacl_io/osunistd.h include/nacl_io/path.h include/nacl_io/pepper/all_interfaces.h include/nacl_io/pepper/define_empty_macros.h diff --git a/native_client_sdk/src/libraries/nacl_io/kernel_handle.cc b/native_client_sdk/src/libraries/nacl_io/kernel_handle.cc index a943894..74bee81 100644 --- a/native_client_sdk/src/libraries/nacl_io/kernel_handle.cc +++ b/native_client_sdk/src/libraries/nacl_io/kernel_handle.cc @@ -8,13 +8,9 @@ #include <fcntl.h> #include <pthread.h> -#ifndef WIN32 -// Needed for SEEK_SET/SEEK_CUR/SEEK_END. -#include <unistd.h> -#endif - #include "nacl_io/mount.h" #include "nacl_io/mount_node.h" +#include "nacl_io/osunistd.h" // It is only legal to construct a handle while the kernel lock is held. KernelHandle::KernelHandle(Mount* mnt, MountNode* node) diff --git a/native_client_sdk/src/libraries/nacl_io/library.dsc b/native_client_sdk/src/libraries/nacl_io/library.dsc index 81d621c..4359ff7 100644 --- a/native_client_sdk/src/libraries/nacl_io/library.dsc +++ b/native_client_sdk/src/libraries/nacl_io/library.dsc @@ -62,6 +62,7 @@ "osmman.h", "osstat.h", "ostypes.h", + "osunistd.h", "path.h", "pepper_interface.h", "real_pepper_interface.h", diff --git a/native_client_sdk/src/libraries/nacl_io/mount_dev.cc b/native_client_sdk/src/libraries/nacl_io/mount_dev.cc index a7e507a..660ae8d 100644 --- a/native_client_sdk/src/libraries/nacl_io/mount_dev.cc +++ b/native_client_sdk/src/libraries/nacl_io/mount_dev.cc @@ -9,11 +9,11 @@ #include <errno.h> #include <fcntl.h> #include <string.h> -#include <unistd.h> #include "nacl_io/kernel_wrap_real.h" #include "nacl_io/mount_dev.h" #include "nacl_io/mount_node.h" #include "nacl_io/mount_node_dir.h" +#include "nacl_io/osunistd.h" #include "nacl_io/pepper_interface.h" #include "sdk_util/auto_lock.h" diff --git a/native_client_sdk/src/libraries/nacl_io/mount_http.cc b/native_client_sdk/src/libraries/nacl_io/mount_http.cc index e9e7cf9..0a4fc43 100644 --- a/native_client_sdk/src/libraries/nacl_io/mount_http.cc +++ b/native_client_sdk/src/libraries/nacl_io/mount_http.cc @@ -13,7 +13,6 @@ #include <string.h> #include <sys/stat.h> #include <sys/types.h> -#include <unistd.h> #include <vector> @@ -22,6 +21,7 @@ #include "nacl_io/mount_node_dir.h" #include "nacl_io/mount_node_http.h" #include "nacl_io/osinttypes.h" +#include "nacl_io/osunistd.h" #include "sdk_util/auto_lock.h" namespace { diff --git a/native_client_sdk/src/libraries/nacl_io/mount_mem.cc b/native_client_sdk/src/libraries/nacl_io/mount_mem.cc index 290b5f8..8c5821c 100644 --- a/native_client_sdk/src/libraries/nacl_io/mount_mem.cc +++ b/native_client_sdk/src/libraries/nacl_io/mount_mem.cc @@ -6,7 +6,6 @@ #include <errno.h> #include <fcntl.h> -#include <unistd.h> #include <string> @@ -15,6 +14,7 @@ #include "nacl_io/mount_node_dir.h" #include "nacl_io/mount_node_mem.h" #include "nacl_io/osstat.h" +#include "nacl_io/osunistd.h" #include "nacl_io/path.h" #include "sdk_util/auto_lock.h" #include "sdk_util/ref_object.h" diff --git a/native_client_sdk/src/libraries/nacl_io/osunistd.h b/native_client_sdk/src/libraries/nacl_io/osunistd.h new file mode 100644 index 0000000..c5da0ef --- /dev/null +++ b/native_client_sdk/src/libraries/nacl_io/osunistd.h @@ -0,0 +1,22 @@ +/* Copyright (c) 2013 The Chromium Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ +#ifndef LIBRARIES_NACL_IO_OSUNISTD_H_ +#define LIBRARIES_NACL_IO_OSUNISTD_H_ + +#if defined(WIN32) + +#define R_OK 4 +#define W_OK 2 +#define X_OK 1 +#define F_OK 0 + +#else + +#include <unistd.h> + +#endif + +#endif // LIBRARIES_NACL_IO_OSUNISTD_H_ + |