| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. | 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
| 4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
| 5 */ | 5 */ |
| 6 | 6 |
| 7 /* | 7 /* |
| 8 * portability macros for file descriptors, read, write, open, etc. | 8 * portability macros for file descriptors, read, write, open, etc. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 #ifndef NATIVE_CLIENT_SRC_INCLUDE_PORTABILITY_IO_H_ | 11 #ifndef NATIVE_CLIENT_SRC_INCLUDE_PORTABILITY_IO_H_ |
| 12 #define NATIVE_CLIENT_SRC_INCLUDE_PORTABILITY_IO_H_ 1 | 12 #define NATIVE_CLIENT_SRC_INCLUDE_PORTABILITY_IO_H_ 1 |
| 13 | 13 |
| 14 #include <fcntl.h> | 14 #include <fcntl.h> |
| 15 | 15 |
| 16 #include "native_client/src/include/nacl_defines.h" |
| 17 |
| 16 #if NACL_WINDOWS | 18 #if NACL_WINDOWS |
| 17 /* disable warnings for deprecated _snprintf */ | 19 /* disable warnings for deprecated _snprintf */ |
| 18 #pragma warning(disable : 4996) | 20 #pragma warning(disable : 4996) |
| 19 | 21 |
| 20 #include <io.h> | 22 #include <io.h> |
| 21 #include <direct.h> | 23 #include <direct.h> |
| 22 | 24 |
| 23 #define DUP _dup | 25 #define DUP _dup |
| 24 #define DUP2 _dup2 | 26 #define DUP2 _dup2 |
| 25 #define OPEN _open | 27 #define OPEN _open |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 #define SNPRINTF snprintf | 59 #define SNPRINTF snprintf |
| 58 #define VSNPRINTF vsnprintf | 60 #define VSNPRINTF vsnprintf |
| 59 #define UNLINK unlink | 61 #define UNLINK unlink |
| 60 #define MKDIR(p, m) mkdir(p, m) | 62 #define MKDIR(p, m) mkdir(p, m) |
| 61 #define RMDIR rmdir | 63 #define RMDIR rmdir |
| 62 #define _O_BINARY 0 | 64 #define _O_BINARY 0 |
| 63 #define WRITE write | 65 #define WRITE write |
| 64 #endif | 66 #endif |
| 65 | 67 |
| 66 #endif /* NATIVE_CLIENT_SRC_INCLUDE_PORTABILITY_IO_H_ */ | 68 #endif /* NATIVE_CLIENT_SRC_INCLUDE_PORTABILITY_IO_H_ */ |
| OLD | NEW |