Bug 745762 - double-conversion.h fails to compile on mingw r=jwalden
authorJacek Caban <jacek@codeweavers.com>
Fri, 27 Apr 2012 11:40:05 +0200
changeset 96671 546445acceaea06e47f67b5a6a39c0be2dcdc22b
parent 96670 76447b588eea4fd7f1a5e74e13e482d2e1a7ea27
child 96672 d46ef89f0bdabc1ab60872cea232cae8f7b14797
push id1116
push userlsblakk@mozilla.com
push dateMon, 16 Jul 2012 19:38:18 +0000
treeherdermozilla-beta@95f959a8b4dc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwalden
bugs745762
milestone15.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 745762 - double-conversion.h fails to compile on mingw r=jwalden
mfbt/double-conversion/add-mfbt-api-markers.patch
mfbt/double-conversion/double-conversion.h
mfbt/double-conversion/update.sh
--- a/mfbt/double-conversion/add-mfbt-api-markers.patch
+++ b/mfbt/double-conversion/add-mfbt-api-markers.patch
@@ -14,31 +14,16 @@ index f98edae..e536a01 100644
    }
  
    // Returns a converter following the EcmaScript specification.
 -  static const DoubleToStringConverter& EcmaScriptConverter();
 +  static MFBT_API(const DoubleToStringConverter&) EcmaScriptConverter();
  
    // Computes the shortest string of digits that correctly represent the input
    // number. Depending on decimal_in_shortest_low and decimal_in_shortest_high
-@@ -154,12 +155,12 @@ class DoubleToStringConverter {
-   // Returns true if the conversion succeeds. The conversion always succeeds
-   // except when the input value is special and no infinity_symbol or
-   // nan_symbol has been given to the constructor.
--  bool ToShortest(double value, StringBuilder* result_builder) const {
-+  MFBT_API(bool) ToShortest(double value, StringBuilder* result_builder) const {
-     return ToShortestIeeeNumber(value, result_builder, SHORTEST);
-   }
- 
-   // Same as ToShortest, but for single-precision floats.
--  bool ToShortestSingle(float value, StringBuilder* result_builder) const {
-+  MFBT_API(bool) ToShortestSingle(float value, StringBuilder* result_builder) const {
-     return ToShortestIeeeNumber(value, result_builder, SHORTEST_SINGLE);
-   }
- 
 @@ -197,7 +198,7 @@ class DoubleToStringConverter {
    // The last two conditions imply that the result will never contain more than
    // 1 + kMaxFixedDigitsBeforePoint + 1 + kMaxFixedDigitsAfterPoint characters
    // (one additional character for the sign, and one for the decimal point).
 -  bool ToFixed(double value,
 +  MFBT_API(bool) ToFixed(double value,
                 int requested_digits,
                 StringBuilder* result_builder) const;
--- a/mfbt/double-conversion/double-conversion.h
+++ b/mfbt/double-conversion/double-conversion.h
@@ -150,22 +150,22 @@ class DoubleToStringConverter {
   // is accurate enough to uniquely identify the input-number.
   // For example the most precise representation of the double 9e59 equals
   // "899999999999999918767229449717619953810131273674690656206848", but
   // the converter will return the shorter (but still correct) "9e59".
   //
   // Returns true if the conversion succeeds. The conversion always succeeds
   // except when the input value is special and no infinity_symbol or
   // nan_symbol has been given to the constructor.
-  MFBT_API(bool) ToShortest(double value, StringBuilder* result_builder) const {
+  bool ToShortest(double value, StringBuilder* result_builder) const {
     return ToShortestIeeeNumber(value, result_builder, SHORTEST);
   }
 
   // Same as ToShortest, but for single-precision floats.
-  MFBT_API(bool) ToShortestSingle(float value, StringBuilder* result_builder) const {
+  bool ToShortestSingle(float value, StringBuilder* result_builder) const {
     return ToShortestIeeeNumber(value, result_builder, SHORTEST_SINGLE);
   }
 
 
   // Computes a decimal representation with a fixed number of digits after the
   // decimal point. The last emitted digit is rounded.
   //
   // Examples:
--- a/mfbt/double-conversion/update.sh
+++ b/mfbt/double-conversion/update.sh
@@ -8,9 +8,9 @@ cp $1/README ./
 
 # Includes
 cp $1/src/*.h ./
 
 # Source
 cp $1/src/*.cc ./
 
 patch -p3 < add-mfbt-api-markers.patch
-patch -p3 < useStandardInteger.patch
+patch -p3 < use-StandardInteger.patch