Fix 64-bit builds of tiny interpreters

This commit is contained in:
Lassi Kortela 2020-02-26 11:00:08 +02:00
parent ec7601076a
commit dc90139bc0
3 changed files with 19 additions and 0 deletions

View File

@ -26,8 +26,13 @@
#include <ctype.h>
#include <sys/types.h>
#ifdef __LP64__
typedef u_int64_t value_t;
typedef int64_t number_t;
#else
typedef u_int32_t value_t;
typedef int32_t number_t;
#endif
typedef struct {
value_t car;

View File

@ -47,8 +47,13 @@
#include <ctype.h>
#include <sys/types.h>
#ifdef __LP64__
typedef u_int64_t value_t;
typedef int64_t number_t;
#else
typedef u_int32_t value_t;
typedef int32_t number_t;
#endif
typedef struct {
value_t car;

View File

@ -32,12 +32,21 @@
#include <ctype.h>
#include <sys/types.h>
#ifdef __LP64__
typedef u_int64_t value_t;
#else
typedef u_int32_t value_t;
#endif
#ifdef FLOAT
typedef float number_t;
#else
#ifdef __LP64__
typedef int64_t number_t;
#else
typedef int32_t number_t;
#endif
#endif
typedef struct {
value_t car;