diff options
author | Konstantin Podsvirov <konstantin@podsvirov.pro> | 2018-05-12 12:31:27 +0300 |
---|---|---|
committer | Konstantin Podsvirov <konstantin@podsvirov.pro> | 2018-05-12 12:31:27 +0300 |
commit | 63224902a50c68b3ce4e38827199bae4d50746f3 (patch) | |
tree | 5a60588d11d209ce20f01c94a46ea41cd53c324f /src/tree.h | |
parent | a6920ce0f199c772ede76f0ae475cbf99d9f58bf (diff) | |
download | colm-63224902a50c68b3ce4e38827199bae4d50746f3.tar.gz |
The type word_t declaration
If sizeof(unsigned long) == sizeof(void *) then word_t is unsigned long.
Else if sizeof(unsigned long long) == sizeof(void *) then word_t is unsigned long long.
Compilation checked with MSYS2 toolchains via Autotools project and
with MinGW-w64 toolchains via CMake project.
Diffstat (limited to 'src/tree.h')
-rw-r--r-- | src/tree.h | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -31,11 +31,18 @@ extern "C" { #include <colm/type.h> #include <colm/input.h> #include <colm/internal.h> +#include <colm/defs.h> #define COLM_INDENT_OFF -1 typedef unsigned char code_t; -typedef unsigned long word_t; +#if SIZEOF_UNSIGNED_LONG == SIZEOF_VOID_P + typedef unsigned long word_t; +#elif SIZEOF_UNSIGNED_LONG_LONG == SIZEOF_VOID_P + typedef unsigned long long word_t; +#else + #error "The type word_t was not declared" +#endif typedef unsigned long half_t; struct bindings; |