1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/mfbt/double-conversion/add-mfbt-api-markers.patch Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,94 @@ 1.4 +diff --git a/mfbt/double-conversion/double-conversion.h b/mfbt/double-conversion/double-conversion.h 1.5 +index f98edae..c62b16b 100644 1.6 +--- a/mfbt/double-conversion/double-conversion.h 1.7 ++++ b/mfbt/double-conversion/double-conversion.h 1.8 +@@ -28,6 +28,7 @@ 1.9 + #ifndef DOUBLE_CONVERSION_DOUBLE_CONVERSION_H_ 1.10 + #define DOUBLE_CONVERSION_DOUBLE_CONVERSION_H_ 1.11 + 1.12 ++#include "mozilla/Types.h" 1.13 + #include "utils.h" 1.14 + 1.15 + namespace double_conversion { 1.16 +@@ -129,7 +130,7 @@ class DoubleToStringConverter { 1.17 + } 1.18 + 1.19 + // Returns a converter following the EcmaScript specification. 1.20 +- static const DoubleToStringConverter& EcmaScriptConverter(); 1.21 ++ static MFBT_API const DoubleToStringConverter& EcmaScriptConverter(); 1.22 + 1.23 + // Computes the shortest string of digits that correctly represent the input 1.24 + // number. Depending on decimal_in_shortest_low and decimal_in_shortest_high 1.25 +@@ -197,7 +198,7 @@ class DoubleToStringConverter { 1.26 + // The last two conditions imply that the result will never contain more than 1.27 + // 1 + kMaxFixedDigitsBeforePoint + 1 + kMaxFixedDigitsAfterPoint characters 1.28 + // (one additional character for the sign, and one for the decimal point). 1.29 +- bool ToFixed(double value, 1.30 ++ MFBT_API bool ToFixed(double value, 1.31 + int requested_digits, 1.32 + StringBuilder* result_builder) const; 1.33 + 1.34 +@@ -229,7 +230,7 @@ class DoubleToStringConverter { 1.35 + // kMaxExponentialDigits + 8 characters (the sign, the digit before the 1.36 + // decimal point, the decimal point, the exponent character, the 1.37 + // exponent's sign, and at most 3 exponent digits). 1.38 +- bool ToExponential(double value, 1.39 ++ MFBT_API bool ToExponential(double value, 1.40 + int requested_digits, 1.41 + StringBuilder* result_builder) const; 1.42 + 1.43 +@@ -267,7 +268,7 @@ class DoubleToStringConverter { 1.44 + // The last condition implies that the result will never contain more than 1.45 + // kMaxPrecisionDigits + 7 characters (the sign, the decimal point, the 1.46 + // exponent character, the exponent's sign, and at most 3 exponent digits). 1.47 +- bool ToPrecision(double value, 1.48 ++ MFBT_API bool ToPrecision(double value, 1.49 + int precision, 1.50 + StringBuilder* result_builder) const; 1.51 + 1.52 +@@ -292,7 +293,7 @@ class DoubleToStringConverter { 1.53 + // kBase10MaximalLength. 1.54 + // Note that DoubleToAscii null-terminates its input. So the given buffer 1.55 + // should be at least kBase10MaximalLength + 1 characters long. 1.56 +- static const int kBase10MaximalLength = 17; 1.57 ++ static const MFBT_DATA int kBase10MaximalLength = 17; 1.58 + 1.59 + // Converts the given double 'v' to ascii. 'v' must not be NaN, +Infinity, or 1.60 + // -Infinity. In SHORTEST_SINGLE-mode this restriction also applies to 'v' 1.61 +@@ -332,7 +333,7 @@ class DoubleToStringConverter { 1.62 + // terminating null-character when computing the maximal output size. 1.63 + // The given length is only used in debug mode to ensure the buffer is big 1.64 + // enough. 1.65 +- static void DoubleToAscii(double v, 1.66 ++ static MFBT_API void DoubleToAscii(double v, 1.67 + DtoaMode mode, 1.68 + int requested_digits, 1.69 + char* buffer, 1.70 +@@ -343,7 +344,7 @@ class DoubleToStringConverter { 1.71 + 1.72 + private: 1.73 + // Implementation for ToShortest and ToShortestSingle. 1.74 +- bool ToShortestIeeeNumber(double value, 1.75 ++ MFBT_API bool ToShortestIeeeNumber(double value, 1.76 + StringBuilder* result_builder, 1.77 + DtoaMode mode) const; 1.78 + 1.79 +@@ -351,15 +352,15 @@ class DoubleToStringConverter { 1.80 + // corresponding string using the configured infinity/nan-symbol. 1.81 + // If either of them is NULL or the value is not special then the 1.82 + // function returns false. 1.83 +- bool HandleSpecialValues(double value, StringBuilder* result_builder) const; 1.84 ++ MFBT_API bool HandleSpecialValues(double value, StringBuilder* result_builder) const; 1.85 + // Constructs an exponential representation (i.e. 1.234e56). 1.86 + // The given exponent assumes a decimal point after the first decimal digit. 1.87 +- void CreateExponentialRepresentation(const char* decimal_digits, 1.88 ++ MFBT_API void CreateExponentialRepresentation(const char* decimal_digits, 1.89 + int length, 1.90 + int exponent, 1.91 + StringBuilder* result_builder) const; 1.92 + // Creates a decimal representation (i.e 1234.5678). 1.93 +- void CreateDecimalRepresentation(const char* decimal_digits, 1.94 ++ MFBT_API void CreateDecimalRepresentation(const char* decimal_digits, 1.95 + int length, 1.96 + int decimal_point, 1.97 + int digits_after_point,