File: 64bit

package info (click to toggle)
flite 2.2-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 83,764 kB
  • sloc: ansic: 693,645; sh: 5,000; lisp: 3,057; cpp: 994; makefile: 900; xml: 52; perl: 33
file content (137 lines) | stat: -rw-r--r-- 3,944 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
Forwarded: https://github.com/festvox/flite/pull/48
commited

---
 include/cst_val.h         |   11 +++++++++--
 include/cst_val_const.h   |   27 ++++++++++++++++++++++-----
 src/wavesynth/cst_units.c |    2 +-
 3 files changed, 32 insertions(+), 8 deletions(-)

--- a/include/cst_val.h
+++ b/include/cst_val.h
@@ -46,6 +46,8 @@
 #include "cst_alloc.h"
 #include "cst_val_defs.h"
 
+#include <stdint.h>
+
 /* Only CONS can be an even number */
 #define CST_VAL_TYPE_CONS    0
 #define CST_VAL_TYPE_INT     1
@@ -61,10 +63,15 @@ typedef struct  cst_val_cons_struct {
 
 typedef struct  cst_val_atom_struct {
 #ifdef WORDS_BIGENDIAN
+#if UINTPTR_MAX > 0xfffffffful
+    int ref_count;
+    int type;  /* order is here important */
+#else
     short ref_count;
     short type;  /* order is here important */
+#endif
 #else
-#if (defined(__x86_64__) || defined(_M_X64))
+#if UINTPTR_MAX > 0xfffffffful
     int type;  /* order is here important */
     int ref_count;
 #else
@@ -74,7 +81,7 @@ typedef struct  cst_val_atom_struct {
 #endif
     union 
     {
-#if (defined(__x86_64__) || defined(_M_X64))
+#if UINTPTR_MAX > 0xfffffffful
         double fval;
         long long ival;
         void *vval;
--- a/include/cst_val_const.h
+++ b/include/cst_val_const.h
@@ -111,6 +111,8 @@
 
 #include "cst_val_defs.h"
 
+#include <stdint.h>
+
 /* 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 */
 /* other things too                                               */
@@ -191,10 +193,15 @@ extern const cst_val val_string_24;
 /* unquestionably doing the wrong thing                                 */
 typedef struct cst_val_atom_struct_float {
 #ifdef WORDS_BIGENDIAN
+#if UINTPTR_MAX > 0xfffffffful
+    int ref_count;
+    int type;  /* order is here important */
+#else
     short ref_count;
     short type;  /* order is here important */
+#endif
 #else
-#if (defined(__x86_64__) || defined(_M_X64))
+#if UINTPTR_MAX > 0xfffffffful
     int type;  /* order is here important */
     int ref_count;
 #else
@@ -202,7 +209,7 @@ typedef struct cst_val_atom_struct_float
     short ref_count;
 #endif
 #endif
-#if (defined(__x86_64__) || defined(_M_X64))
+#if UINTPTR_MAX > 0xfffffffful
     double fval;
 #else
     float fval;
@@ -211,10 +218,15 @@ typedef struct cst_val_atom_struct_float
 
 typedef struct cst_val_atom_struct_int {
 #ifdef WORDS_BIGENDIAN
+#if UINTPTR_MAX > 0xfffffffful
+    int ref_count;
+    int type;  /* order is here important (and unintuitive) */
+#else
     short ref_count;
     short type;  /* order is here important (and unintuitive) */
+#endif
 #else
-#if (defined(__x86_64__) || defined(_M_X64))
+#if UINTPTR_MAX > 0xfffffffful
     int type;  /* order is here important */
     int ref_count;
 #else
@@ -222,7 +234,7 @@ typedef struct cst_val_atom_struct_int {
     short ref_count;
 #endif
 #endif
-#if (defined(__x86_64__) || defined(_M_X64))
+#if UINTPTR_MAX > 0xfffffffful
     long long ival;
 #else
     int ival;
@@ -231,10 +243,15 @@ typedef struct cst_val_atom_struct_int {
 
 typedef struct cst_val_atom_struct_void {
 #ifdef WORDS_BIGENDIAN
+#if UINTPTR_MAX > 0xfffffffful
+    int ref_count;
+    int type;  /* order is here important */
+#else
     short ref_count;
     short type;  /* order is here important */
+#endif
 #else
-#if (defined(__x86_64__) || defined(_M_X64))
+#if UINTPTR_MAX > 0xfffffffful
     int type;  /* order is here important */
     int ref_count;
 #else
--- a/src/wavesynth/cst_units.c
+++ b/src/wavesynth/cst_units.c
@@ -590,7 +590,7 @@ void add_residual_pulse(int targ_size, u
 			int unit_size, const unsigned char *unit_residual)
 {
     int i,m;
-#if (defined(__x86_64__) || defined(_M_X64))
+#if UINTPTR_MAX > 0xfffffffful
     long long p;
     /* Unit residual isn't a pointer its a number, the power for the 
        the sts, yes this is hackily casting the address to a number */