Clarify endianness defines.
This commit is contained in:
@@ -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.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
#ifndef _ENDIAN_H_
|
#ifndef _ENDIAN_H_
|
||||||
@@ -9,18 +9,17 @@
|
|||||||
#include <config/HaikuConfig.h>
|
#include <config/HaikuConfig.h>
|
||||||
|
|
||||||
|
|
||||||
/* Defines architecture dependent endian constants.
|
/* Defines architecture independent endian constants.
|
||||||
* The constant reflects the byte order, "4" is the most
|
* The constant reflects the byte order, "4" is the most significant byte,
|
||||||
* significant byte, "1" the least significant one.
|
* "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)
|
#if defined(__HAIKU_LITTLE_ENDIAN)
|
||||||
# define LITTLE_ENDIAN 1234
|
|
||||||
# define BIG_ENDIAN 4321
|
|
||||||
# define BYTE_ORDER LITTLE_ENDIAN
|
# define BYTE_ORDER LITTLE_ENDIAN
|
||||||
#elif defined(__HAIKU_BIG_ENDIAN)
|
#elif defined(__HAIKU_BIG_ENDIAN)
|
||||||
# define BIG_ENDIAN 4321
|
|
||||||
# define LITTLE_ENDIAN 1234
|
|
||||||
# define BYTE_ORDER BIG_ENDIAN
|
# define BYTE_ORDER BIG_ENDIAN
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -28,4 +27,4 @@
|
|||||||
#define __LITTLE_ENDIAN LITTLE_ENDIAN
|
#define __LITTLE_ENDIAN LITTLE_ENDIAN
|
||||||
#define __BYTE_ORDER BYTE_ORDER
|
#define __BYTE_ORDER BYTE_ORDER
|
||||||
|
|
||||||
#endif /* _ENDIAN_H_ */
|
#endif /* _ENDIAN_H_ */
|
||||||
|
|||||||
Reference in New Issue
Block a user