aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2024-04-09 09:40:45 +0200
committerJakub Jelinek <jakub@redhat.com>2024-04-09 09:40:45 +0200
commit21c9fd9688d9de9562b3cb491e4ab50ce09e663a (patch)
tree7846da029bd590061338709f625710eeb90d8254
parentcfed80b9e4f562c99679739548df9369117dd791 (diff)
downloadgcc-21c9fd9688d9de9562b3cb491e4ab50ce09e663a.zip
gcc-21c9fd9688d9de9562b3cb491e4ab50ce09e663a.tar.gz
gcc-21c9fd9688d9de9562b3cb491e4ab50ce09e663a.tar.bz2
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 <jakub@redhat.com> * sfp-machine.h (__LITTLE_ENDIAN, __BIG_ENDIAN, __BYTE_ORDER): Define if __BYTE_ORDER isn't defined.
-rw-r--r--libquadmath/sfp-machine.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/libquadmath/sfp-machine.h b/libquadmath/sfp-machine.h
index e37d5b3..906a09e 100644
--- a/libquadmath/sfp-machine.h
+++ b/libquadmath/sfp-machine.h
@@ -18,6 +18,11 @@
#define _FP_NANSIGN_Q 1
#define _FP_KEEPNANFRACP 1
#define _FP_TININESS_AFTER_ROUNDING 0
+#ifndef __BYTE_ORDER
+#define __LITTLE_ENDIAN __ORDER_LITTLE_ENDIAN__
+#define __BIG_ENDIAN __ORDER_BIG_ENDIAN__
+#define __BYTE_ORDER __BYTE_ORDER__
+#endif
#define _FP_DECL_EX \
unsigned int fp_roundmode __attribute__ ((unused)) = FP_RND_NEAREST;
#define FP_ROUNDMODE fp_roundmode