diff options
Diffstat (limited to 'modules/fdlibm/patches/07_add_fdlibm_prefix_to_functions_defined_and_used_in_fdlibm.patch')
-rw-r--r-- | modules/fdlibm/patches/07_add_fdlibm_prefix_to_functions_defined_and_used_in_fdlibm.patch | 197 |
1 files changed, 197 insertions, 0 deletions
diff --git a/modules/fdlibm/patches/07_add_fdlibm_prefix_to_functions_defined_and_used_in_fdlibm.patch b/modules/fdlibm/patches/07_add_fdlibm_prefix_to_functions_defined_and_used_in_fdlibm.patch new file mode 100644 index 0000000000..583abebbc2 --- /dev/null +++ b/modules/fdlibm/patches/07_add_fdlibm_prefix_to_functions_defined_and_used_in_fdlibm.patch @@ -0,0 +1,197 @@ +A prefix is used in preference to a namespace to facilitate exposing functions +to C code. +diff --git a/fdlibm.h b/fdlibm.h +--- a/fdlibm.h ++++ b/fdlibm.h +@@ -16,67 +16,67 @@ + + #ifndef mozilla_imported_fdlibm_h + #define mozilla_imported_fdlibm_h + + #ifndef M_PI_2 + #define M_PI_2 1.57079632679489661923 /* pi/2 */ + #endif + +-double acos(double); +-double asin(double); +-double atan(double); +-double atan2(double, double); +-double cos(double); +-double sin(double); +-double tan(double); ++double fdlibm_acos(double); ++double fdlibm_asin(double); ++double fdlibm_atan(double); ++double fdlibm_atan2(double, double); ++double fdlibm_cos(double); ++double fdlibm_sin(double); ++double fdlibm_tan(double); + +-double cosh(double); +-double sinh(double); +-double tanh(double); ++double fdlibm_cosh(double); ++double fdlibm_sinh(double); ++double fdlibm_tanh(double); + +-double exp(double); +-double log(double); +-double log10(double); ++double fdlibm_exp(double); ++double fdlibm_log(double); ++double fdlibm_log10(double); + +-double pow(double, double); ++double fdlibm_pow(double, double); + +-double ceil(double); +-double fabs(double); +-double floor(double); ++double fdlibm_ceil(double); ++double fdlibm_fabs(double); ++double fdlibm_floor(double); + +-double acosh(double); +-double asinh(double); +-double atanh(double); +-double cbrt(double); +-double exp2(double); +-double expm1(double); +-double hypot(double, double); +-double log1p(double); +-double log2(double); +-double rint(double); +-double copysign(double, double); +-double nearbyint(double); +-double scalbn(double, int); +-double trunc(double); +-float acosf(float); +-float asinf(float); +-float atanf(float); +-float cosf(float); +-float sinf(float); +-float tanf(float); +-float exp2f(float); +-float expf(float); +-float log10f(float); +-float logf(float); +-float powf(float, float); +-float sqrtf(float); ++double fdlibm_acosh(double); ++double fdlibm_asinh(double); ++double fdlibm_atanh(double); ++double fdlibm_cbrt(double); ++double fdlibm_exp2(double); ++double fdlibm_expm1(double); ++double fdlibm_hypot(double, double); ++double fdlibm_log1p(double); ++double fdlibm_log2(double); ++double fdlibm_rint(double); ++double fdlibm_copysign(double, double); ++double fdlibm_nearbyint(double); ++double fdlibm_scalbn(double, int); ++double fdlibm_trunc(double); ++float fdlibm_acosf(float); ++float fdlibm_asinf(float); ++float fdlibm_atanf(float); ++float fdlibm_cosf(float); ++float fdlibm_sinf(float); ++float fdlibm_tanf(float); ++float fdlibm_exp2f(float); ++float fdlibm_expf(float); ++float fdlibm_log10f(float); ++float fdlibm_logf(float); ++float fdlibm_powf(float, float); ++float fdlibm_sqrtf(float); + +-float ceilf(float); +-float fabsf(float); +-float floorf(float); +-float hypotf(float, float); +-float nearbyintf(float); +-float rintf(float); +-float scalbnf(float, int); +-float truncf(float); ++float fdlibm_ceilf(float); ++float fdlibm_fabsf(float); ++float fdlibm_floorf(float); ++float fdlibm_hypotf(float, float); ++float fdlibm_nearbyintf(float); ++float fdlibm_rintf(float); ++float fdlibm_scalbnf(float, int); ++float fdlibm_truncf(float); + + #endif /* !mozilla_imported_fdlibm_h */ +diff --git a/math_private.h b/math_private.h +--- a/math_private.h ++++ b/math_private.h +@@ -867,16 +867,69 @@ irintl(long double x) + #define __ieee754_j1f j1f + #define __ieee754_y0f y0f + #define __ieee754_y1f y1f + #define __ieee754_jnf jnf + #define __ieee754_ynf ynf + #define __ieee754_remainderf remainderf + #define __ieee754_scalbf scalbf + ++#define acos fdlibm_acos ++#define acosf fdlibm_acosf ++#define asin fdlibm_asin ++#define asinf fdlibm_asinf ++#define atan fdlibm_atan ++#define atanf fdlibm_atanf ++#define atan2 fdlibm_atan2 ++#define cos fdlibm_cos ++#define cosf fdlibm_cosf ++#define sin fdlibm_sin ++#define sinf fdlibm_sinf ++#define tan fdlibm_tan ++#define tanf fdlibm_tanf ++#define cosh fdlibm_cosh ++#define sinh fdlibm_sinh ++#define tanh fdlibm_tanh ++#define exp fdlibm_exp ++#define expf fdlibm_expf ++#define exp2 fdlibm_exp2 ++#define exp2f fdlibm_exp2f ++#define log fdlibm_log ++#define logf fdlibm_logf ++#define log10 fdlibm_log10 ++#define log10f fdlibm_log10f ++#define pow fdlibm_pow ++#define powf fdlibm_powf ++#define ceil fdlibm_ceil ++#define ceilf fdlibm_ceilf ++#define fabs fdlibm_fabs ++#define fabsf fdlibm_fabsf ++#define floor fdlibm_floor ++#define acosh fdlibm_acosh ++#define asinh fdlibm_asinh ++#define atanh fdlibm_atanh ++#define cbrt fdlibm_cbrt ++#define expm1 fdlibm_expm1 ++#define hypot fdlibm_hypot ++#define hypotf fdlibm_hypotf ++#define log1p fdlibm_log1p ++#define log2 fdlibm_log2 ++#define scalb fdlibm_scalb ++#define copysign fdlibm_copysign ++#define scalbn fdlibm_scalbn ++#define scalbnf fdlibm_scalbnf ++#define trunc fdlibm_trunc ++#define truncf fdlibm_truncf ++#define floorf fdlibm_floorf ++#define nearbyint fdlibm_nearbyint ++#define nearbyintf fdlibm_nearbyintf ++#define rint fdlibm_rint ++#define rintf fdlibm_rintf ++#define sqrtf fdlibm_sqrtf ++ + /* fdlibm kernel function */ + int __kernel_rem_pio2(double*,double*,int,int,int); + + /* double precision kernel functions */ + #ifndef INLINE_REM_PIO2 + int __ieee754_rem_pio2(double,double*); + #endif + double __kernel_sin(double,double,int); |