diff options
author | deanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-28 22:10:55 +0000 |
---|---|---|
committer | deanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-28 22:10:55 +0000 |
commit | 7aaabfdfa7052d7c128cdbf9cebe62358b1e0739 (patch) | |
tree | 4cdbbe6c0867cf0af474f7ca022982c311cd4ed8 /base/third_party | |
parent | 16395142c1bd6b2203fa67585ec52316f8156aaa (diff) | |
download | chromium_src-7aaabfdfa7052d7c128cdbf9cebe62358b1e0739.zip chromium_src-7aaabfdfa7052d7c128cdbf9cebe62358b1e0739.tar.gz chromium_src-7aaabfdfa7052d7c128cdbf9cebe62358b1e0739.tar.bz2 |
Change for building dtoa on 64-bit.
Review URL: http://codereview.chromium.org/159541
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21901 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/third_party')
-rw-r--r-- | base/third_party/dmg_fp/README.chromium | 1 | ||||
-rw-r--r-- | base/third_party/dmg_fp/dtoa.cc | 6 | ||||
-rw-r--r-- | base/third_party/dmg_fp/gcc_64_bit.patch | 25 |
3 files changed, 31 insertions, 1 deletions
diff --git a/base/third_party/dmg_fp/README.chromium b/base/third_party/dmg_fp/README.chromium index 4f75398..046f273 100644 --- a/base/third_party/dmg_fp/README.chromium +++ b/base/third_party/dmg_fp/README.chromium @@ -13,3 +13,4 @@ List of changes made to original code: - added #define NO_HEX_FP to dtoa.cc - made some minor changes to allow clean compilation under g++ -Wall, see gcc_warnings.patch. + - made some minor changes to build on 64-bit, see gcc_64_bit.patch. diff --git a/base/third_party/dmg_fp/dtoa.cc b/base/third_party/dmg_fp/dtoa.cc index 83c3595..c1bc476 100644 --- a/base/third_party/dmg_fp/dtoa.cc +++ b/base/third_party/dmg_fp/dtoa.cc @@ -183,8 +183,12 @@ #define NO_HEX_FP #ifndef Long +#if __LP64__ +#define Long int +#else #define Long long #endif +#endif #ifndef ULong typedef unsigned Long ULong; #endif @@ -221,7 +225,7 @@ extern void *MALLOC(size_t); #ifndef PRIVATE_MEM #define PRIVATE_MEM 2304 #endif -#define PRIVATE_mem ((PRIVATE_MEM+sizeof(double)-1)/sizeof(double)) +#define PRIVATE_mem ((unsigned)((PRIVATE_MEM+sizeof(double)-1)/sizeof(double))) static double private_mem[PRIVATE_mem], *pmem_next = private_mem; #endif diff --git a/base/third_party/dmg_fp/gcc_64_bit.patch b/base/third_party/dmg_fp/gcc_64_bit.patch new file mode 100644 index 0000000..ab943c0 --- /dev/null +++ b/base/third_party/dmg_fp/gcc_64_bit.patch @@ -0,0 +1,25 @@ +Index: dtoa.cc +--- dtoa.cc (old copy) ++++ dtoa.cc (working copy) +@@ -183,8 +183,12 @@ + #define NO_HEX_FP + + #ifndef Long ++#if __LP64__ ++#define Long int ++#else + #define Long long + #endif ++#endif + #ifndef ULong + typedef unsigned Long ULong; + #endif +@@ -221,7 +225,7 @@ extern void *MALLOC(size_t); + #ifndef PRIVATE_MEM + #define PRIVATE_MEM 2304 + #endif +-#define PRIVATE_mem ((PRIVATE_MEM+sizeof(double)-1)/sizeof(double)) ++#define PRIVATE_mem ((unsigned)((PRIVATE_MEM+sizeof(double)-1)/sizeof(double))) + static double private_mem[PRIVATE_mem], *pmem_next = private_mem; + #endif + |