Skip to content

Commit 21c9fd9

Browse files
committed
libquadmath: Provide __BYTE_ORDER, __LITTLE_ENDIAN and __BIG_ENDIAN definitions
My earlier libquadmath change apparently broke mingw32 build, while on Linux <bits/endian.h> is included and defines these, on Mingw apparently that isn't the case, while soft-fp wants a guarantee that sfp-machine.h defines these. 2024-04-09 Jakub Jelinek <[email protected]> * sfp-machine.h (__LITTLE_ENDIAN, __BIG_ENDIAN, __BYTE_ORDER): Define if __BYTE_ORDER isn't defined.
1 parent cfed80b commit 21c9fd9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

libquadmath/sfp-machine.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@
1818
#define _FP_NANSIGN_Q 1
1919
#define _FP_KEEPNANFRACP 1
2020
#define _FP_TININESS_AFTER_ROUNDING 0
21+
#ifndef __BYTE_ORDER
22+
#define __LITTLE_ENDIAN __ORDER_LITTLE_ENDIAN__
23+
#define __BIG_ENDIAN __ORDER_BIG_ENDIAN__
24+
#define __BYTE_ORDER __BYTE_ORDER__
25+
#endif
2126
#define _FP_DECL_EX \
2227
unsigned int fp_roundmode __attribute__ ((unused)) = FP_RND_NEAREST;
2328
#define FP_ROUNDMODE fp_roundmode

0 commit comments

Comments
 (0)