-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathguile-1.8.3-64bit-fixes.patch
165 lines (159 loc) · 5.49 KB
/
guile-1.8.3-64bit-fixes.patch
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
--- guile-1.8.3/srfi/srfi-60.c 2007-05-09 13:22:03.000000000 -0700
+++ guile-1.8.3/srfi/srfi-60.c.new 2007-11-06 20:55:38.000000000 -0800
@@ -59,7 +59,7 @@ SCM_DEFINE (scm_srfi60_log2_binary_facto
SCM_DEFINE (scm_srfi60_copy_bit, "copy-bit", 3, 0, 0,
- (SCM index, SCM n, SCM bit),
+ (SCM index, SCM n, SCM newbit),
"Return @var{n} with the bit at @var{index} set according to\n"
"@var{newbit}. @var{newbit} should be @code{#t} to set the bit\n"
"to 1, or @code{#f} to set it to 0. Bits other than at\n"
@@ -75,7 +75,7 @@ SCM_DEFINE (scm_srfi60_copy_bit, "copy-b
int bb;
ii = scm_to_ulong (index);
- bb = scm_to_bool (bit);
+ bb = scm_to_bool (newbit);
if (SCM_I_INUMP (n))
{
@@ -86,7 +86,7 @@ SCM_DEFINE (scm_srfi60_copy_bit, "copy-b
if (ii < SCM_LONG_BIT-1)
{
nn &= ~(1L << ii); /* zap bit at index */
- nn |= ((long) bb << ii); /* insert desired bit */
+ nn |= (((unsigned long) bb) << ii); /* insert desired bit */
return scm_from_long (nn);
}
else
--- guile-1.8.3/test-suite/standalone/test-conversion.c 2007-10-10 13:17:52.000000000 -0700
+++ guile-1.8.3/test-suite/standalone/test-conversion.c.new 2007-11-06 21:05:07.000000000 -0800
@@ -45,7 +45,7 @@ test_1 (const char *str, scm_t_intmax mi
{
fprintf (stderr, "fail: scm_is_signed_integer (%s, "
"%" PRIiMAX ", %" PRIiMAX ") == %d\n",
- str, min, max, result);
+ str, (long long) min, (long long) max, result);
exit (1);
}
}
@@ -131,7 +131,9 @@ test_2 (const char *str, scm_t_uintmax m
{
fprintf (stderr, "fail: scm_is_unsigned_integer (%s, "
"%" PRIuMAX ", %" PRIuMAX ") == %d\n",
- str, min, max, result);
+ str,
+ (unsigned long long) min, (unsigned long long) max,
+ result);
exit (1);
}
}
@@ -252,7 +254,7 @@ test_3 (const char *str, scm_t_intmax mi
fprintf (stderr,
"fail: scm_to_signed_int (%s, "
"%" PRIiMAX ", %" PRIiMAX ") -> out of range\n",
- str, min, max);
+ str, (long long) min, (long long) max);
exit (1);
}
}
@@ -265,7 +267,7 @@ test_3 (const char *str, scm_t_intmax mi
fprintf (stderr,
"fail: scm_to_signed_int (%s, "
"%" PRIiMAX", %" PRIiMAX ") -> wrong type\n",
- str, min, max);
+ str, (long long) min, (long long) max);
exit (1);
}
}
@@ -279,7 +281,7 @@ test_3 (const char *str, scm_t_intmax mi
fprintf (stderr,
"fail: scm_to_signed_int (%s, "
"%" PRIiMAX ", %" PRIiMAX ") = %" PRIiMAX "\n",
- str, min, max, result);
+ str, (long long) min, (long long) max, (long long) result);
exit (1);
}
}
@@ -387,7 +389,7 @@ test_4 (const char *str, scm_t_uintmax m
fprintf (stderr,
"fail: scm_to_unsigned_int (%s, "
"%" PRIuMAX ", %" PRIuMAX ") -> out of range\n",
- str, min, max);
+ str, (unsigned long long) min, (unsigned long long) max);
exit (1);
}
}
@@ -400,7 +402,7 @@ test_4 (const char *str, scm_t_uintmax m
fprintf (stderr,
"fail: scm_to_unsigned_int (%s, "
"%" PRIuMAX ", %" PRIuMAX ") -> wrong type\n",
- str, min, max);
+ str, (unsigned long long) min, (unsigned long long) max);
exit (1);
}
}
@@ -414,7 +416,9 @@ test_4 (const char *str, scm_t_uintmax m
fprintf (stderr,
"fail: scm_to_unsigned_int (%s, "
"%" PRIuMAX ", %" PRIuMAX ") == %" PRIuMAX "\n",
- str, min, max, result);
+ str,
+ (unsigned long long) min, (unsigned long long) max,
+ (unsigned long long) result);
exit (1);
}
}
@@ -470,7 +474,7 @@ test_5 (scm_t_intmax val, const char *re
if (scm_is_false (scm_equal_p (scm_from_signed_integer (val), res)))
{
fprintf (stderr, "fail: scm_from_signed_integer (%" PRIiMAX ") == %s\n",
- val, result);
+ (long long) val, result);
exit (1);
}
}
@@ -503,7 +507,7 @@ test_6 (scm_t_uintmax val, const char *r
{
fprintf (stderr, "fail: scm_from_unsigned_integer (%"
PRIuMAX ") == %s\n",
- val, result);
+ (unsigned long long) val, result);
exit (1);
}
}
@@ -531,7 +535,8 @@ test_7s (SCM n, scm_t_intmax c_n, const
if (scm_is_false (scm_equal_p (n, r)))
{
- fprintf (stderr, "fail: %s (%" PRIiMAX ") == %s\n", func, c_n, result);
+ fprintf (stderr, "fail: %s (%" PRIiMAX ") == %s\n",
+ func, (long long) c_n, result);
exit (1);
}
}
@@ -545,7 +550,8 @@ test_7u (SCM n, scm_t_uintmax c_n, const
if (scm_is_false (scm_equal_p (n, r)))
{
- fprintf (stderr, "fail: %s (%" PRIuMAX ") == %s\n", func, c_n, result);
+ fprintf (stderr, "fail: %s (%" PRIuMAX ") == %s\n",
+ func, (unsigned long long) c_n, result);
exit (1);
}
}
@@ -604,7 +610,8 @@ test_8s (const char *str, scm_t_intmax (
|| data.result != result)
{
fprintf (stderr,
- "fail: %s (%s) = %" PRIiMAX "\n", func_name, str, result);
+ "fail: %s (%s) = %" PRIiMAX "\n",
+ func_name, str, (long long) result);
exit (1);
}
}
@@ -662,7 +669,8 @@ test_8u (const char *str, scm_t_uintmax
|| data.result != result)
{
fprintf (stderr,
- "fail: %s (%s) = %" PRIiMAX "\n", func_name, str, result);
+ "fail: %s (%s) = %" PRIiMAX "\n",
+ func_name, str, (unsigned long long) result);
exit (1);
}
}