public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] libquadmath: Provide __BYTE_ORDER, __LITTLE_ENDIAN and __BIG_ENDIAN definitions
@ 2024-04-09  8:01 Jakub Jelinek
  0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2024-04-09  8:01 UTC (permalink / raw)
  To: gcc-patches

Hi!

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.

Tested on x86_64-linux, committed to trunk.

2024-04-09  Jakub Jelinek  <jakub@redhat.com>

	* sfp-machine.h (__LITTLE_ENDIAN, __BIG_ENDIAN, __BYTE_ORDER): Define
	if __BYTE_ORDER isn't defined.

--- libquadmath/sfp-machine.h.jj	2024-04-09 08:16:53.705743788 +0200
+++ libquadmath/sfp-machine.h	2024-04-09 09:36:39.059229830 +0200
@@ -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

	Jakub


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-04-09  8:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-09  8:01 [committed] libquadmath: Provide __BYTE_ORDER, __LITTLE_ENDIAN and __BIG_ENDIAN definitions Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).