===================================================================

Gbp-Pq: Name 64bit
This commit is contained in:
Debian Accessibility Team 2022-06-27 15:30:41 +08:00 committed by Lu zhiping
parent f1a8098590
commit a1f2f43045
2 changed files with 31 additions and 7 deletions

View File

@ -46,6 +46,8 @@
#include "cst_alloc.h" #include "cst_alloc.h"
#include "cst_val_defs.h" #include "cst_val_defs.h"
#include <stdint.h>
/* Only CONS can be an even number */ /* Only CONS can be an even number */
#define CST_VAL_TYPE_CONS 0 #define CST_VAL_TYPE_CONS 0
#define CST_VAL_TYPE_INT 1 #define CST_VAL_TYPE_INT 1
@ -61,10 +63,15 @@ typedef struct cst_val_cons_struct {
typedef struct cst_val_atom_struct { typedef struct cst_val_atom_struct {
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
#if UINTPTR_MAX > 0xfffffffful
int ref_count;
int type; /* order is here important */
#else
short ref_count; short ref_count;
short type; /* order is here important */ short type; /* order is here important */
#endif
#else #else
#if (defined(__x86_64__) || defined(_M_X64)) #if UINTPTR_MAX > 0xfffffffful
int type; /* order is here important */ int type; /* order is here important */
int ref_count; int ref_count;
#else #else
@ -74,7 +81,7 @@ typedef struct cst_val_atom_struct {
#endif #endif
union union
{ {
#if (defined(__x86_64__) || defined(_M_X64)) #if UINTPTR_MAX > 0xfffffffful
double fval; double fval;
long long ival; long long ival;
void *vval; void *vval;

View File

@ -111,6 +111,8 @@
#include "cst_val_defs.h" #include "cst_val_defs.h"
#include <stdint.h>
/* There is built-in int to string conversions here for numbers */ /* There is built-in int to string conversions here for numbers */
/* up to 20, note if you make this bigger you have to hand change */ /* up to 20, note if you make this bigger you have to hand change */
/* other things too */ /* other things too */
@ -191,10 +193,15 @@ extern const cst_val val_string_24;
/* unquestionably doing the wrong thing */ /* unquestionably doing the wrong thing */
typedef struct cst_val_atom_struct_float { typedef struct cst_val_atom_struct_float {
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
#if UINTPTR_MAX > 0xfffffffful
int ref_count;
int type; /* order is here important */
#else
short ref_count; short ref_count;
short type; /* order is here important */ short type; /* order is here important */
#endif
#else #else
#if (defined(__x86_64__) || defined(_M_X64)) #if UINTPTR_MAX > 0xfffffffful
int type; /* order is here important */ int type; /* order is here important */
int ref_count; int ref_count;
#else #else
@ -202,7 +209,7 @@ typedef struct cst_val_atom_struct_float {
short ref_count; short ref_count;
#endif #endif
#endif #endif
#if (defined(__x86_64__) || defined(_M_X64)) #if UINTPTR_MAX > 0xfffffffful
double fval; double fval;
#else #else
float fval; float fval;
@ -211,10 +218,15 @@ typedef struct cst_val_atom_struct_float {
typedef struct cst_val_atom_struct_int { typedef struct cst_val_atom_struct_int {
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
#if UINTPTR_MAX > 0xfffffffful
int ref_count;
int type; /* order is here important (and unintuitive) */
#else
short ref_count; short ref_count;
short type; /* order is here important (and unintuitive) */ short type; /* order is here important (and unintuitive) */
#endif
#else #else
#if (defined(__x86_64__) || defined(_M_X64)) #if UINTPTR_MAX > 0xfffffffful
int type; /* order is here important */ int type; /* order is here important */
int ref_count; int ref_count;
#else #else
@ -222,7 +234,7 @@ typedef struct cst_val_atom_struct_int {
short ref_count; short ref_count;
#endif #endif
#endif #endif
#if (defined(__x86_64__) || defined(_M_X64)) #if UINTPTR_MAX > 0xfffffffful
long long ival; long long ival;
#else #else
int ival; int ival;
@ -231,10 +243,15 @@ typedef struct cst_val_atom_struct_int {
typedef struct cst_val_atom_struct_void { typedef struct cst_val_atom_struct_void {
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
#if UINTPTR_MAX > 0xfffffffful
int ref_count;
int type; /* order is here important */
#else
short ref_count; short ref_count;
short type; /* order is here important */ short type; /* order is here important */
#endif
#else #else
#if (defined(__x86_64__) || defined(_M_X64)) #if UINTPTR_MAX > 0xfffffffful
int type; /* order is here important */ int type; /* order is here important */
int ref_count; int ref_count;
#else #else