mirror of https://github.com/svaarala/duktape.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
630 B
21 lines
630 B
/*
|
|
* Convert DUK_USE_BYTEORDER, from whatever source, into currently used
|
|
* internal defines. If detection failed, #error out.
|
|
*/
|
|
|
|
#if defined(DUK_USE_BYTEORDER)
|
|
#if (DUK_USE_BYTEORDER == 1)
|
|
#define DUK_USE_INTEGER_LE
|
|
#define DUK_USE_DOUBLE_LE
|
|
#elif (DUK_USE_BYTEORDER == 2)
|
|
#define DUK_USE_INTEGER_LE /* integer endianness is little on purpose */
|
|
#define DUK_USE_DOUBLE_ME
|
|
#elif (DUK_USE_BYTEORDER == 3)
|
|
#define DUK_USE_INTEGER_BE
|
|
#define DUK_USE_DOUBLE_BE
|
|
#else
|
|
#error unsupported: byte order invalid
|
|
#endif /* byte order */
|
|
#else
|
|
#error unsupported: byte order detection failed
|
|
#endif /* defined(DUK_USE_BYTEORDER) */
|
|
|