Chromium Code Reviews| 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 29 matching lines...) Expand all Loading... | |
| 40 #if !(defined(__APPLE__) && defined(__MACH__)) && \ | 40 #if !(defined(__APPLE__) && defined(__MACH__)) && \ |
| 41 !defined(WIN32) && !defined(__FreeBSD__) | 41 !defined(WIN32) && !defined(__FreeBSD__) |
| 42 #include <endian.h> | 42 #include <endian.h> |
| 43 #endif | 43 #endif |
| 44 #include <math.h> | 44 #include <math.h> |
| 45 #include <float.h> | 45 #include <float.h> |
| 46 | 46 |
| 47 /* The floating point word order on ARM is big endian when floating point | 47 /* The floating point word order on ARM is big endian when floating point |
| 48 * emulation is used, even if the byte order is little endian */ | 48 * emulation is used, even if the byte order is little endian */ |
| 49 #if !(defined(__APPLE__) && defined(__MACH__)) && !defined(WIN32) && \ | 49 #if !(defined(__APPLE__) && defined(__MACH__)) && !defined(WIN32) && \ |
| 50 !defined(__FreeBSD__) && __FLOAT_WORD_ORDER == __BIG_ENDIAN | 50 !defined(__FreeBSD__) && __FLOAT_WORD_ORDER == __BIG_ENDIAN |
|
wtc
2009/05/12 17:47:46
Strictly speaking, we should test the processor ar
| |
| 51 #define IEEE_MC68k | 51 #define IEEE_MC68k |
| 52 #else | 52 #else |
| 53 #define IEEE_8087 | 53 #define IEEE_8087 |
| 54 #endif | 54 #endif |
| 55 | 55 |
| 56 /* No hex floating point support needed */ | |
| 57 #define NO_HEX_FP | |
| 58 | |
| 56 #define __MATH_H__ | 59 #define __MATH_H__ |
| 57 #if defined(__APPLE__) && defined(__MACH__) || defined(__FreeBSD__) | 60 #if defined(__APPLE__) && defined(__MACH__) || defined(__FreeBSD__) |
| 58 /* stdlib.h on FreeBSD and Apple's 10.5 and later SDKs will mangle the | 61 /* stdlib.h on FreeBSD and Apple's 10.5 and later SDKs will mangle the |
| 59 * name of strtod. If it's included after strtod is redefined as | 62 * name of strtod. If it's included after strtod is redefined as |
| 60 * gay_strtod, it will mangle the name of gay_strtod, which is | 63 * gay_strtod, it will mangle the name of gay_strtod, which is |
| 61 * unwanted. */ | 64 * unwanted. */ |
| 62 #include <stdlib.h> | 65 #include <stdlib.h> |
| 63 | 66 |
| 64 #endif | 67 #endif |
| 65 /* stdlib.h on Windows adds __declspec(dllimport) to all functions when using | 68 /* stdlib.h on Windows adds __declspec(dllimport) to all functions when using |
| 66 * the DLL version of the CRT (compiling with /MD or /MDd). If stdlib.h is | 69 * the DLL version of the CRT (compiling with /MD or /MDd). If stdlib.h is |
| 67 * included after strtod is redefined as gay_strtod, it will add | 70 * included after strtod is redefined as gay_strtod, it will add |
| 68 * __declspec(dllimport) to gay_strtod, which causes the compilation of | 71 * __declspec(dllimport) to gay_strtod, which causes the compilation of |
| 69 * gay_strtod in dtoa.c to fail. | 72 * gay_strtod in dtoa.c to fail. |
| 70 */ | 73 */ |
| 71 #if defined(WIN32) && defined(_DLL) | 74 #if defined(WIN32) && defined(_DLL) |
| 72 #include "stdlib.h" | 75 #include "stdlib.h" |
|
wtc
2009/05/12 17:47:46
Nit: use <stdlib.h> for a system header. You may
| |
| 73 #endif | 76 #endif |
| 74 | 77 |
| 75 /* For MinGW, turn on __NO_ISOCEXT so that its strtod doesn't get added */ | 78 /* For MinGW, turn on __NO_ISOCEXT so that its strtod doesn't get added */ |
| 76 #ifdef __MINGW32__ | 79 #ifdef __MINGW32__ |
| 77 #define __NO_ISOCEXT | 80 #define __NO_ISOCEXT |
| 78 #endif /* __MINGW32__ */ | 81 #endif /* __MINGW32__ */ |
| 79 | 82 |
| 80 /* Make sure we use the David M. Gay version of strtod(). On Linux, we | 83 /* Make sure we use the David M. Gay version of strtod(). On Linux, we |
| 81 * cannot use the same name (maybe the function does not have weak | 84 * cannot use the same name (maybe the function does not have weak |
| 82 * linkage?). */ | 85 * linkage?). */ |
| 83 #define strtod gay_strtod | 86 #define strtod gay_strtod |
| 84 #include "third_party/dtoa/dtoa.c" | 87 #include "third_party/dtoa/dtoa.c" |
| OLD | NEW |