Add ut*/st* type shortcuts (#13550)

This commit is contained in:
Anton Kochkov 2019-03-29 08:22:55 -05:00 committed by GitHub
parent 97db085479
commit bd9eb0138b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -548,6 +548,17 @@ LIBTCCAPI TCCState *tcc_new(const char *arch, int bits, const char *os)
tcc_define_symbol (s, "__STDC_VERSION__", "199901L");
tcc_define_symbol (s, "__STDC_HOSTED__", NULL);
/* type defines */
tcc_define_symbol (s, "ut8", "uint8_t");
tcc_define_symbol (s, "ut16", "uint16_t");
tcc_define_symbol (s, "ut32", "uint32_t");
tcc_define_symbol (s, "ut64", "uint64_t");
tcc_define_symbol (s, "st8", "int8_t");
tcc_define_symbol (s, "st16", "int16_t");
tcc_define_symbol (s, "st32", "int32_t");
tcc_define_symbol (s, "st64", "int64_t");
/* target defines */
if (!strncmp (arch, "x86", 3)) {
if (bits == 32 || bits == 16) {