sys/types: include endian.h, and fix endian definitions.
* Defining LITTLE/BIG_ENDIAN as 0 breaks some feature test macros, particularly in autoconf. Checking with FreeBSD, their macros define a non-zero value as well. References: - https://github.com/freebsd/freebsd/blob/master/sys/x86/include/endian.h - http://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/c.m4#n1584 Change-Id: I61b0bbad74e2bf5248464a5c15e504b9f45bea7f Reviewed-on: https://review.haiku-os.org/c/haiku/+/1526 Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
committed by
Adrien Destugues
parent
ab56137e24
commit
d7818b5aae
@@ -16,11 +16,11 @@
|
||||
|
||||
#if defined(__HAIKU_LITTLE_ENDIAN)
|
||||
# define LITTLE_ENDIAN 1234
|
||||
# define BIG_ENDIAN 0
|
||||
# define BIG_ENDIAN 4321
|
||||
# define BYTE_ORDER LITTLE_ENDIAN
|
||||
#elif defined(__HAIKU_BIG_ENDIAN)
|
||||
# define BIG_ENDIAN 4321
|
||||
# define LITTLE_ENDIAN 0
|
||||
# define LITTLE_ENDIAN 1234
|
||||
# define BYTE_ORDER BIG_ENDIAN
|
||||
#endif
|
||||
|
||||
@@ -28,4 +28,4 @@
|
||||
#define __LITTLE_ENDIAN LITTLE_ENDIAN
|
||||
#define __BYTE_ORDER BYTE_ORDER
|
||||
|
||||
#endif /* _ENDIAN_H_ */
|
||||
#endif /* _ENDIAN_H_ */
|
||||
@@ -122,6 +122,7 @@ struct _pthread_spinlock {
|
||||
};
|
||||
|
||||
|
||||
#include <endian.h>
|
||||
#include <null.h>
|
||||
#include <size_t.h>
|
||||
#include <time.h>
|
||||
|
||||
Reference in New Issue
Block a user