Mercurial > pub > dyncall > dyncall
comparison dyncall/dyncall_macros.h @ 188:44ae5b653086
- more endian detection in macros
author | Tassilo Philipp |
---|---|
date | Mon, 13 Mar 2017 13:23:10 +0100 |
parents | 629cfbba5ba0 |
children | a74e2cd93348 |
comparison
equal
deleted
inserted
replaced
187:de5ed248757f | 188:44ae5b653086 |
---|---|
4 Library: dyncall | 4 Library: dyncall |
5 File: dyncall/dyncall_macros.h | 5 File: dyncall/dyncall_macros.h |
6 Description: Platform detection macros | 6 Description: Platform detection macros |
7 License: | 7 License: |
8 | 8 |
9 Copyright (c) 2007-2015 Daniel Adler <dadler@uni-goettingen.de>, | 9 Copyright (c) 2007-2015 Daniel Adler <dadler@uni-goettingen.de>, |
10 Tassilo Philipp <tphilipp@potion-studios.com> | 10 Tassilo Philipp <tphilipp@potion-studios.com> |
11 | 11 |
12 Permission to use, copy, modify, and distribute this software for any | 12 Permission to use, copy, modify, and distribute this software for any |
13 purpose with or without fee is hereby granted, provided that the above | 13 purpose with or without fee is hereby granted, provided that the above |
14 copyright notice and this permission notice appear in all copies. | 14 copyright notice and this permission notice appear in all copies. |
276 */ | 276 */ |
277 # if (defined(DC__Arch_PPC64) && (DC__ABI_PPC64_ELF_V == 1)) || defined(_BIG_ENDIAN) || defined(MIPSEB) || defined(__MIPSEB) || defined(__MIPSEB__) | 277 # if (defined(DC__Arch_PPC64) && (DC__ABI_PPC64_ELF_V == 1)) || defined(_BIG_ENDIAN) || defined(MIPSEB) || defined(__MIPSEB) || defined(__MIPSEB__) |
278 # define DC__Endian_BIG | 278 # define DC__Endian_BIG |
279 # elif (defined(DC__Arch_PPC64) && (DC__ABI_PPC64_ELF_V == 2)) || defined(_LITTLE_ENDIAN) || defined(MIPSEL) || defined(__MIPSEL) || defined(__MIPSEL__) | 279 # elif (defined(DC__Arch_PPC64) && (DC__ABI_PPC64_ELF_V == 2)) || defined(_LITTLE_ENDIAN) || defined(MIPSEL) || defined(__MIPSEL) || defined(__MIPSEL__) |
280 # define DC__Endian_LITTLE | 280 # define DC__Endian_LITTLE |
281 # elif defined(__BYTE_ORDER__) /* explicitly set */ | |
282 # if defined(__ORDER_BIG_ENDIAN__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) | |
283 # define DC__Endian_BIG | |
284 # elif defined(__ORDER_LITTLE_ENDIAN__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) | |
285 # define DC__Endian_LITTLE | |
286 # endif | |
281 # endif /* no else, leave unset if not sure */ | 287 # endif /* no else, leave unset if not sure */ |
282 #endif | 288 #endif |
283 | 289 |
284 | 290 |
285 /* Internal macro/tag. */ | 291 /* Internal macro/tag. */ |
286 #if !defined(DC_API) | 292 #if !defined(DC_API) |
287 #define DC_API | 293 # define DC_API |
288 #endif | 294 #endif |
289 | 295 |
290 #endif /* DYNCALL_MACROS_H */ | 296 #endif /* DYNCALL_MACROS_H */ |
291 | 297 |