[haiku-commits] haiku: hrev53412 - headers/posix

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

hrev53412 adds 1 changeset to branch 'master'
old head: 26e0b0c8d6541be2940be0ac429d5660147f5619
new head: 261430c5aed312d5b834799e92b6a4175cac1150
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=261430c5aed3+%5E26e0b0c8d654

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

261430c5aed3: Clarify endianness defines.

                             [ Adrien Destugues <pulkomandy@xxxxxxxxxxxxx> ]

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

Revision:    hrev53412
Commit:      261430c5aed312d5b834799e92b6a4175cac1150
URL:         https://git.haiku-os.org/haiku/commit/?id=261430c5aed3
Author:      Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
Date:        Tue Aug 27 15:44:57 2019 UTC

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

1 file changed, 8 insertions(+), 9 deletions(-)
headers/posix/endian.h | 17 ++++++++---------

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

diff --git a/headers/posix/endian.h b/headers/posix/endian.h
index 2b9df1a3ad..c385ad3343 100644
--- a/headers/posix/endian.h
+++ b/headers/posix/endian.h
@@ -1,5 +1,5 @@
 /*
- * Copyright 2003-2012 Haiku, Inc. All rights reserved.
+ * Copyright 2003-2019 Haiku, Inc. All rights reserved.
  * Distributed under the terms of the MIT License.
  */
 #ifndef _ENDIAN_H_
@@ -9,18 +9,17 @@
 #include <config/HaikuConfig.h>
 
 
-/* Defines architecture dependent endian constants.
- * The constant reflects the byte order, "4" is the most
- * significant byte, "1" the least significant one.
+/* Defines architecture independent endian constants.
+ * The constant reflects the byte order, "4" is the most significant byte,
+ * "1" the least significant one.
  */
+#define LITTLE_ENDIAN  1234
+#define BIG_ENDIAN             4321
 
+/* Define the machine BYTE_ORDER depending on platform endianness */
 #if defined(__HAIKU_LITTLE_ENDIAN)
-#      define LITTLE_ENDIAN    1234
-#      define BIG_ENDIAN               4321
 #      define BYTE_ORDER               LITTLE_ENDIAN
 #elif defined(__HAIKU_BIG_ENDIAN)
-#      define BIG_ENDIAN               4321
-#      define LITTLE_ENDIAN    1234
 #      define BYTE_ORDER               BIG_ENDIAN
 #endif
 
@@ -28,4 +27,4 @@
 #define __LITTLE_ENDIAN                LITTLE_ENDIAN
 #define __BYTE_ORDER           BYTE_ORDER
 
-#endif /* _ENDIAN_H_ */
\ No newline at end of file
+#endif /* _ENDIAN_H_ */


Other related posts:

  • » [haiku-commits] haiku: hrev53412 - headers/posix - Adrien Destugues