WIP restart of lib

This commit is contained in:
Maix0 2024-06-24 00:20:08 +02:00
parent e239bfa0ea
commit 9f6b90d596
36 changed files with 15951 additions and 2 deletions

20
parser/nsrc/host.h Normal file
View file

@ -0,0 +1,20 @@
// Determine endian and pointer size based on known defines.
// TS_BIG_ENDIAN and TS_PTR_SIZE can be set as -D compiler arguments
// to override this.
#if !defined(TS_BIG_ENDIAN)
# if (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) || (defined(__APPLE_CC__) && (defined(__ppc__) || defined(__ppc64__)))
# define TS_BIG_ENDIAN 1
# else
# define TS_BIG_ENDIAN 0
# endif
#endif
#if !defined(TS_PTR_SIZE)
# if UINTPTR_MAX == 0xFFFFFFFF
# define TS_PTR_SIZE 32
# else
# define TS_PTR_SIZE 64
# endif
#endif