1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
|
Index: uclibc/libm/fp_private.h
===================================================================
--- uclibc/libm/fp_private.h (revision 12879)
+++ uclibc/libm/fp_private.h (working copy)
@@ -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
Index: uclibc/libm/powerpc/s_ceil.c
===================================================================
--- uclibc/libm/powerpc/s_ceil.c (revision 12879)
+++ uclibc/libm/powerpc/s_ceil.c (working copy)
@@ -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
Index: uclibc/libm/powerpc/s_ldexp.c
===================================================================
--- uclibc/libm/powerpc/s_ldexp.c (revision 12879)
+++ uclibc/libm/powerpc/s_ldexp.c (working copy)
@@ -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
Index: uclibc/libm/powerpc/s_rint.c
===================================================================
--- uclibc/libm/powerpc/s_rint.c (revision 12879)
+++ uclibc/libm/powerpc/s_rint.c (working copy)
@@ -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
Index: uclibc/libm/powerpc/s_floor.c
===================================================================
--- uclibc/libm/powerpc/s_floor.c (revision 12879)
+++ uclibc/libm/powerpc/s_floor.c (working copy)
@@ -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
Index: uclibc/libm/powerpc/s_logb.c
===================================================================
--- uclibc/libm/powerpc/s_logb.c (revision 12879)
+++ uclibc/libm/powerpc/s_logb.c (working copy)
@@ -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
Index: uclibc/libm/powerpc/s_frexp.c
===================================================================
--- uclibc/libm/powerpc/s_frexp.c (revision 12879)
+++ uclibc/libm/powerpc/s_frexp.c (working copy)
@@ -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
Index: uclibc/libm/powerpc/s_modf.c
===================================================================
--- uclibc/libm/powerpc/s_modf.c (revision 12879)
+++ uclibc/libm/powerpc/s_modf.c (working copy)
@@ -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
Index: uclibc/libm/powerpc/w_scalb.c
===================================================================
--- uclibc/libm/powerpc/w_scalb.c (revision 12879)
+++ uclibc/libm/powerpc/w_scalb.c (working copy)
@@ -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
Index: uclibc/libc/string/sh64/strcpy.S
===================================================================
--- uclibc/libc/string/sh64/strcpy.S (revision 12879)
+++ uclibc/libc/string/sh64/strcpy.S (working copy)
@@ -6,7 +6,9 @@
!
! SH5 code Copyright 2002 SuperH Ltd.
-#ifdef __LITTLE_ENDIAN__
+#include <endian.h>
+
+#if __BYTE_ORDER == __LITTLE_ENDIAN
#define SHHI shlld
#define SHLO shlrd
#else
@@ -67,7 +69,7 @@
add r5, r63, r4
addi r0, 8, r0
shortstring:
-#ifndef __LITTLE_ENDIAN__
+#if __BYTE_ORDER != __LITTLE_ENDIAN
pta/l shortstring2,tr1
byterev r4,r4
#endif
Index: uclibc/libc/string/sh64/memset.S
===================================================================
--- uclibc/libc/string/sh64/memset.S (revision 12879)
+++ uclibc/libc/string/sh64/memset.S (working copy)
@@ -9,7 +9,9 @@
! Copyright 2002 SuperH Ltd.
!
-#ifdef __LITTLE_ENDIAN__
+#include <endian.h>
+
+#if __BYTE_ORDER == __LITTLE_ENDIAN
#define SHHI shlld
#define SHLO shlrd
#else
Index: uclibc/libc/sysdeps/linux/sh/bits/kernel_stat.h
===================================================================
--- uclibc/libc/sysdeps/linux/sh/bits/kernel_stat.h (revision 12879)
+++ uclibc/libc/sysdeps/linux/sh/bits/kernel_stat.h (working copy)
@@ -30,10 +30,10 @@
};
struct kernel_stat64 {
-#if defined(__BIG_ENDIAN__)
+#if (__BYTE_ORDER == __BIG_ENDIAN)
unsigned char __pad0b[6];
unsigned short st_dev;
-#elif defined(__LITTLE_ENDIAN__)
+#elif (__BYTE_ORDER == __LITTLE_ENDIAN)
unsigned short st_dev;
unsigned char __pad0b[6];
#else
@@ -48,7 +48,7 @@
unsigned long st_uid;
unsigned long st_gid;
-#if defined(__BIG_ENDIAN__)
+#if (__BYTE_ORDER == __BIG_ENDIAN)
unsigned char __pad3b[6];
unsigned short st_rdev;
#else /* Must be little */
@@ -60,7 +60,7 @@
long long st_size;
unsigned long st_blksize;
-#if defined(__BIG_ENDIAN__)
+#if (__BYTE_ORDER == __BIG_ENDIAN)
unsigned long __pad4; /* Future possible st_blocks hi bits */
unsigned long st_blocks; /* Number 512-byte blocks allocated. */
#else /* Must be little */
|