/[gentoo-x86]/games-strategy/wormux/files/wormux-0.9.2-x86_64.patch
Gentoo

Contents of /games-strategy/wormux/files/wormux-0.9.2-x86_64.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Tue Apr 20 19:08:34 2010 UTC (8 years, 2 months ago) by mr_bones_
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
version bump; clean old
(Portage version: 2.1.8.3/cvs/Linux i686)

1 http://bugs.gentoo.org/show_bug.cgi?id=315921
2
3 diff -ruN lib/fixedpoint.orig/fixed_class.h lib/fixedpoint/fixed_class.h
4 --- lib/fixedpoint.orig/fixed_class.h 2010-04-05 18:09:44.000000000 +0300
5 +++ lib/fixedpoint/fixed_class.h 2010-04-19 17:41:58.000000000 +0300
6 @@ -47,6 +47,12 @@
7
8 // The template argument p in all of the following functions refers to the
9 // fixed point precision (e.g. p = 8 gives 24.8 fixed point functions).
10 +#ifdef __APPLE__
11 + #define SIZE_T_FIXEDPOINT_METHODS
12 +#endif
13 +#if __WORDSIZE == 64
14 + #define SIZE_T_FIXEDPOINT_METHODS
15 +#endif
16
17 template <int p>
18 struct fixed_point {
19 @@ -57,9 +63,11 @@
20 /*explicit*/ fixed_point(int64_t i) : intValue(i << p) {}
21 /*explicit*/ fixed_point(float f) : intValue(float2fix<p>(f)) {}
22 /*explicit*/ fixed_point(double f) : intValue(float2fix<p>((float)f)) {}
23 +#if __WORDSIZE != 64
24 /*explicit*/ fixed_point(long int l) : intValue(((int64_t)l) << p) {}
25 +#endif
26 /*explicit*/ fixed_point(unsigned int l) : intValue(((int64_t)l) << p) {}
27 -#ifdef __APPLE__
28 +#ifdef SIZE_T_FIXEDPOINT_METHODS
29 /*explicit*/ fixed_point(size_t i) : intValue(((int64_t)i) << p) {}
30 #endif
31
32 @@ -141,7 +149,7 @@
33 inline fixed_point<p> operator / (unsigned int a, fixed_point<p> b)
34 { fixed_point<p> r(a); r /= b; return r; }
35
36 -#ifdef __APPLE__
37 +#ifdef SIZE_T_FIXEDPOINT_METHODS
38 template <int p>
39 inline fixed_point<p> operator + (size_t a, fixed_point<p> b)
40 { return b + a; }
41 diff -ruN lib/fixedpoint.orig/fixed_func.h lib/fixedpoint/fixed_func.h
42 --- lib/fixedpoint.orig/fixed_func.h 2010-04-05 18:09:44.000000000 +0300
43 +++ lib/fixedpoint/fixed_func.h 2010-04-19 17:41:58.000000000 +0300
44 @@ -46,7 +46,7 @@
45 #ifndef _MSC_VER
46 #include <stdint.h>
47 #else
48 -#include "stdint.h"
49 +#include "stdint_fallback.h"
50 #endif
51
52 namespace fixedpoint {
53 diff -ruN lib/fixedpoint.orig/Makefile.am lib/fixedpoint/Makefile.am
54 --- lib/fixedpoint.orig/Makefile.am 2010-04-05 18:09:44.000000000 +0300
55 +++ lib/fixedpoint/Makefile.am 2010-04-19 17:41:58.000000000 +0300
56 @@ -9,7 +9,7 @@
57 fixed_func.cpp \
58 fixed_func.h \
59 fixsintab.h \
60 - stdint.h
61 + stdint_fallback.h
62
63
64 AM_CXXFLAGS = -I$(top_srcdir)/lib/fixedpoint \
65 diff -ruN lib/fixedpoint.orig/stdint_fallback.h lib/fixedpoint/stdint_fallback.h
66 --- lib/fixedpoint.orig/stdint_fallback.h 1970-01-01 02:00:00.000000000 +0200
67 +++ lib/fixedpoint/stdint_fallback.h 2010-04-19 17:41:58.000000000 +0300
68 @@ -0,0 +1,184 @@
69 +/* ISO C9x 7.18 Integer types <stdint.h>
70 + * Based on ISO/IEC SC22/WG14 9899 Committee draft (SC22 N2794)
71 + *
72 + * THIS SOFTWARE IS NOT COPYRIGHTED
73 + *
74 + * Contributor: Danny Smith <danny_r_smith_2001@yahoo.co.nz>
75 + *
76 + * This source code is offered for use in the public domain. You may
77 + * use, modify or distribute it freely.
78 + *
79 + * This code is distributed in the hope that it will be useful but
80 + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
81 + * DISCLAIMED. This includes but is not limited to warranties of
82 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
83 + *
84 + * Date: 2000-12-02
85 + */
86 +
87 +
88 +#ifndef _STDINT_H
89 +#define _STDINT_H
90 +#define __need_wint_t
91 +#define __need_wchar_t
92 +#include <stddef.h>
93 +
94 +/* 7.18.1.1 Exact-width integer types */
95 +typedef signed char int8_t;
96 +typedef unsigned char uint8_t;
97 +typedef short int16_t;
98 +typedef unsigned short uint16_t;
99 +typedef int int32_t;
100 +typedef unsigned uint32_t;
101 +typedef long long int64_t;
102 +typedef unsigned long long uint64_t;
103 +
104 +/* 7.18.1.2 Minimum-width integer types */
105 +typedef signed char int_least8_t;
106 +typedef unsigned char uint_least8_t;
107 +typedef short int_least16_t;
108 +typedef unsigned short uint_least16_t;
109 +typedef int int_least32_t;
110 +typedef unsigned uint_least32_t;
111 +typedef long long int_least64_t;
112 +typedef unsigned long long uint_least64_t;
113 +
114 +/* 7.18.1.3 Fastest minimum-width integer types
115 + * Not actually guaranteed to be fastest for all purposes
116 + * Here we use the exact-width types for 8 and 16-bit ints.
117 + */
118 +typedef char int_fast8_t;
119 +typedef unsigned char uint_fast8_t;
120 +typedef short int_fast16_t;
121 +typedef unsigned short uint_fast16_t;
122 +typedef int int_fast32_t;
123 +typedef unsigned int uint_fast32_t;
124 +typedef long long int_fast64_t;
125 +typedef unsigned long long uint_fast64_t;
126 +
127 +/* 7.18.1.4 Integer types capable of holding object pointers */
128 +typedef int intptr_t;
129 +typedef unsigned uintptr_t;
130 +
131 +/* 7.18.1.5 Greatest-width integer types */
132 +typedef long long intmax_t;
133 +typedef unsigned long long uintmax_t;
134 +
135 +/* 7.18.2 Limits of specified-width integer types */
136 +#if !defined ( __cplusplus) || defined (__STDC_LIMIT_MACROS)
137 +
138 +/* 7.18.2.1 Limits of exact-width integer types */
139 +#define INT8_MIN (-128)
140 +#define INT16_MIN (-32768)
141 +#define INT32_MIN (-2147483647 - 1)
142 +#define INT64_MIN (-9223372036854775807LL - 1)
143 +
144 +#define INT8_MAX 127
145 +#define INT16_MAX 32767
146 +#define INT32_MAX 2147483647
147 +#define INT64_MAX 9223372036854775807LL
148 +
149 +#define UINT8_MAX 0xff /* 255U */
150 +#define UINT16_MAX 0xffff /* 65535U */
151 +#define UINT32_MAX 0xffffffff /* 4294967295U */
152 +#define UINT64_MAX 0xffffffffffffffffULL /* 18446744073709551615ULL */
153 +
154 +/* 7.18.2.2 Limits of minimum-width integer types */
155 +#define INT_LEAST8_MIN INT8_MIN
156 +#define INT_LEAST16_MIN INT16_MIN
157 +#define INT_LEAST32_MIN INT32_MIN
158 +#define INT_LEAST64_MIN INT64_MIN
159 +
160 +#define INT_LEAST8_MAX INT8_MAX
161 +#define INT_LEAST16_MAX INT16_MAX
162 +#define INT_LEAST32_MAX INT32_MAX
163 +#define INT_LEAST64_MAX INT64_MAX
164 +
165 +#define UINT_LEAST8_MAX UINT8_MAX
166 +#define UINT_LEAST16_MAX UINT16_MAX
167 +#define UINT_LEAST32_MAX UINT32_MAX
168 +#define UINT_LEAST64_MAX UINT64_MAX
169 +
170 +/* 7.18.2.3 Limits of fastest minimum-width integer types */
171 +#define INT_FAST8_MIN INT8_MIN
172 +#define INT_FAST16_MIN INT16_MIN
173 +#define INT_FAST32_MIN INT32_MIN
174 +#define INT_FAST64_MIN INT64_MIN
175 +
176 +#define INT_FAST8_MAX INT8_MAX
177 +#define INT_FAST16_MAX INT16_MAX
178 +#define INT_FAST32_MAX INT32_MAX
179 +#define INT_FAST64_MAX INT64_MAX
180 +
181 +#define UINT_FAST8_MAX UINT8_MAX
182 +#define UINT_FAST16_MAX UINT16_MAX
183 +#define UINT_FAST32_MAX UINT32_MAX
184 +#define UINT_FAST64_MAX UINT64_MAX
185 +
186 +/* 7.18.2.4 Limits of integer types capable of holding
187 + object pointers */
188 +#define INTPTR_MIN INT32_MIN
189 +#define INTPTR_MAX INT32_MAX
190 +#define UINTPTR_MAX UINT32_MAX
191 +
192 +/* 7.18.2.5 Limits of greatest-width integer types */
193 +#define INTMAX_MIN INT64_MIN
194 +#define INTMAX_MAX INT64_MAX
195 +#define UINTMAX_MAX UINT64_MAX
196 +
197 +/* 7.18.3 Limits of other integer types */
198 +#define PTRDIFF_MIN INT32_MIN
199 +#define PTRDIFF_MAX INT32_MAX
200 +
201 +#define SIG_ATOMIC_MIN INT32_MIN
202 +#define SIG_ATOMIC_MAX INT32_MAX
203 +
204 +#define SIZE_MAX UINT32_MAX
205 +
206 +#ifndef WCHAR_MIN /* also in wchar.h */
207 +#define WCHAR_MIN 0
208 +#define WCHAR_MAX 0xffff /* UINT16_MAX */
209 +#endif
210 +
211 +/*
212 + * wint_t is unsigned short for compatibility with MS runtime
213 + */
214 +#define WINT_MIN 0
215 +#define WINT_MAX 0xffff /* UINT16_MAX */
216 +
217 +#endif /* !defined ( __cplusplus) || defined __STDC_LIMIT_MACROS */
218 +
219 +
220 +/* 7.18.4 Macros for integer constants */
221 +#if !defined ( __cplusplus) || defined (__STDC_CONSTANT_MACROS)
222 +
223 +/* 7.18.4.1 Macros for minimum-width integer constants
224 +
225 + Accoding to Douglas Gwyn <gwyn@arl.mil>:
226 + "This spec was changed in ISO/IEC 9899:1999 TC1; in ISO/IEC
227 + 9899:1999 as initially published, the expansion was required
228 + to be an integer constant of precisely matching type, which
229 + is impossible to accomplish for the shorter types on most
230 + platforms, because C99 provides no standard way to designate
231 + an integer constant with width less than that of type int.
232 + TC1 changed this to require just an integer constant
233 + *expression* with *promoted* type."
234 +*/
235 +
236 +#define INT8_C(val) ((int8_t) + (val))
237 +#define UINT8_C(val) ((uint8_t) + (val##U))
238 +#define INT16_C(val) ((int16_t) + (val))
239 +#define UINT16_C(val) ((uint16_t) + (val##U))
240 +
241 +#define INT32_C(val) val##L
242 +#define UINT32_C(val) val##UL
243 +#define INT64_C(val) val##LL
244 +#define UINT64_C(val) val##ULL
245 +
246 +/* 7.18.4.2 Macros for greatest-width integer constants */
247 +#define INTMAX_C(val) INT64_C(val)
248 +#define UINTMAX_C(val) UINT64_C(val)
249 +
250 +#endif /* !defined ( __cplusplus) || defined __STDC_CONSTANT_MACROS */
251 +
252 +#endif
253 diff -ruN lib/fixedpoint.orig/stdint.h lib/fixedpoint/stdint.h
254 --- lib/fixedpoint.orig/stdint.h 2010-04-05 18:09:44.000000000 +0300
255 +++ lib/fixedpoint/stdint.h 1970-01-01 02:00:00.000000000 +0200
256 @@ -1,186 +0,0 @@
257 -/* ISO C9x 7.18 Integer types <stdint.h>
258 - * Based on ISO/IEC SC22/WG14 9899 Committee draft (SC22 N2794)
259 - *
260 - * THIS SOFTWARE IS NOT COPYRIGHTED
261 - *
262 - * Contributor: Danny Smith <danny_r_smith_2001@yahoo.co.nz>
263 - *
264 - * This source code is offered for use in the public domain. You may
265 - * use, modify or distribute it freely.
266 - *
267 - * This code is distributed in the hope that it will be useful but
268 - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
269 - * DISCLAIMED. This includes but is not limited to warranties of
270 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
271 - *
272 - * Date: 2000-12-02
273 - */
274 -
275 -
276 -#ifndef _STDINT_H
277 -#define _STDINT_H
278 -#define __need_wint_t
279 -#define __need_wchar_t
280 -#include <stddef.h>
281 -
282 -/* 7.18.1.1 Exact-width integer types */
283 -typedef signed char int8_t;
284 -typedef unsigned char uint8_t;
285 -typedef short int16_t;
286 -typedef unsigned short uint16_t;
287 -typedef int int32_t;
288 -typedef unsigned uint32_t;
289 -typedef long long int64_t;
290 -typedef unsigned long long uint64_t;
291 -
292 -/* 7.18.1.2 Minimum-width integer types */
293 -typedef signed char int_least8_t;
294 -typedef unsigned char uint_least8_t;
295 -typedef short int_least16_t;
296 -typedef unsigned short uint_least16_t;
297 -typedef int int_least32_t;
298 -typedef unsigned uint_least32_t;
299 -typedef long long int_least64_t;
300 -typedef unsigned long long uint_least64_t;
301 -
302 -/* 7.18.1.3 Fastest minimum-width integer types
303 - * Not actually guaranteed to be fastest for all purposes
304 - * Here we use the exact-width types for 8 and 16-bit ints.
305 - */
306 -typedef char int_fast8_t;
307 -typedef unsigned char uint_fast8_t;
308 -typedef short int_fast16_t;
309 -typedef unsigned short uint_fast16_t;
310 -typedef int int_fast32_t;
311 -typedef unsigned int uint_fast32_t;
312 -typedef long long int_fast64_t;
313 -typedef unsigned long long uint_fast64_t;
314 -
315 -#ifndef __APPLE__
316 -/* 7.18.1.4 Integer types capable of holding object pointers */
317 -typedef int intptr_t;
318 -typedef unsigned uintptr_t;
319 -#endif
320 -
321 -/* 7.18.1.5 Greatest-width integer types */
322 -typedef long long intmax_t;
323 -typedef unsigned long long uintmax_t;
324 -
325 -/* 7.18.2 Limits of specified-width integer types */
326 -#if !defined ( __cplusplus) || defined (__STDC_LIMIT_MACROS)
327 -
328 -/* 7.18.2.1 Limits of exact-width integer types */
329 -#define INT8_MIN (-128)
330 -#define INT16_MIN (-32768)
331 -#define INT32_MIN (-2147483647 - 1)
332 -#define INT64_MIN (-9223372036854775807LL - 1)
333 -
334 -#define INT8_MAX 127
335 -#define INT16_MAX 32767
336 -#define INT32_MAX 2147483647
337 -#define INT64_MAX 9223372036854775807LL
338 -
339 -#define UINT8_MAX 0xff /* 255U */
340 -#define UINT16_MAX 0xffff /* 65535U */
341 -#define UINT32_MAX 0xffffffff /* 4294967295U */
342 -#define UINT64_MAX 0xffffffffffffffffULL /* 18446744073709551615ULL */
343 -
344 -/* 7.18.2.2 Limits of minimum-width integer types */
345 -#define INT_LEAST8_MIN INT8_MIN
346 -#define INT_LEAST16_MIN INT16_MIN
347 -#define INT_LEAST32_MIN INT32_MIN
348 -#define INT_LEAST64_MIN INT64_MIN
349 -
350 -#define INT_LEAST8_MAX INT8_MAX
351 -#define INT_LEAST16_MAX INT16_MAX
352 -#define INT_LEAST32_MAX INT32_MAX
353 -#define INT_LEAST64_MAX INT64_MAX
354 -
355 -#define UINT_LEAST8_MAX UINT8_MAX
356 -#define UINT_LEAST16_MAX UINT16_MAX
357 -#define UINT_LEAST32_MAX UINT32_MAX
358 -#define UINT_LEAST64_MAX UINT64_MAX
359 -
360 -/* 7.18.2.3 Limits of fastest minimum-width integer types */
361 -#define INT_FAST8_MIN INT8_MIN
362 -#define INT_FAST16_MIN INT16_MIN
363 -#define INT_FAST32_MIN INT32_MIN
364 -#define INT_FAST64_MIN INT64_MIN
365 -
366 -#define INT_FAST8_MAX INT8_MAX
367 -#define INT_FAST16_MAX INT16_MAX
368 -#define INT_FAST32_MAX INT32_MAX
369 -#define INT_FAST64_MAX INT64_MAX
370 -
371 -#define UINT_FAST8_MAX UINT8_MAX
372 -#define UINT_FAST16_MAX UINT16_MAX
373 -#define UINT_FAST32_MAX UINT32_MAX
374 -#define UINT_FAST64_MAX UINT64_MAX
375 -
376 -/* 7.18.2.4 Limits of integer types capable of holding
377 - object pointers */
378 -#define INTPTR_MIN INT32_MIN
379 -#define INTPTR_MAX INT32_MAX
380 -#define UINTPTR_MAX UINT32_MAX
381 -
382 -/* 7.18.2.5 Limits of greatest-width integer types */
383 -#define INTMAX_MIN INT64_MIN
384 -#define INTMAX_MAX INT64_MAX
385 -#define UINTMAX_MAX UINT64_MAX
386 -
387 -/* 7.18.3 Limits of other integer types */
388 -#define PTRDIFF_MIN INT32_MIN
389 -#define PTRDIFF_MAX INT32_MAX
390 -
391 -#define SIG_ATOMIC_MIN INT32_MIN
392 -#define SIG_ATOMIC_MAX INT32_MAX
393 -
394 -#define SIZE_MAX UINT32_MAX
395 -
396 -#ifndef WCHAR_MIN /* also in wchar.h */
397 -#define WCHAR_MIN 0
398 -#define WCHAR_MAX 0xffff /* UINT16_MAX */
399 -#endif
400 -
401 -/*
402 - * wint_t is unsigned short for compatibility with MS runtime
403 - */
404 -#define WINT_MIN 0
405 -#define WINT_MAX 0xffff /* UINT16_MAX */
406 -
407 -#endif /* !defined ( __cplusplus) || defined __STDC_LIMIT_MACROS */
408 -
409 -
410 -/* 7.18.4 Macros for integer constants */
411 -#if !defined ( __cplusplus) || defined (__STDC_CONSTANT_MACROS)
412 -
413 -/* 7.18.4.1 Macros for minimum-width integer constants
414 -
415 - Accoding to Douglas Gwyn <gwyn@arl.mil>:
416 - "This spec was changed in ISO/IEC 9899:1999 TC1; in ISO/IEC
417 - 9899:1999 as initially published, the expansion was required
418 - to be an integer constant of precisely matching type, which
419 - is impossible to accomplish for the shorter types on most
420 - platforms, because C99 provides no standard way to designate
421 - an integer constant with width less than that of type int.
422 - TC1 changed this to require just an integer constant
423 - *expression* with *promoted* type."
424 -*/
425 -
426 -#define INT8_C(val) ((int8_t) + (val))
427 -#define UINT8_C(val) ((uint8_t) + (val##U))
428 -#define INT16_C(val) ((int16_t) + (val))
429 -#define UINT16_C(val) ((uint16_t) + (val##U))
430 -
431 -#define INT32_C(val) val##L
432 -#define UINT32_C(val) val##UL
433 -#define INT64_C(val) val##LL
434 -#define UINT64_C(val) val##ULL
435 -
436 -/* 7.18.4.2 Macros for greatest-width integer constants */
437 -#define INTMAX_C(val) INT64_C(val)
438 -#define UINTMAX_C(val) UINT64_C(val)
439 -
440 -#endif /* !defined ( __cplusplus) || defined __STDC_CONSTANT_MACROS */
441 -
442 -#endif

  ViewVC Help
Powered by ViewVC 1.1.20