diff options
Diffstat (limited to 'sys/sparc64')
-rw-r--r-- | sys/sparc64/include/endian.h | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/sys/sparc64/include/endian.h b/sys/sparc64/include/endian.h index b3f27d8..c8eac24 100644 --- a/sys/sparc64/include/endian.h +++ b/sys/sparc64/include/endian.h @@ -45,17 +45,26 @@ #define _QUAD_HIGHWORD 0 #define _QUAD_LOWWORD 1 -#ifndef _POSIX_SOURCE /* * Definitions for byte order, according to byte significance from low * address to high. */ -#define LITTLE_ENDIAN 1234 /* LSB first: i386, vax */ -#define BIG_ENDIAN 4321 /* MSB first: 68000, ibm, net */ -#define PDP_ENDIAN 3412 /* LSB first in word, MSW first in long */ +#define _LITTLE_ENDIAN 1234 /* LSB first: i386, vax */ +#define _BIG_ENDIAN 4321 /* MSB first: 68000, ibm, net */ +#define _PDP_ENDIAN 3412 /* LSB first in word, MSW first in long */ -#define BYTE_ORDER BIG_ENDIAN -#endif /* !_POSIX_SOURCE */ +#define _BYTE_ORDER _BIG_ENDIAN + +/* + * Deprecated variants that don't have enough underscores to be useful in more + * strict namespaces. + */ +#if __BSD_VISIBLE +#define LITTLE_ENDIAN _LITTLE_ENDIAN +#define BIG_ENDIAN _BIG_ENDIAN +#define PDP_ENDIAN _PDP_ENDIAN +#define BYTE_ORDER _BYTE_ORDER +#endif #ifdef __GNUC__ |