summaryrefslogtreecommitdiff
path: root/libm
diff options
context:
space:
mode:
Diffstat (limited to 'libm')
-rw-r--r--libm/fp_private.h3
-rw-r--r--libm/powerpc/s_ceil.c4
-rw-r--r--libm/powerpc/s_floor.c4
-rw-r--r--libm/powerpc/s_frexp.c3
-rw-r--r--libm/powerpc/s_ldexp.c3
-rw-r--r--libm/powerpc/s_logb.c4
-rw-r--r--libm/powerpc/s_modf.c3
-rw-r--r--libm/powerpc/s_rint.c3
-rw-r--r--libm/powerpc/s_round.c3
-rw-r--r--libm/powerpc/s_trunc.c3
-rw-r--r--libm/powerpc/w_scalb.c4
11 files changed, 26 insertions, 11 deletions
diff --git a/libm/fp_private.h b/libm/fp_private.h
index 505400e33..0ddb616c4 100644
--- a/libm/fp_private.h
+++ b/libm/fp_private.h
@@ -70,10 +70,11 @@
*******************************************************************************/
#include <stdint.h>
+#include <endian.h>
typedef struct /* Hex representation of a double. */
{
-#if defined(__BIG_ENDIAN__)
+#if (__BYTE_ORDER == __BIG_ENDIAN)
uint32_t high;
uint32_t low;
#else
diff --git a/libm/powerpc/s_ceil.c b/libm/powerpc/s_ceil.c
index fd073de7b..f6680eedf 100644
--- a/libm/powerpc/s_ceil.c
+++ b/libm/powerpc/s_ceil.c
@@ -21,13 +21,15 @@
* *
*******************************************************************************/
+#include <endian.h>
+
static const double twoTo52 = 4503599627370496.0;
static const unsigned long signMask = 0x80000000ul;
typedef union
{
struct {
-#if defined(__BIG_ENDIAN__)
+#if (__BYTE_ORDER == __BIG_ENDIAN)
unsigned long int hi;
unsigned long int lo;
#else
diff --git a/libm/powerpc/s_floor.c b/libm/powerpc/s_floor.c
index 94677b4d2..0ddbb9b66 100644
--- a/libm/powerpc/s_floor.c
+++ b/libm/powerpc/s_floor.c
@@ -21,13 +21,15 @@
* *
*******************************************************************************/
+#include <endian.h>
+
static const double twoTo52 = 4503599627370496.0;
static const unsigned long signMask = 0x80000000ul;
typedef union
{
struct {
-#if defined(__BIG_ENDIAN__)
+#if (__BYTE_ORDER == __BIG_ENDIAN)
unsigned long int hi;
unsigned long int lo;
#else
diff --git a/libm/powerpc/s_frexp.c b/libm/powerpc/s_frexp.c
index 9909f2ce7..7c998f81a 100644
--- a/libm/powerpc/s_frexp.c
+++ b/libm/powerpc/s_frexp.c
@@ -21,13 +21,14 @@
#include <limits.h>
#include <math.h>
+#include <endian.h>
static const double two54 = 1.80143985094819840000e+16; /* 0x43500000, 0x00000000 */
typedef union
{
struct {
-#if defined(__BIG_ENDIAN__)
+#if (__BYTE_ORDER == __BIG_ENDIAN)
unsigned long int hi;
unsigned long int lo;
#else
diff --git a/libm/powerpc/s_ldexp.c b/libm/powerpc/s_ldexp.c
index ce9ec8b1b..7e52352ae 100644
--- a/libm/powerpc/s_ldexp.c
+++ b/libm/powerpc/s_ldexp.c
@@ -21,11 +21,12 @@
#include <limits.h>
#include <math.h>
+#include <endian.h>
typedef union
{
struct {
-#if defined(__BIG_ENDIAN__)
+#if (__BYTE_ORDER == __BIG_ENDIAN)
unsigned long int hi;
unsigned long int lo;
#else
diff --git a/libm/powerpc/s_logb.c b/libm/powerpc/s_logb.c
index 23c7270f9..3caecd95f 100644
--- a/libm/powerpc/s_logb.c
+++ b/libm/powerpc/s_logb.c
@@ -32,10 +32,12 @@
* Standard 754. *
*******************************************************************************/
+#include <endian.h>
+
typedef union
{
struct {
-#if defined(__BIG_ENDIAN__)
+#if (__BYTE_ORDER == __BIG_ENDIAN)
unsigned long int hi;
unsigned long int lo;
#else
diff --git a/libm/powerpc/s_modf.c b/libm/powerpc/s_modf.c
index f4344bda8..cb8338a90 100644
--- a/libm/powerpc/s_modf.c
+++ b/libm/powerpc/s_modf.c
@@ -45,13 +45,14 @@
#include <limits.h>
#include <math.h>
+#include <endian.h>
#define SET_INVALID 0x01000000UL
typedef union
{
struct {
-#if defined(__BIG_ENDIAN__)
+#if (__BYTE_ORDER == __BIG_ENDIAN)
unsigned long int hi;
unsigned long int lo;
#else
diff --git a/libm/powerpc/s_rint.c b/libm/powerpc/s_rint.c
index 72c4834d0..c229515c4 100644
--- a/libm/powerpc/s_rint.c
+++ b/libm/powerpc/s_rint.c
@@ -46,13 +46,14 @@
#include <limits.h>
#include <math.h>
+#include <endian.h>
#define SET_INVALID 0x01000000UL
typedef union
{
struct {
-#if defined(__BIG_ENDIAN__)
+#if (__BYTE_ORDER == __BIG_ENDIAN)
unsigned long int hi;
unsigned long int lo;
#else
diff --git a/libm/powerpc/s_round.c b/libm/powerpc/s_round.c
index 81f4d0fec..a0f72ebe3 100644
--- a/libm/powerpc/s_round.c
+++ b/libm/powerpc/s_round.c
@@ -1,10 +1,11 @@
#include <limits.h>
#include <math.h>
+#include <endian.h>
typedef union
{
struct {
-#if defined(__BIG_ENDIAN__)
+#if (__BYTE_ORDER == __BIG_ENDIAN)
unsigned long int hi;
unsigned long int lo;
#else
diff --git a/libm/powerpc/s_trunc.c b/libm/powerpc/s_trunc.c
index 4b61355ea..7db7606b6 100644
--- a/libm/powerpc/s_trunc.c
+++ b/libm/powerpc/s_trunc.c
@@ -1,10 +1,11 @@
#include <limits.h>
#include <math.h>
+#include <endian.h>
typedef union
{
struct {
-#if defined(__BIG_ENDIAN__)
+#if (__BYTE_ORDER == __BIG_ENDIAN)
unsigned long int hi;
unsigned long int lo;
#else
diff --git a/libm/powerpc/w_scalb.c b/libm/powerpc/w_scalb.c
index c93c74b68..fe23ece53 100644
--- a/libm/powerpc/w_scalb.c
+++ b/libm/powerpc/w_scalb.c
@@ -19,10 +19,12 @@
**
***********************************************************************/
+#include <endian.h>
+
typedef union
{
struct {
-#if defined(__BIG_ENDIAN__)
+#if (__BYTE_ORDER == __BIG_ENDIAN)
unsigned long int hi;
unsigned long int lo;
#else