OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The Native Client Authors. All rights reserved. | 2 * Copyright (c) 2013 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 * Exercise NaClDescIoDescFromHandleFactory and make sure it works. | 8 * Exercise NaClDescIoDescFromHandleFactory and make sure it works. |
9 */ | 9 */ |
10 | 10 |
11 #include <fcntl.h> | 11 #include <fcntl.h> |
12 #include <stdio.h> | 12 #include <stdio.h> |
13 #include <string.h> | 13 #include <string.h> |
14 #include <sys/stat.h> | 14 #include <sys/stat.h> |
15 #include <sys/types.h> | 15 #include <sys/types.h> |
16 | 16 |
| 17 #include "native_client/src/include/nacl_defines.h" |
| 18 |
17 #if NACL_WINDOWS | 19 #if NACL_WINDOWS |
18 # include <io.h> | 20 # include <io.h> |
19 # include <windows.h> | 21 # include <windows.h> |
20 #endif | 22 #endif |
21 | 23 |
22 | 24 |
23 #include "native_client/src/include/nacl_macros.h" | 25 #include "native_client/src/include/nacl_macros.h" |
24 #include "native_client/src/include/portability.h" | 26 #include "native_client/src/include/portability.h" |
25 #include "native_client/src/shared/imc/nacl_imc_c.h" | 27 #include "native_client/src/shared/imc/nacl_imc_c.h" |
26 #include "native_client/src/shared/platform/nacl_check.h" | 28 #include "native_client/src/shared/platform/nacl_check.h" |
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 } | 440 } |
439 | 441 |
440 printf("Total of %"NACL_PRIuS" error%s.\n", | 442 printf("Total of %"NACL_PRIuS" error%s.\n", |
441 error_count, (error_count == 1) ? "" : "s"); | 443 error_count, (error_count == 1) ? "" : "s"); |
442 | 444 |
443 NaClPlatformFini(); | 445 NaClPlatformFini(); |
444 | 446 |
445 /* we ignore the 2^32 or 2^64 total errors case */ | 447 /* we ignore the 2^32 or 2^64 total errors case */ |
446 return (error_count > 255) ? 255 : error_count; | 448 return (error_count > 255) ? 255 : error_count; |
447 } | 449 } |
OLD | NEW |