OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2011 The Native Client Authors. All rights reserved. | 2 * Copyright (c) 2011 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 // This module contains parsing code to be used with sel_universal. | 7 // This module contains parsing code to be used with sel_universal. |
8 // Since sel_universal is a testing tool and parsing in C++ is no fun, | 8 // Since sel_universal is a testing tool and parsing in C++ is no fun, |
9 // this code merely aims at being maitainable. | 9 // this code merely aims at being maitainable. |
10 // Efficiency and proper dealing with bad input are non-goals. | 10 // Efficiency and proper dealing with bad input are non-goals. |
11 | 11 |
12 #include <ctype.h> | 12 #include <ctype.h> |
13 #include <stdio.h> | 13 #include <stdio.h> |
14 #include <stdlib.h> | 14 #include <stdlib.h> |
15 #include <string.h> | 15 #include <string.h> |
16 | 16 |
| 17 #include "native_client/src/include/nacl_defines.h" |
| 18 |
17 #if NACL_WINDOWS | 19 #if NACL_WINDOWS |
18 #include <float.h> | 20 #include <float.h> |
19 #define NACL_ISNAN(d) _isnan(d) | 21 #define NACL_ISNAN(d) _isnan(d) |
20 #else | 22 #else |
21 /* Windows doesn't have the following header files. */ | 23 /* Windows doesn't have the following header files. */ |
22 # include <math.h> | 24 # include <math.h> |
23 #define NACL_ISNAN(d) isnan(d) | 25 #define NACL_ISNAN(d) isnan(d) |
24 #endif /* NACL_WINDOWS */ | 26 #endif /* NACL_WINDOWS */ |
25 | 27 |
26 #include <iomanip> | 28 #include <iomanip> |
(...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
797 break; | 799 break; |
798 } | 800 } |
799 } | 801 } |
800 | 802 |
801 | 803 |
802 void FreeArrayArgs(NaClSrpcArg** args) { | 804 void FreeArrayArgs(NaClSrpcArg** args) { |
803 for (size_t i = 0; args[i] != NULL; ++i) { | 805 for (size_t i = 0; args[i] != NULL; ++i) { |
804 FreeArrayArg(args[i]); | 806 FreeArrayArg(args[i]); |
805 } | 807 } |
806 } | 808 } |
OLD | NEW |