diff options
Diffstat (limited to 'sysdeps/mips')
-rw-r--r-- | sysdeps/mips/bits/endian.h | 15 | ||||
-rw-r--r-- | sysdeps/mips/bits/endianness.h | 16 | ||||
-rw-r--r-- | sysdeps/mips/ieee754/ieee754.h | 17 | ||||
-rw-r--r-- | sysdeps/mips/nptl/bits/pthreadtypes-arch.h | 2 |
4 files changed, 27 insertions, 23 deletions
diff --git a/sysdeps/mips/bits/endian.h b/sysdeps/mips/bits/endian.h deleted file mode 100644 index 1260597..0000000 --- a/sysdeps/mips/bits/endian.h +++ /dev/null @@ -1,15 +0,0 @@ -/* The MIPS architecture has selectable endianness. - It exists in both little and big endian flavours and we - want to be able to share the installed header files between - both, so we define __BYTE_ORDER based on GCC's predefines. */ - -#ifndef _ENDIAN_H -# error "Never use <bits/endian.h> directly; include <endian.h> instead." -#endif - -#ifdef __MIPSEB -# define __BYTE_ORDER __BIG_ENDIAN -#endif -#ifdef __MIPSEL -# define __BYTE_ORDER __LITTLE_ENDIAN -#endif diff --git a/sysdeps/mips/bits/endianness.h b/sysdeps/mips/bits/endianness.h new file mode 100644 index 0000000..09e138b --- /dev/null +++ b/sysdeps/mips/bits/endianness.h @@ -0,0 +1,16 @@ +#ifndef _BITS_ENDIANNESS_H +#define _BITS_ENDIANNESS_H 1 + +#ifndef _BITS_ENDIAN_H +# error "Never use <bits/endianness.h> directly; include <endian.h> instead." +#endif + +/* MIPS has selectable endianness. */ +#ifdef __MIPSEB +# define __BYTE_ORDER __BIG_ENDIAN +#endif +#ifdef __MIPSEL +# define __BYTE_ORDER __LITTLE_ENDIAN +#endif + +#endif /* bits/endianness.h */ diff --git a/sysdeps/mips/ieee754/ieee754.h b/sysdeps/mips/ieee754/ieee754.h index ebaf8d8..250fa5e 100644 --- a/sysdeps/mips/ieee754/ieee754.h +++ b/sysdeps/mips/ieee754/ieee754.h @@ -16,13 +16,16 @@ <https://www.gnu.org/licenses/>. */ #ifndef _IEEE754_H - #define _IEEE754_H 1 + #include <features.h> -#include <endian.h> +#include <bits/endian.h> -#include <float.h> +#ifndef __LDBL_MANT_DIG__ +# include <float.h> +# define __LDBL_MANT_DIG__ __LDBL_MANT_DIG__ +#endif __BEGIN_DECLS @@ -127,7 +130,7 @@ union ieee754_double #define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */ -#if LDBL_MANT_DIG == 113 +#if __LDBL_MANT_DIG__ == 113 union ieee854_long_double { @@ -184,7 +187,7 @@ union ieee854_long_double #define IEEE854_LONG_DOUBLE_BIAS 0x3fff /* Added to exponent. */ -#elif LDBL_MANT_DIG == 64 +#elif __LDBL_MANT_DIG__ == 64 union ieee854_long_double { @@ -253,7 +256,7 @@ union ieee854_long_double #define IEEE854_LONG_DOUBLE_BIAS 0x3fff -#elif LDBL_MANT_DIG == 53 +#elif __LDBL_MANT_DIG__ == 53 union ieee854_long_double { @@ -316,7 +319,7 @@ union ieee854_long_double #define IEEE854_LONG_DOUBLE_BIAS 0x3ff /* Added to exponent. */ -#endif /* LDBL_MANT_DIG == 53 */ +#endif /* __LDBL_MANT_DIG__ == 53 */ __END_DECLS diff --git a/sysdeps/mips/nptl/bits/pthreadtypes-arch.h b/sysdeps/mips/nptl/bits/pthreadtypes-arch.h index b32e888..0bb7035 100644 --- a/sysdeps/mips/nptl/bits/pthreadtypes-arch.h +++ b/sysdeps/mips/nptl/bits/pthreadtypes-arch.h @@ -19,7 +19,7 @@ #ifndef _BITS_PTHREADTYPES_ARCH_H #define _BITS_PTHREADTYPES_ARCH_H 1 -#include <endian.h> +#include <bits/endian.h> #if _MIPS_SIM == _ABI64 # define __SIZEOF_PTHREAD_ATTR_T 56 |