Skip to content

Commit

Permalink
libquadmath: Provide __BYTE_ORDER, __LITTLE_ENDIAN and __BIG_ENDIAN d…
Browse files Browse the repository at this point in the history
…efinitions

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.
  • Loading branch information
jakubjelinek committed Apr 9, 2024
1 parent cfed80b commit 21c9fd9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libquadmath/sfp-machine.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 21c9fd9

Please sign in to comment.