Skip to content

Commit

Permalink
better endianness detection
Browse files Browse the repository at this point in the history
  • Loading branch information
classilla committed May 16, 2022
1 parent afc9900 commit dac9524
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/luac/pdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,19 @@

#include "pdb.h"

#ifdef __LITTLE_ENDIAN__
#if defined(__LITTLE_ENDIAN__)
#ifndef IS_LITTLE_ENDIAN
#define IS_LITTLE_ENDIAN 1
#endif
#endif

#if defined(__BYTE_ORDER) && (__BYTE_ORDER == __LITTLE_ENDIAN)
#ifndef IS_LITTLE_ENDIAN
#define IS_LITTLE_ENDIAN 1
#endif
#endif

#if defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
#ifndef IS_LITTLE_ENDIAN
#define IS_LITTLE_ENDIAN 1
#endif
Expand Down

0 comments on commit dac9524

Please sign in to comment.