Mercurial > pub > dyncall > dyncall
changeset 188:44ae5b653086
- more endian detection in macros
author | Tassilo Philipp |
---|---|
date | Mon, 13 Mar 2017 13:23:10 +0100 |
parents | de5ed248757f |
children | b827c074b4da |
files | dyncall/dyncall_macros.h |
diffstat | 1 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/dyncall/dyncall_macros.h Mon Mar 13 11:56:36 2017 +0100 +++ b/dyncall/dyncall_macros.h Mon Mar 13 13:23:10 2017 +0100 @@ -6,7 +6,7 @@ Description: Platform detection macros License: - Copyright (c) 2007-2015 Daniel Adler <dadler@uni-goettingen.de>, + Copyright (c) 2007-2015 Daniel Adler <dadler@uni-goettingen.de>, Tassilo Philipp <tphilipp@potion-studios.com> Permission to use, copy, modify, and distribute this software for any @@ -278,13 +278,19 @@ # define DC__Endian_BIG # elif (defined(DC__Arch_PPC64) && (DC__ABI_PPC64_ELF_V == 2)) || defined(_LITTLE_ENDIAN) || defined(MIPSEL) || defined(__MIPSEL) || defined(__MIPSEL__) # define DC__Endian_LITTLE +# elif defined(__BYTE_ORDER__) /* explicitly set */ +# if defined(__ORDER_BIG_ENDIAN__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) +# define DC__Endian_BIG +# elif defined(__ORDER_LITTLE_ENDIAN__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) +# define DC__Endian_LITTLE +# endif # endif /* no else, leave unset if not sure */ #endif /* Internal macro/tag. */ #if !defined(DC_API) -#define DC_API +# define DC_API #endif #endif /* DYNCALL_MACROS_H */