| OLD | NEW |
| 1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ | 1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
| 2 /* This Source Code Form is subject to the terms of the Mozilla Public | 2 /* This Source Code Form is subject to the terms of the Mozilla Public |
| 3 * License, v. 2.0. If a copy of the MPL was not distributed with this | 3 * License, v. 2.0. If a copy of the MPL was not distributed with this |
| 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
| 5 | 5 |
| 6 /* | 6 /* |
| 7 * This file is based on the third-party code dtoa.c. We minimize our | 7 * This file is based on the third-party code dtoa.c. We minimize our |
| 8 * modifications to third-party code to make it easy to merge new versions. | 8 * modifications to third-party code to make it easy to merge new versions. |
| 9 * The author of dtoa.c was not willing to add the parentheses suggested by | 9 * The author of dtoa.c was not willing to add the parentheses suggested by |
| 10 * GCC, so we suppress these warnings. | 10 * GCC, so we suppress these warnings. |
| 11 */ | 11 */ |
| 12 #if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2) | 12 #if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2) |
| 13 #pragma GCC diagnostic ignored "-Wparentheses" | 13 #pragma GCC diagnostic ignored "-Wparentheses" |
| 14 #endif | 14 #endif |
| 15 | 15 |
| 16 #if _MSC_VER == 1800 | |
| 17 // TODO(scottmg): Crashes VS2013 RC. Upstream bug filed and should be fixed | |
| 18 // in the next release. http://crbug.com/288948. | |
| 19 #pragma optimize("", off) | |
| 20 #endif | |
| 21 | |
| 22 #include "primpl.h" | 16 #include "primpl.h" |
| 23 #include "prbit.h" | 17 #include "prbit.h" |
| 24 | 18 |
| 25 #define MULTIPLE_THREADS | 19 #define MULTIPLE_THREADS |
| 26 #define ACQUIRE_DTOA_LOCK(n) PR_Lock(dtoa_lock[n]) | 20 #define ACQUIRE_DTOA_LOCK(n) PR_Lock(dtoa_lock[n]) |
| 27 #define FREE_DTOA_LOCK(n) PR_Unlock(dtoa_lock[n]) | 21 #define FREE_DTOA_LOCK(n) PR_Unlock(dtoa_lock[n]) |
| 28 | 22 |
| 29 static PRLock *dtoa_lock[2]; | 23 static PRLock *dtoa_lock[2]; |
| 30 | 24 |
| 31 void _PR_InitDtoa(void) | 25 void _PR_InitDtoa(void) |
| (...skipping 3487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3519 } | 3513 } |
| 3520 | 3514 |
| 3521 while (*nump != '\0') { | 3515 while (*nump != '\0') { |
| 3522 *bufp++ = *nump++; | 3516 *bufp++ = *nump++; |
| 3523 } | 3517 } |
| 3524 *bufp++ = '\0'; | 3518 *bufp++ = '\0'; |
| 3525 } | 3519 } |
| 3526 done: | 3520 done: |
| 3527 PR_DELETE(num); | 3521 PR_DELETE(num); |
| 3528 } | 3522 } |
| OLD | NEW |