Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Unified Diff: native_client_sdk/src/libraries/nacl_io/kernel_wrap_win.cc

Issue 73083005: [NaCl SDK] Enable linux host build for nacl_io and nacl_io_tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: native_client_sdk/src/libraries/nacl_io/kernel_wrap_win.cc
diff --git a/native_client_sdk/src/libraries/nacl_io/kernel_wrap_win.cc b/native_client_sdk/src/libraries/nacl_io/kernel_wrap_win.cc
index c5dcc02679b45df130699449d6c71b2c6c06710c..cf35f96987500560eebec806e3a66c327bd57523 100644
--- a/native_client_sdk/src/libraries/nacl_io/kernel_wrap_win.cc
+++ b/native_client_sdk/src/libraries/nacl_io/kernel_wrap_win.cc
@@ -215,74 +215,6 @@ int _write(int fd, const void* buf, size_t nbyte) {
return ki_write(fd, buf, nbyte);
}
-
-// "real" functions, i.e. the unwrapped original functions. On Windows we don't
-// wrap, so the real functions aren't accessible. In most cases, we just fail.
-
-int _real_close(int fd) {
- return ENOSYS;
-}
-
-int _real_fstat(int fd, struct stat *buf) {
- return 0;
-}
-
-int _real_getdents(int fd, void* nacl_buf, size_t nacl_count, size_t *nread) {
- return ENOSYS;
-}
-
-int _real_lseek(int fd, off_t offset, int whence, off_t* new_offset) {
- return ENOSYS;
-}
-
-int _real_mkdir(const char* pathname, mode_t mode) {
- return ENOSYS;
-}
-
-int _real_mmap(void** addr, size_t length, int prot, int flags, int fd,
- off_t offset) {
- return ENOSYS;
-}
-
-int _real_munmap(void* addr, size_t length) {
- return ENOSYS;
-}
-
-int _real_open(const char* pathname, int oflag, mode_t cmode, int* newfd) {
- return ENOSYS;
-}
-
-int _real_open_resource(const char* file, int* fd) {
- return ENOSYS;
-}
-
-int _real_read(int fd, void *buf, size_t count, size_t *nread) {
- *nread = count;
- return 0;
-}
-
-int _real_rmdir(const char* pathname) {
- return ENOSYS;
-}
-
-int _real_write(int fd, const void *buf, size_t count, size_t *nwrote) {
- *nwrote = count;
- return 0;
-}
-
-#define USECS_FROM_WIN_TO_TO_UNIX_EPOCH 11644473600000LL
-uint64_t usec_since_epoch() {
- FILETIME ft;
- ULARGE_INTEGER ularge;
- GetSystemTimeAsFileTime(&ft);
-
- ularge.LowPart = ft.dwLowDateTime;
- ularge.HighPart = ft.dwHighDateTime;
-
- // Truncate to usec resolution.
- return ularge.QuadPart / 10;
-}
-
// Do nothing for Windows, we replace the library at link time.
void kernel_wrap_init() {
}
« no previous file with comments | « native_client_sdk/src/libraries/nacl_io/kernel_wrap_newlib.cc ('k') | native_client_sdk/src/libraries/nacl_io/library.dsc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698