Skip to content
Snippets Groups Projects
Commit 253de859 authored by Michael Tüxen's avatar Michael Tüxen
Browse files

Add Endian defines for PPC and PPC64 for FreeBSD.

parent f4a6f696
No related branches found
No related tags found
No related merge requests found
......@@ -68,6 +68,26 @@
#include "open_memstream.h"
#endif
/*
* Very old compilers like gcc 4.2.1 do not define the endian
* macros. gcc 4.2.1 is used as the default compiler on
* PowerPC and PowerPC64 for FreeBSD. So define the macros
* for these platform.
*/
#if !defined(__ORDER_LITTLE_ENDIAN__)
#define __ORDER_LITTLE_ENDIAN__ 1234
#endif
#if !defined(__ORDER_BIG_ENDIAN__)
#define __ORDER_BIG_ENDIAN__ 4321
#endif
#if !defined(__BYTE_ORDER__)
#if defined(__PPC__) || defined(__PPC64__)
#define __BYTE_ORDER__ __ORDER_BIG_ENDIAN__
#else
#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
#endif
#endif /* __FreeBSD__ */
/* ------------------------- OpenBSD --------------------- */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment