Bug 1888033 - [Menu Redesign] Add a secret setting and feature flag for the menu...
[gecko.git] / modules / fdlibm / patches / 20_emulate_freebsd_internal_double_types.patch
blobd22073391e3d2dc2ede7319c6179cb5fab9280b3
1 diff --git a/math_private.h b/math_private.h
2 --- a/math_private.h
3 +++ b/math_private.h
4 @@ -20,16 +20,24 @@
5 #include <cfloat>
6 #include <stdint.h>
7 #include <sys/types.h>
9 #include "mozilla/EndianUtils.h"
11 #include "fdlibm.h"
13 +/*
14 + * Emulate FreeBSD internal double types.
15 + * Adapted from https://github.com/freebsd/freebsd-src/search?q=__double_t
16 + */
18 +typedef double __double_t;
19 +typedef __double_t double_t;
22 * The original fdlibm code used statements like:
23 * n0 = ((*(int*)&one)>>29)^1; * index of high word *
24 * ix0 = *(n0+(int*)&x); * high word of x *
25 * ix1 = *((1-n0)+(int*)&x); * low word of x *
26 * to dig two 32 bit words out of the 64 bit IEEE floating point
27 * value. That is non-ANSI, and, moreover, the gcc instruction
28 * scheduler gets it wrong. We instead use the following macros.