OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2007-2008 the V8 project authors. All rights reserved. | 2 * Copyright 2007-2008 the V8 project authors. All rights reserved. |
3 * Redistribution and use in source and binary forms, with or without | 3 * Redistribution and use in source and binary forms, with or without |
4 * modification, are permitted provided that the following conditions are | 4 * modification, are permitted provided that the following conditions are |
5 * met: | 5 * met: |
6 * | 6 * |
7 * * Redistributions of source code must retain the above copyright | 7 * * Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * * Redistributions in binary form must reproduce the above | 9 * * Redistributions in binary form must reproduce the above |
10 * copyright notice, this list of conditions and the following | 10 * copyright notice, this list of conditions and the following |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 #else | 51 #else |
52 #define IEEE_8087 | 52 #define IEEE_8087 |
53 #endif | 53 #endif |
54 | 54 |
55 #define __MATH_H__ | 55 #define __MATH_H__ |
56 #if defined(__APPLE__) && defined(__MACH__) | 56 #if defined(__APPLE__) && defined(__MACH__) |
57 /* stdlib.h on Apple's 10.5 and later SDKs will mangle the name of strtod. | 57 /* stdlib.h on Apple's 10.5 and later SDKs will mangle the name of strtod. |
58 * If it's included after strtod is redefined as gay_strtod, it will mangle | 58 * If it's included after strtod is redefined as gay_strtod, it will mangle |
59 * the name of gay_strtod, which is unwanted. */ | 59 * the name of gay_strtod, which is unwanted. */ |
60 #include <stdlib.h> | 60 #include <stdlib.h> |
| 61 |
61 #endif | 62 #endif |
| 63 /* stdlib.h on Windows adds __declspec(dllimport) to all functions when using |
| 64 * the DLL version of the CRT (compiling with /MD or /MDd). If stdlib.h is |
| 65 * included after strtod is redefined as gay_strtod, it will add |
| 66 * __declspec(dllimport) to gay_strtod, which causes the compilation of |
| 67 * gay_strtod in dtoa.c to fail. |
| 68 */ |
| 69 #if defined(WIN32) && defined(_DLL) |
| 70 #include "stdlib.h" |
| 71 #endif |
| 72 |
62 /* Make sure we use the David M. Gay version of strtod(). On Linux, we | 73 /* Make sure we use the David M. Gay version of strtod(). On Linux, we |
63 * cannot use the same name (maybe the function does not have weak | 74 * cannot use the same name (maybe the function does not have weak |
64 * linkage?). */ | 75 * linkage?). */ |
65 #define strtod gay_strtod | 76 #define strtod gay_strtod |
66 #include "third_party/dtoa/dtoa.c" | 77 #include "third_party/dtoa/dtoa.c" |
OLD | NEW |