[haiku-commits] haiku: hrev53410 - in headers/posix: . sys

  • From: Adrien Destugues <pulkomandy@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 27 Aug 2019 06:02:47 -0400 (EDT)

hrev53410 adds 1 changeset to branch 'master'
old head: ab56137e2411f03672cd5a65875a82ade5dd19b0
new head: d7818b5aaeb3e2a9da65dd1858f51b7f14d1d279
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=d7818b5aaeb3+%5Eab56137e2411

----------------------------------------------------------------------------

d7818b5aaeb3: 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 <pulkomandy@xxxxxxxxx>

                         [ Jessica Hamilton <jessica.l.hamilton@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev53410
Commit:      d7818b5aaeb3e2a9da65dd1858f51b7f14d1d279
URL:         https://git.haiku-os.org/haiku/commit/?id=d7818b5aaeb3
Author:      Jessica Hamilton <jessica.l.hamilton@xxxxxxxxx>
Date:        Tue Jun 18 19:11:29 2019 UTC
Committer:   Adrien Destugues <pulkomandy@xxxxxxxxx>
Commit-Date: Tue Aug 27 10:02:45 2019 UTC

----------------------------------------------------------------------------

2 files changed, 4 insertions(+), 3 deletions(-)
headers/posix/endian.h    | 6 +++---
headers/posix/sys/types.h | 1 +

----------------------------------------------------------------------------

diff --git a/headers/posix/endian.h b/headers/posix/endian.h
index ba93bb128a..2b9df1a3ad 100644
--- a/headers/posix/endian.h
+++ b/headers/posix/endian.h
@@ -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_ */
\ No newline at end of file
diff --git a/headers/posix/sys/types.h b/headers/posix/sys/types.h
index 64d497eba9..28ddc6b27f 100644
--- a/headers/posix/sys/types.h
+++ b/headers/posix/sys/types.h
@@ -122,6 +122,7 @@ struct _pthread_spinlock {
 };
 
 
+#include <endian.h>
 #include <null.h>
 #include <size_t.h>
 #include <time.h>


Other related posts: