erwin/defs.h
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 #ifdef ERWIN_DEBUG_INCLUDE
52 #warning "Including defs.h."
53 #endif
54
55 #ifndef Global_ERWIN_DEFS_H
56 #define Global_ERWIN_DEFS_H
57
58 #ifdef ERWIN_DEBUG_INCLUDE
59 # warning "First inclusion of defs.h."
60 #endif
61
62 --INCLUDE-FORWARDS--
63
64 #ifdef Global_ERWIN_ADAM_NAME
65
66 #include <GlobalP_ADAM.h>
67
68 #COPYDEF ERWIN_VERSION
69 #COPYDEF ERWIN_CPP_ONLY
70 #COPYDEF ERWIN_DEFAULT_ASSERTION_FAILED_HANDLER
71 #COPYDEF ERWIN_ERROR_PRINT
72 #COPYDEF ERWIN_ERROR_STREAM
73 #COPYDEF ERWIN_EXPORT
74 #COPYDEF ERWIN_INLINE_PERHAPS
75 #COPYDEF ERWIN_OPTIMISE_SIZE
76 #COPYDEF ERWIN_RAND_MAX
77 #COPYDEF ERWIN_NEED_DET_RANDOM
78 #COPYDEF ERWIN_RANDOM
79 #COPYDEF ERWIN_RANDOM_FUNC
80 #COPYDEF ERWIN_THREAD_SAFE
81 #COPYDEF ERWIN_TCALLOC
82 #COPYDEF ERWIN_TMALLOC
83 #COPYDEF ERWIN_TO_BOOL
84 #COPYDEF ERWIN_TREALLOC_ARRAY
85 #COPYDEF ERWIN_TREALLOC_ATOMS
86 #COPYDEF ERWIN_TFREE
87 #COPYDEF BOOL_DEFINED
88 #COPYDEF ERWIN_FALSE
89 #COPYDEF ERWIN_TRUE
90 #COPYDEF ERWIN_EXPLICIT
91 #COPYDEF ERWIN_USE_EXPLICIT
92 #COPYDEF ERWIN_USE_MUTABLE
93 #COPYDEF ERWIN_MUTABLE
94
95 #else
96
97 #define Global_ERWIN_VERSION(X,Y,Z) (((X) * 1000000UL) | ((Y) * 10000UL) | (Z))
98
99
100 #define ?Global_ERWIN_COMPAT_VERSION_CODE Global_ERWIN_VERSION(999,0,0)
101
102 #if !defined(Global_ERWINMM_COMPAT1)
103 # if Global_ERWIN_COMPAT_VERSION_CODE < Global_ERWIN_VERSION(2,0,0)
104 # define Global_ERWIN_COMPAT1 1
105 # endif
106 #endif
107
108 #if !defined(Global_ERWIN_COMPAT_2_0_228)
109 # if defined(Global_ERWINMM_COMPAT1) || Global_ERWIN_COMPAT_VERSION_CODE <= Global_ERWIN_VERSION(2,0,228)
110 # define Global_ERWIN_COMPAT_2_0_228 1
111 # endif
112 #endif
113
114 #if !defined(Global_ERWIN_COMPAT_2_0_236)
115 # if defined(Global_ERWIN_COMPAT_2_0_228) || Global_ERWIN_COMPAT_VERSION_CODE <= Global_ERWIN_VERSION(2,0,236)
116 # define Global_ERWIN_COMPAT_2_0_236 1
117 # endif
118 #endif
119
120 #if !defined(Global_ERWIN_COMPAT_2_0_241)
121 # if defined(Global_ERWIN_COMPAT_2_0_236) || Global_ERWIN_COMPAT_VERSION_CODE <= Global_ERWIN_VERSION(2,0,241)
122 # define Global_ERWIN_COMPAT_2_0_241 1
123 # endif
124 #endif
125
126 #if !defined(Global_ERWIN_COMPAT_2_0_249)
127 # if defined(Global_ERWIN_COMPAT_2_0_241) || Global_ERWIN_COMPAT_VERSION_CODE <= Global_ERWIN_VERSION(2,0,249)
128 # define Global_ERWIN_COMPAT_2_0_249 1
129 # endif
130 #endif
131
132 #if !defined(Global_ERWIN_COMPAT_2_0_250)
133 # if defined(Global_ERWIN_COMPAT_2_0_249) || Global_ERWIN_COMPAT_VERSION_CODE <= Global_ERWIN_VERSION(2,0,250)
134 # define Global_ERWIN_COMPAT_2_0_250 1
135 # endif
136 #endif
137
138 #if !defined(Global_ERWIN_COMPAT_2_0_260)
139 # if defined(Global_ERWIN_COMPAT_2_0_250) || Global_ERWIN_COMPAT_VERSION_CODE <= Global_ERWIN_VERSION(2,0,260)
140 # define Global_ERWIN_COMPAT_2_0_260 1
141 # endif
142 #endif
143
144 #if !defined(Global_ERWIN_COMPAT_2_0_264)
145 # if defined(Global_ERWIN_COMPAT_2_0_260) || Global_ERWIN_COMPAT_VERSION_CODE <= Global_ERWIN_VERSION(2,0,264)
146 # define Global_ERWIN_COMPAT_2_0_264 1
147 # endif
148 #endif
149
150
151
152 #if defined(cplusplus) && !defined(__cplusplus)
153 # define __cplusplus 1
154 #endif
155
156 #if defined(c_plusplus) && !defined(__cplusplus)
157 # define __cplusplus 1
158 #endif
159
160
161
162 #undef ERWIN_MSVC
163 #if defined(_MSC_VER)
164 # define ERWIN_MSVC 1
165 #endif
166
167 #undef ERWIN_DOS
168 #if defined(_WIN32) || defined(__WIN32__) || defined(__TOS_WIN__)
169 # define ERWIN_DOS
170 #endif
171
172
173
174
175
176
177
178 #define ?ERWIN_IGNORE_BROKEN_MS_COMPILER 0
179
180
181
182 #undef ERWIN_WATCOM
183 #if defined(__WATCOMC__)
184 # define ERWIN_WATCOM 1
185 #endif
186
187
188
189 #ifdef __GNUC__
190
191 # undef inline
192
193 # if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
194 # define ERWIN_GNUC_V27X
195 # endif
196 # if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8)
197 # define ERWIN_GNUC_V28X
198 # endif
199 # if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 9)
200 # define ERWIN_GNUC_V29X
201 # endif
202 # if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 0)
203 # define ERWIN_GNUC_V30X
204 # endif
205 # if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
206 # define ERWIN_GNUC_V31X
207 # endif
208 # if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
209 # define ERWIN_GNUC_V32X
210 # endif
211 # if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)
212 # define ERWIN_GNUC_V33X
213 # endif
214 # if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
215 # define ERWIN_GNUC_V34X
216 # endif
217 # if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 0)
218 # define ERWIN_GNUC_V40X
219 # endif
220 # if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1)
221 # define ERWIN_GNUC_V41X
222 # endif
223 # if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)
224 # define ERWIN_GNUC_V42X
225 # endif
226 # if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
227 # define ERWIN_GNUC_V43X
228 # endif
229
230 # ifndef ERWIN_NO_ASM
231 # ifdef __i386__
232 # if defined(ERWIN_GNUC_V29X)
233 # define ERWIN_GNUC_I386_ASM_NEW
234 # elif defined(ERWIN_GNUC_V27X)
235 # define ERWIN_GNUC_I386_ASM_OLD
236 # endif
237 # endif
238 # endif
239
240 # ifndef ERWIN_NO_ASM
241 # if defined(__ppc__) || defined(__powerpc__)
242 # if defined(ERWIN_GNUC_V29X)
243 # define ERWIN_GNUC_PPC_ASM_NEW
244 # endif
245 # endif
246 # endif
247
248 # ifndef ERWIN_NO_ASM
249 # ifdef __x86_64__
250 # if defined(ERWIN_GNUC_V29X)
251 # define ERWIN_GNUC_X86_64_ASM_NEW
252 # endif
253 # endif
254 # endif
255
256 #endif
257
258 #if 1
259 # define ?ERWIN_64BIT
260
261
262 #else
263 # error "This is code is to be deleted."
264 # if defined(__LP64__) || defined(__alpha__) || defined(__ia64__) || defined(__ppc64__) || defined(__s390x__) || defined(__x86_64__)
265 # define ERWIN_64BIT 1
266 # else
267 # define ERWIN_64BIT 0
268 # endif
269 #endif
270
271 #define ?ERWIN_ARCH_FAST_MUL 1
272
273
274 #ifdef ERWIN_GNUC_V30X
275 # define ?ERWIN_EXPECT(X,Y) __builtin_expect(X,Y)
276 #endif
277
278 #define ?ERWIN_EXPECT(X,Y) (X)
279
280 #define ?ERWIN_LIKELY(X) ERWIN_EXPECT(!!(X), 1)
281
282
283
284
285
286
287
288
289
290
291
292 #define ?ERWIN_UNLIKELY(X) ERWIN_EXPECT(!!(X), 0)
293
294
295
296 #ifdef ERWIN_DOS
297
298 # include <limits.h>
299 # include <stdlib.h>
300
301
302 # ifdef ERWIN_MSVC
303
304 # ifndef ERWIN_NO_ASM
305 # ifdef _M_IX86
306 # define ERWIN_MSVC_I386_ASM
307 # endif
308 # endif
309
310 # ifdef Global_ERWIN_COMPILING
311 # include "--INCPREF2B--erwin/confmsvc.h"
312 # else
313 # include <--INCPREF2B--erwin/confmsvc.h>
314 # endif
315
316 # define ?Global_ERWIN_OPTIMISE 1
317 # define ?Global_ERWIN_OPTIMISE_SIZE 1
318
319 # endif
320
321
322 # ifdef ERWIN_WATCOM
323
324 # ifndef ERWIN_NO_ASM
325 # ifdef _M_IX86
326 # define ERWIN_WATCOM_I386_ASM
327 # endif
328 # endif
329
330 # ifdef Global_ERWIN_COMPILING
331 # include "--INCPREF2B--erwin/confwtcm.h"
332 # else
333 # include <--INCPREF2B--erwin/confwtcm.h>
334 # endif
335
336 # define ?Global_ERWIN_OPTIMISE 1
337 # define ?Global_ERWIN_OPTIMISE_SIZE 1
338
339 # endif
340
341
342 # ifdef ERWIN_CROSS
343 # ifdef Global_ERWIN_COMPILING
344 # include "--INCPREF2B--erwin/confdj.h"
345 # else
346 # include <--INCPREF2B--erwin/confdj.h>
347 # endif
348
349 # define ?Global_ERWIN_OPTIMISE 1
350 # define ?Global_ERWIN_OPTIMISE_SIZE 1
351
352 # endif
353
354 #else
355
356 #define ERWIN_UNIX 1
357
358
359 # ifdef Global_ERWIN_COMPILING
360 # include "--INCPREF2B--erwin/config.h"
361 # else
362 # include <--INCPREF2B--erwin/config.h>
363 # endif
364
365 # ifdef HAVE_LIMITS_H
366 # include <limits.h>
367 # endif
368
369 # ifdef HAVE_STDLIB_H
370 # include <stdlib.h>
371 # endif
372
373 #endif
374
375
376 #define ?ERWIN_PATH_SEP '/'
377 #define ?ERWIN_PATH_SEP_STR "/"
378 #define ?ERWIN_DIR_LIST_SEP ':'
379 #define ?ERWIN_DIR_LIST_SEP_STR ":"
380 #define ?ERWIN_GLOBAL_CONF_DIR "/etc"
381 #define ?ERWIN_GLOBAL_CONF_EXT ".conf"
382 #define ?ERWIN_LOCAL_CONF_PREFIX "."
383 #define ?ERWIN_LOCAL_CONF_EXT "rc"
384
385
386
387
388
389
390
391 #ifndef ERWIN_LONG_LONG
392 # ifdef SIZEOF_LONG_LONG
393 # if SIZEOF_LONG_LONG > 0
394
395 # define ERWIN_LONG_LONG long long
396
397 # define ERWIN_LL_AUX2(X) X ## LL
398 # define ERWIN_LL_AUX(X) ERWIN_LL_AUX2(X)
399 # define ERWIN_LL(X) ERWIN_LL_AUX(X)
400
401 # define ERWIN_ULL_AUX2(X) X ## ULL
402 # define ERWIN_ULL_AUX(X) ERWIN_ULL_AUX2(X)
403 # define ERWIN_ULL(X) ERWIN_ULL_AUX(X)
404
405 # define ERWIN_SIZEOF_LONG_LONG SIZEOF_LONG_LONG
406
407 # define ERWIN_LONG_LONG_V2 1
408 # endif
409 # endif
410 #endif
411
412 #define ERWIN_L_AUX2(X) X ## L
413 #define ERWIN_L_AUX(X) ERWIN_L_AUX2(X)
414 #define ERWIN_L(X) ERWIN_L_AUX(X)
415
416 #define ERWIN_UL_AUX2(X) X ## UL
417 #define ERWIN_UL_AUX(X) ERWIN_UL_AUX2(X)
418 #define ERWIN_UL(X) ERWIN_UL_AUX(X)
419
420 #define ERWIN_F_AUX2(X) X ## F
421 #define ERWIN_F_AUX(X) ERWIN_F_AUX2(X)
422 #define ERWIN_F(X) ERWIN_F_AUX(X)
423
424
425
426 #if !defined(ERWIN_LONG_LONG) && defined(SIZEOF_UINT64_T) && defined(SIZEOF_INT64_T) && defined(__INT64_C) && defined(__UINT64_C)
427 # ifdef HAVE_STDINT_H
428 # define __STDC_CONSTANT_MACROS 1
429 # include <inttypes.h>
430
431
432
433
434
435
436 # endif
437 # define ERWIN_LONG_LONG int64_t
438 # define ERWIN_UNSIGNED_LONG_LONG uint64_t
439 # define ERWIN_LL_AUX(X) INT64_C(X)
440 # define ERWIN_LL(X) ERWIN_LL_AUX(X)
441 # define ERWIN_ULL_AUX(X) UINT64_C(X)
442 # define ERWIN_ULL(X) ERWIN_ULL_AUX(X)
443 # define ERWIN_SIZEOF_LONG_LONG SIZEOF_INT64_T
444 # define ERWIN_LONG_LONG_V2 1
445 #endif
446
447
448 # define ?ERWIN_UNSIGNED_LONG_LONG unsigned ??ERWIN_LONG_LONG
449
450
451
452 #if !defined(ERWIN_LONG_LONG_V2) && !defined(ERWIN_SIZEOF_LONG_LONG)
453 # ifdef __GNUC__
454 # warning "There is an old Erwin header file somewhere included before. Trying to repair."
455 # endif
456 # define ERWIN_SIZEOF_LONG_LONG SIZEOF_LONG_LONG
457 # define ERWIN_LONG_LONG_V2 1
458 #endif
459
460
461 #if SIZEOF_LONG_DOUBLE > 0
462 # define ?ERWIN_LONG_DOUBLE long double
463 #endif
464
465
466
467 #if defined(__STRICT_ANSI__) || !defined(CONFIG_WITH_LONG_LONG)
468 # undef ERWIN_LONG_LONG
469 # undef ERWIN_UNSIGNED_LONG_LONG
470 # undef ERWIN_LONG_DOUBLE
471 #endif
472
473
474 #define ?ERWIN_SIGNED_LONG_LONG ??ERWIN_LONG_LONG
475
476
477
478
479
480
481
482
483
484
485
486
487
488 #if defined(ERWIN_S32) && !defined(ERWIN_S32_C)
489 # ifdef __GNUC__
490 # warning "There is an old Erwin header file somewhere included before. Trying to repair."
491 # endif
492 # undef ERWIN_S8
493 # undef ERWIN_U8
494 # undef ERWIN_S16
495 # undef ERWIN_U16
496 # undef ERWIN_S32
497 # undef ERWIN_U32
498 # undef ERWIN_S64
499 # undef ERWIN_U64
500 #endif
501
502 #if 0
503 #if defined(ERWIN_S32) && !defined(ERWIN_UNSIGNED_SHORT)
504 # ifdef __GNUC__
505 # warning "There is an old Erwin header file somewhere included before. Trying to repair."
506 # endif
507 # undef ERWIN_S8
508 # undef ERWIN_U8
509 # undef ERWIN_S16
510 # undef ERWIN_U16
511 # undef ERWIN_S32
512 # undef ERWIN_U32
513 # undef ERWIN_S64
514 # undef ERWIN_U64
515 #endif
516 #endif
517
518 #ifndef ERWIN_S32
519
520
521 typedef unsigned char ERWIN_UNSIGNED_CHAR;
522 typedef signed char ERWIN_SIGNED_CHAR;
523 typedef unsigned short ERWIN_UNSIGNED_SHORT;
524 typedef unsigned long ERWIN_UNSIGNED_LONG;
525 #endif
526
527 #ifndef ERWIN_S64
528 #if defined(ERWIN_SIZEOF_LONG_LONG) && ERWIN_SIZEOF_LONG_LONG == 8 && defined(ERWIN_LONG_LONG)
529 # define ERWIN_S64 ERWIN_LONG_LONG
530 # define ERWIN_U64 ERWIN_UNSIGNED_LONG_LONG
531 # define ERWIN_S64_C ERWIN_LL
532 # define ERWIN_U64_C ERWIN_ULL
533 # define ?ERWIN_S64_TYPE_INFO ERWIN_LONG_LONG_TYPE_INFO
534 # define ?ERWIN_U64_TYPE_INFO ERWIN_UNSIGNED_LONG_LONG_TYPE_INFO
535 # define ?Global_ERWIN_S64_CMP Global_ERWIN_LONG_LONG_CMP
536 # define ?Global_ERWIN_U64_CMP Global_ERWIN_UNSIGNED_LONG_LONG_CMP
537 # define ?Global_ERWIN_S64_HASH Global_ERWIN_LONG_LONG_HASH
538 # define ?Global_ERWIN_U64_HASH Global_ERWIN_UNSIGNED_LONG_LONG_HASH
539 #elif SIZEOF_INT == 8
540 # define ERWIN_S64 int
541 # define ERWIN_U64 unsigned
542 # define ERWIN_S64_C(X) X
543 # define ERWIN_U64_C(X) X
544 # define ?ERWIN_S64_TYPE_INFO int_TYPE_INFO
545 # define ?ERWIN_U64_TYPE_INFO unsigned_TYPE_INFO
546 # define ?Global_ERWIN_S64_CMP Global_INT_CMP
547 # define ?Global_ERWIN_U64_CMP Global_UNSIGNED_CMP
548 # define ?Global_ERWIN_S64_HASH Global_INT_HASH
549 # define ?Global_ERWIN_U64_HASH Global_UNSIGNED_HASH
550 #elif SIZEOF_LONG == 8
551 # define ERWIN_S64 long
552 # define ERWIN_U64 ERWIN_UNSIGNED_LONG
553 # define ERWIN_S64_C ERWIN_L
554 # define ERWIN_U64_C ERWIN_UL
555 # define ?ERWIN_S64_TYPE_INFO long_TYPE_INFO
556 # define ?ERWIN_U64_TYPE_INFO unsigned_long_TYPE_INFO
557 # define ?Global_ERWIN_S64_CMP Global_LONG_CMP
558 # define ?Global_ERWIN_U64_CMP Global_UNSIGNED_LONG_CMP
559 # define ?Global_ERWIN_S64_HASH Global_LONG_HASH
560 # define ?Global_ERWIN_U64_HASH Global_UNSIGNED_LONG_HASH
561 #elif SIZEOF_LONG_LONG == 8 && defined(ERWIN_LONG_LONG)
562 # define ERWIN_S64 ERWIN_LONG_LONG
563 # define ERWIN_U64 ERWIN_UNSIGNED_LONG_LONG
564 # define ERWIN_S64_C ERWIN_LL
565 # define ERWIN_U64_C ERWIN_ULL
566 # define ?ERWIN_S64_TYPE_INFO long_long_TYPE_INFO
567 # define ?ERWIN_U64_TYPE_INFO unsigned_long_long_TYPE_INFO
568 # define ?Global_ERWIN_S64_CMP Global_LONG_LONG_CMP
569 # define ?Global_ERWIN_U64_CMP Global_UNSIGNED_LONG_LONG_CMP
570 # define ?Global_ERWIN_S64_HASH Global_LONG_LONG_HASH
571 # define ?Global_ERWIN_U64_HASH Global_UNSIGNED_LONG_LONG_HASH
572 #endif
573 #endif
574
575 #ifndef ERWIN_S32
576 #if SIZEOF_INT == 4
577 # define ERWIN_S32 int
578 # define ERWIN_U32 unsigned
579 # define ERWIN_S32_C(X) X
580 # define ERWIN_U32_C(X) X
581 # define ?ERWIN_S32_TYPE_INFO int_TYPE_INFO
582 # define ?ERWIN_U32_TYPE_INFO unsigned_TYPE_INFO
583 # define ?Global_ERWIN_S32_CMP Global_INT_CMP
584 # define ?Global_ERWIN_U32_CMP Global_UNSIGNED_CMP
585 # define ?Global_ERWIN_S32_HASH Global_INT_HASH
586 # define ?Global_ERWIN_U32_HASH Global_UNSIGNED_HASH
587 #elif SIZEOF_LONG == 4
588 # define ERWIN_S32 long
589 # define ERWIN_U32 ERWIN_UNSIGNED_LONG
590 # define ERWIN_S32_C ERWIN_L
591 # define ERWIN_U32_C ERWIN_UL
592 # define ?ERWIN_S32_TYPE_INFO long_TYPE_INFO
593 # define ?ERWIN_U32_TYPE_INFO unsigned_long_TYPE_INFO
594 # define ?Global_ERWIN_S32_CMP Global_LONG_CMP
595 # define ?Global_ERWIN_U32_CMP Global_UNSIGNED_LONG_CMP
596 # define ?Global_ERWIN_S32_HASH Global_LONG_HASH
597 # define ?Global_ERWIN_U32_HASH Global_UNSIGNED_LONG_HASH
598 #endif
599 #endif
600
601 #ifndef ERWIN_S16
602 #if SIZEOF_SHORT == 2
603 # define ERWIN_S16 short
604 # define ERWIN_U16 ERWIN_UNSIGNED_SHORT
605 # define ?ERWIN_S16_TYPE_INFO short_TYPE_INFO
606 # define ?ERWIN_U16_TYPE_INFO unsigned_short_TYPE_INFO
607 # define ?Global_ERWIN_S16_CMP Global_SHORT_CMP
608 # define ?Global_ERWIN_U16_CMP Global_UNSIGNED_SHORT_CMP
609 # define ?Global_ERWIN_S16_HASH Global_SHORT_HASH
610 # define ?Global_ERWIN_U16_HASH Global_UNSIGNED_SHORT_HASH
611 #elif SIZEOF_INT == 2
612 # define ERWIN_S16 int
613 # define ERWIN_U16 unsigned
614 # define ?ERWIN_S16_TYPE_INFO int_TYPE_INFO
615 # define ?ERWIN_U16_TYPE_INFO unsigned_int_TYPE_INFO
616 # define ?Global_ERWIN_S16_CMP Global_INT_CMP
617 # define ?Global_ERWIN_U16_CMP Global_UNSIGNED_CMP
618 # define ?Global_ERWIN_S16_HASH Global_INT_HASH
619 # define ?Global_ERWIN_U16_HASH Global_UNSIGNED_HASH
620 #endif
621 #endif
622
623 #ifndef ERWIN_S8
624 #define ERWIN_S8 ERWIN_SIGNED_CHAR
625 #define ERWIN_U8 ERWIN_UNSIGNED_CHAR
626 #define ?ERWIN_S8_TYPE_INFO signed_char_TYPE_INFO
627 #define ?ERWIN_U8_TYPE_INFO unsigned_char_TYPE_INFO
628 #define ?Global_ERWIN_S8_CMP Global_SIGNED_CHAR_CMP
629 #define ?Global_ERWIN_U8_CMP Global_UNSIGNED_CHAR_CMP
630 #define ?Global_ERWIN_S8_HASH Global_SIGNED_CHAR_HASH
631 #define ?Global_ERWIN_U8_HASH Global_UNSIGNED_CHAR_HASH
632 #endif
633
634
635 #if SIZEOF_VOIDP <= SIZEOF_INT
636 # define ERWIN_PTRINT unsigned
637 # define ?ERWIN_PTRINT_TYPE_INFO unsigned_TYPE_INFO
638 # define ?Global_PTRINT_CMP Global_UNSIGNED_CMP
639 # define ?Global_PTRINT_EQUAL Global_UNSIGNED_EQUAL
640 # define ?Global_PTRINT_HASH Global_UNSIGNED_HASH
641 #elif SIZEOF_VOIDP <= SIZEOF_LONG
642 # define ERWIN_PTRINT ERWIN_UNSIGNED_LONG
643 # define ?ERWIN_PTRINT_TYPE_INFO unsigned_long_TYPE_INFO
644 # define ?Global_PTRINT_CMP Global_UNSIGNED_LONG_CMP
645 # define ?Global_PTRINT_EQUAL Global_UNSIGNED_LONG_EQUAL
646 # define ?Global_PTRINT_HASH Global_UNSIGNED_LONG_HASH
647 #elif defined(ERWIN_UNSIGNED_LONG_LONG) && SIZEOF_VOIDP <= ERWIN_SIZEOF_LONG_LONG
648 # define ERWIN_PTRINT ERWIN_UNSIGNED_LONG_LONG
649 # define ?ERWIN_PTRINT_TYPE_INFO unsigned_long_long_TYPE_INFO
650 # define ?Global_PTRINT_CMP Global_UNSIGNED_LONG_LONG_CMP
651 # define ?Global_PTRINT_EQUAL Global_UNSIGNED_LONG_LONG_EQUAL
652 # define ?Global_PTRINT_HASH Global_UNSIGNED_LONG_LONG_HASH
653 #else
654 # error "Unable to define ERWIN_PTRINT: sizeof(void*) is larger than any known integer type"
655 #endif
656
657
658 #define ?ERWIN_UB1 ERWIN_U8
659 #define ?ERWIN_UB2 ERWIN_U16
660 #define ?ERWIN_UB4 ERWIN_U32
661 #define ?ERWIN_UB8 ??ERWIN_U64
662 #define ?ERWIN_SB1 ERWIN_S8
663 #define ?ERWIN_SB2 ERWIN_S16
664 #define ?ERWIN_SB4 ERWIN_S32
665 #define ?ERWIN_SB8 ??ERWIN_S64
666
667 #ifndef ERWIN_WCHAR_T
668 # if SIZEOF_WCHAR_T > 0
669 # define ERWIN_WCHAR_T wchar_t
670 # elif SIZEOF__WCHAR_T > 0
671 # define ERWIN_WCHAR_T _wchar_t
672 # elif SIZEOF___WCHAR_T > 0
673 # define ERWIN_WCHAR_T __wchar_t
674 # elif SIZEOF_INT >= 32
675 # define ERWIN_WCHAR_T int
676 # elif SIZEOF_LONG >= 32
677 # define ERWIN_WCHAR_T long
678 # endif
679 #endif
680
681 #ifndef ERWIN_WINT_T
682 # if SIZEOF_WINT_T > 0
683 # define ERWIN_WINT_T wint_t
684 # elif SIZEOF__WINT_T > 0
685 # define ERWIN_WINT_T _wint_t
686 # elif SIZEOF___WINT_T > 0
687 # define ERWIN_WINT_T __wint_t
688 # elif SIZEOF_INT >= 32
689 # define ERWIN_WINT_T int
690 # elif SIZEOF_LONG >= 32
691 # define ERWIN_WINT_T long
692 # endif
693 #endif
694
695 #if defined(ERWIN_WCHAR_T) && defined(ERWIN_WINT_T) && defined(HAVE_WCRTOMB) && HAVE_WCRTOMB && defined(MB_CUR_MAX)
696 # define ?ERWIN_WIDE_CHARACTERS 1
697 #endif
698
699
700
701 #if defined(CHAR_BIT)
702 # define ERWIN_CHAR_BIT CHAR_BIT
703 #elif defined(CHARBITS)
704 # define ERWIN_CHAR_BIT CHARBITS
705 #elif defined(BITSPERBYTE)
706 # define ERWIN_CHAR_BIT BITSPERBYTE
707 #else
708 # define ERWIN_CHAR_BIT 8
709 #endif
710
711 #define ERWIN_BIT_SIZEOF(X) (sizeof(X) * ERWIN_CHAR_BIT)
712
713
714 #if ERWIN_CHAR_BIT != 8
715 # error "We currently do not support CHAR_BIT != 8."
716 #endif
717
718
719 #if defined(__cplusplus) && defined(HAVE_WORKING_EXPLICIT)
720 # define Global_ERWIN_EXPLICIT explicit
721 # define Global_ERWIN_USE_EXPLICIT 1
722 #else
723 # define Global_ERWIN_EXPLICIT
724 # define Global_ERWIN_USE_EXPLICIT 0
725 #endif
726
727
728 #if defined(__cplusplus) && defined(HAVE_WORKING_MUTABLE)
729 # define Global_ERWIN_MUTABLE mutable
730 # define Global_ERWIN_USE_MUTABLE 1
731 #else
732 # define Global_ERWIN_MUTABLE
733 # define Global_ERWIN_USE_MUTABLE 0
734 #endif
735
736
737
738 #ifndef GNUC_ATTRIBUTE
739 # if defined(ERWIN_GNUC_V27X) && !defined(ERWIN_NO_CC_EXTENSIONS)
740 # define GNUC_ATTRIBUTE(X) __attribute__(X)
741
742
743
744
745
746
747
748
749
750 # else
751 # define GNUC_ATTRIBUTE(X)
752 # endif
753 #endif
754
755 #ifdef ERWIN_GNUC_V30X
756 # define ?GNUC_ATTRIBUTE_V30(X) GNUC_ATTRIBUTE(X)
757 #endif
758 #define ?GNUC_ATTRIBUTE_V30(X)
759
760 #ifdef ERWIN_GNUC_V31X
761 # define ?GNUC_ATTRIBUTE_V31(X) GNUC_ATTRIBUTE(X)
762 #endif
763 #define ?GNUC_ATTRIBUTE_V31(X)
764
765 #ifdef ERWIN_GNUC_V32X
766 # define ?GNUC_ATTRIBUTE_V32(X) GNUC_ATTRIBUTE(X)
767 #endif
768 #define ?GNUC_ATTRIBUTE_V32(X)
769
770 #ifdef ERWIN_GNUC_V33X
771 # define ?GNUC_ATTRIBUTE_V33(X) GNUC_ATTRIBUTE(X)
772 #endif
773 #define ?GNUC_ATTRIBUTE_V33(X)
774
775 #ifdef ERWIN_GNUC_V34X
776 # define ?GNUC_ATTRIBUTE_V34(X) GNUC_ATTRIBUTE(X)
777 #endif
778 #define ?GNUC_ATTRIBUTE_V34(X)
779
780 #ifdef ERWIN_GNUC_V40X
781 # define ?GNUC_ATTRIBUTE_V40(X) GNUC_ATTRIBUTE(X)
782 #endif
783 #define ?GNUC_ATTRIBUTE_V40(X)
784
785 #ifdef ERWIN_GNUC_V41X
786 # define ?GNUC_ATTRIBUTE_V41(X) GNUC_ATTRIBUTE(X)
787 #endif
788 #define ?GNUC_ATTRIBUTE_V41(X)
789
790 #ifdef ERWIN_GNUC_V42X
791 # define ?GNUC_ATTRIBUTE_V42(X) GNUC_ATTRIBUTE(X)
792 #endif
793 #define ?GNUC_ATTRIBUTE_V42(X)
794
795 #ifdef ERWIN_GNUC_V43X
796 # define ?GNUC_ATTRIBUTE_V43(X) GNUC_ATTRIBUTE(X)
797 #endif
798 #define ?GNUC_ATTRIBUTE_V43(X)
799
800 #if defined(__linux__) && (defined(__i386__) || defined (__x86_64__))
801 # define ?GNUC_ATTRIBUTE_V34_X86_LINUX(X) GNUC_ATTRIBUTE_V34(X)
802 #endif
803 #define ?GNUC_ATTRIBUTE_V34_X86_LINUX(X)
804
805 #define ?ATTR_ALWAYS_INLINE GNUC_ATTRIBUTE_V31((__always_inline__))
806 #define ?ATTR_CONST GNUC_ATTRIBUTE((__const__))
807 #define ?ATTR_DEPRECATED GNUC_ATTRIBUTE_V31((__deprecated__))
808 #define ?ATTR_FLATTEN GNUC_ATTRIBUTE_V41((__flatten__))
809 #define ?ATTR_FORMAT(A) GNUC_ATTRIBUTE((__format__ A))
810 #define ?ATTR_FORMAT_PRINTF(A,B) GNUC_ATTRIBUTE((__format__(__printf__,A,B)))
811 #define ?ATTR_FORMAT_VPRINTF(A) GNUC_ATTRIBUTE((__format__(__printf__,A,0)))
812 #define ?ATTR_MALLOC GNUC_ATTRIBUTE_V30((__malloc__))
813 #define ?ATTR_MAY_ALIAS GNUC_ATTRIBUTE_V33((__may_alias__))
814 #define ?ATTR_NOINLINE GNUC_ATTRIBUTE_V31((__noinline__))
815 #define ?ATTR_NONNULL(A) GNUC_ATTRIBUTE_V33((__nonnull__ A))
816 #define ?ATTR_NORETURN GNUC_ATTRIBUTE((__noreturn__))
817 #define ?ATTR_PURE GNUC_ATTRIBUTE_V30((__pure__))
818 #define ?ATTR_SECTION(X) GNUC_ATTRIBUTE_V34_X86_LINUX((__section__(X)))
819 #define ?ATTR_UNUSED GNUC_ATTRIBUTE_V30((__unused__))
820 #define ?ATTR_FUNC_UNUSED GNUC_ATTRIBUTE_V30((__unused__))
821 #define ?ATTR_TYPE_UNUSED GNUC_ATTRIBUTE_V30((__unused__))
822 #define ?ATTR_VARIABLE_UNUSED GNUC_ATTRIBUTE((__unused__))
823 #define ?ATTR_USED GNUC_ATTRIBUTE_V31((__used__))
824 #define ?ATTR_WARN_UNUSED_RESULT GNUC_ATTRIBUTE_V33((__warn_unused_result__))
825 #define ?ATTR_WEAK GNUC_ATTRIBUTE((__weak__))
826
827
828
829 #define ?ATTR_ERRNO_PURE
830
831
832
833
834
835
836 #if defined(HAVE_STRERROR_R)
837 # define ?ERWIN_GET_STRERRNO(S,N) ((void)(strerror_r(errno,S,N)))
838 #endif
839
840 #ifndef Global_ERWIN_THREAD_SAFE
841 # if defined ERWIN_MSVC || defined ERWIN_WATCOM
842 # define ?ERWIN_STRERRNO (_strerror(NULL))
843 # else
844 # define ?ERWIN_STRERRNO (strerror(errno))
845 # endif
846 #endif
847
848 #ifdef HAVE_STRNCPY
849 # define ?ERWIN_GET_STRERRNO(S,N) ((void)strncpy(S,??ERWIN_STRERRNO,N))
850 #endif
851
852
853 #ifndef ERWIN_INLINE
854 # if defined(__cplusplus)
855 # define ERWIN_INLINE inline
856 # elif defined(ERWIN_GNUC_V27X) && !defined(ERWIN_NO_CC_EXTENSIONS)
857 # define ERWIN_INLINE __inline__
858 # elif defined(ERWIN_GNUC_V27X) && defined(__STRICT_ANSI__)
859 # define ERWIN_INLINE __inline__
860 # elif defined(ERWIN_MSVC) && !defined(ERWIN_NO_CC_EXTENSIONS)
861 # define ERWIN_INLINE _inline
862 # elif defined(ERWIN_WATCOM) && !defined(ERWIN_NO_CC_EXTENSIONS)
863 # define ERWIN_INLINE _inline
864 # else
865 # define ERWIN_INLINE inline
866
867
868
869 # endif
870 #endif
871
872
873
874
875
876 #ifndef ERWIN_BEGIN_GROUP
877 # define ERWIN_BEGIN_GROUP do{
878 # define ERWIN_END_GROUP }while(0)
879 #endif
880
881
882 #ifdef PATH_MAX
883 # define ?ERWIN_PATH_MAX PATH_MAX
884 #else
885 # define ?ERWIN_PATH_MAX 256
886 #endif
887
888
889
890
891
892
893
894
895
896
897 #if defined(_REENTRANT) || defined(_THREAD_SAFE)
898 # define ?Global_ERWIN_THREAD_SAFE 1
899 #endif
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955 #ifndef HAVE_THREAD_KEYWORD
956 # define !Global_ERWIN_USE_THREAD_KEYWORD 0
957 #endif
958
959 #if defined(Global_ERWIN_USE_PTHREAD) && Global_ERWIN_USE_PTHREAD
960 # define ?Global_ERWIN_USE_THREAD_KEYWORD 0
961 #endif
962
963 #if defined(HAVE_THREAD_KEYWORD) && defined(Global_ERWIN_THREAD_SAFE)
964 # define ?Global_ERWIN_USE_THREAD_KEYWORD 1
965 #endif
966
967 #define ?Global_ERWIN_USE_THREAD_KEYWORD 0
968
969
970
971 #ifdef HAVE_THREAD_KEYWORD
972 # define ?ERWIN_THREAD_KEYWORD __thread
973 #else
974 # define ?ERWIN_THREAD_KEYWORD
975 #endif
976
977
978 #if Global_ERWIN_USE_THREAD_KEYWORD
979 # define ?Global_ERWIN_THREAD_LOCAL ERWIN_THREAD_KEYWORD
980 #else
981 # define ?Global_ERWIN_THREAD_LOCAL
982 #endif
983
984
985
986
987
988
989
990
991 #if defined(__APPLE__) && defined(__MACH__)
992 # define ?Global_ERWIN_USE_PTHREAD 1
993 #endif
994
995 #define ?Global_ERWIN_USE_PTHREAD 0
996
997
998
999
1000 #ifdef Global_ERWIN_THREAD_SAFE
1001 # ifdef Global_ERWIN_COMPILING
1002 # if Global_ERWIN_USE_PTHREAD && !Global_ERWIN_USE_THREAD_KEYWORD
1003 # include <pthread.h>
1004 # endif
1005 # endif
1006
1007 #endif
1008
1009
1010
1011
1012
1013
1014
1015
1016 #if !defined(Global_ERWIN_THREAD_SAFE) || Global_ERWIN_USE_THREAD_KEYWORD || Global_ERWIN_USE_PTHREAD
1017 # define Global_ERWIN_GLOBAL_ERRNO 1
1018 #else
1019 # define Global_ERWIN_GLOBAL_ERRNO 0
1020 #endif
1021
1022
1023 #ifdef Global_ERWIN_COMPAT_2_0_249
1024 #define Global_ERWIN_CPP_ONLY 0
1025 #define BOOL Global_ERWIN_BOOL
1026 #define TRUE Global_ERWIN_TRUE
1027 #define FALSE Global_ERWIN_FALSE
1028 #else
1029 #define Global_ERWIN_CPP_ONLY --CPP-ONLY--
1030 #endif
1031
1032 #if !defined(Global_BOOL_DEFINED) && !defined(Global_ERWIN_BOOL)
1033
1034 # define Global_BOOL_DEFINED
1035
1036 # if Global_ERWIN_CPP_ONLY
1037
1038 # ifndef __cplusplus
1039 # error "Please invoke 'untemplatize --init --cpp-lib=0' if you want to compile this with a non-C++ compiler."
1040 # endif
1041
1042
1043 typedef bool Global_ERWIN_BOOL_;
1044 # define Global_ERWIN_BOOL Global_ERWIN_BOOL_
1045 # define Global_ERWIN_FALSE false
1046 # define Global_ERWIN_TRUE true
1047
1048 # else
1049
1050
1051
1052
1053 typedef unsigned char Global_erwin_bool_t;
1054 # define Global_ERWIN_BOOL Global_erwin_bool_t
1055 # define Global_ERWIN_FALSE 0
1056 # define Global_ERWIN_TRUE 1
1057
1058 # endif
1059
1060 #endif
1061
1062 #ifndef Global_ERWIN_TO_BOOL
1063 # ifdef __cplusplus
1064 # define Global_ERWIN_TO_BOOL(X) ((X) ? true : false)
1065 # else
1066 # define Global_ERWIN_TO_BOOL(X) ((X) ? Global_ERWIN_TRUE : Global_ERWIN_FALSE)
1067 # endif
1068 #endif
1069
1070 #ifdef Global_ERWIN_WEAK_DETERMINISM
1071 # define Global_ERWIN_REQUIRE_DETERMINISM 1
1072 #endif
1073
1074 #if defined(Global_ERWIN_REQUIRE_DETERMINISM) || !defined(HAVE_RAND)
1075 # define Global_ERWIN_RANDOM_FUNC Global_erwin_det_random
1076 # define Global_ERWIN_RAND_MAX 0xffffffffUL
1077 # define Global_ERWIN_NEED_DET_RANDOM 1
1078 #else
1079 # define Global_ERWIN_RANDOM_FUNC rand
1080 # define Global_ERWIN_RAND_MAX ??RAND_MAX
1081 #endif
1082
1083 #define ?Global_ERWIN_RANDOM(N) \
1084 ((unsigned long)Global_erwin_hash_into(Global_ERWIN_RANDOM_FUNC(),N))
1085
1086 #if defined(ERWIN_GNUC_V27X) && !defined(ERWIN_NO_CC_EXTENSIONS)
1087
1088 # define ?ERWIN_SUPERFLUOUS_CAST(X,Y) (Y)
1089
1090 # if defined(__OPTIMIZE_SIZE__)
1091 # define ?Global_ERWIN_OPTIMISE_SIZE 1
1092 # endif
1093
1094 # if defined(__OPTIMIZE__)
1095
1096 # define ?Global_ERWIN_OPTIMISE 1
1097
1098
1099 # define ?ERWIN_EXTERN_INLINE extern ERWIN_INLINE
1100
1101
1102 # if !defined(ERWIN_GNUC_I386_ASM) && !defined(ERWIN_NO_ASM)
1103 # if defined (ERWIN_GNUC_I386_ASM_OLD) || defined (ERWIN_GNUC_I386_ASM_NEW)
1104 # define ERWIN_GNUC_I386_ASM 1
1105 # endif
1106 # endif
1107
1108
1109
1110 # if !defined(ERWIN_GNUC_PPC_ASM) && !defined(ERWIN_NO_ASM)
1111 # if defined (ERWIN_GNUC_PPC_ASM_NEW) && !defined(__STRICT_ANSI__)
1112 # define ERWIN_GNUC_PPC_ASM 1
1113 # endif
1114 # endif
1115
1116
1117 # if !defined(ERWIN_GNUC_X86_64_ASM) && !defined(ERWIN_NO_ASM)
1118 # if defined (ERWIN_GNUC_X86_64_ASM_NEW)
1119 # define ERWIN_GNUC_X86_64_ASM 1
1120 # endif
1121 # endif
1122
1123 # endif
1124
1125 #else
1126
1127 # define ?ERWIN_SUPERFLUOUS_CAST(X,Y) ((X)(Y))
1128
1129
1130
1131
1132 #endif
1133
1134 #ifdef ERWIN_EXTERN_INLINE
1135 # define ?ERWIN_WRAPPER ERWIN_EXTERN_INLINE
1136 #else
1137 # define ?ERWIN_WRAPPER ERWIN_STATIC_INLINE
1138 #endif
1139
1140
1141 #define ?ERWIN_CONCAT_TOKEN_AUX2(A,B) A ## B
1142 #define ?ERWIN_CONCAT_TOKEN_AUX(A,B) ERWIN_CONCAT_TOKEN_AUX2(A,B)
1143 #define ?ERWIN_CONCAT_TOKEN(A,B) ERWIN_CONCAT_TOKEN_AUX(A,B)
1144
1145 #define ?ERWIN_STR_AUX2(X) #X
1146 #define ?ERWIN_STR_AUX(X) ERWIN_STR_AUX2(X)
1147 #define ?ERWIN_STR(X) ERWIN_STR_AUX(X)
1148
1149 #define ?ERWIN_GENSYM(A) ERWIN_CONCAT_TOKEN(A,__LINE__)
1150
1151 #define ?ERWIN_CONCAT(A,B) ERWIN_CONCAT_TOKEN(A,B)
1152
1153
1154
1155 #define ?ERWIN_GOLDEN_RATIO 0.6180339887498948482045868343656381177203
1156
1157
1158 #define ?ERWIN_GOLDEN_RATIO_SHL_32_RAW 2654435769
1159 #define ?ERWIN_GOLDEN_RATIO_SHL_32_INT_RAW -1640531527
1160 #define ?ERWIN_GOLDEN_RATIO_SHL_32 ERWIN_UL(ERWIN_GOLDEN_RATIO_SHL_32_RAW)
1161 #define ?ERWIN_GOLDEN_RATIO_SHL_32_INT ERWIN_L(ERWIN_GOLDEN_RATIO_SHL_32_INT_RAW)
1162
1163
1164
1165 #define ?ERWIN_GOLDEN_RATIO_SHL_64_RAW 11400714819323198485
1166 #define ?ERWIN_GOLDEN_RATIO_SHL_64_INT_RAW -7046029254386353131
1167 #define ?ERWIN_GOLDEN_RATIO_SHL_64 ERWIN_ULL(ERWIN_GOLDEN_RATIO_SHL_64_RAW)
1168 #define ?ERWIN_GOLDEN_RATIO_SHL_64_INT ERWIN_ULL(ERWIN_GOLDEN_RATIO_SHL_64_INT_RAW)
1169
1170
1171
1172 #define ?ERWIN_GOLDEN_RATIO_APPROX 0.61803398863412439823150634765625
1173
1174
1175 #define ?ERWIN_GOLDEN_RATIO_APPROX_64 0.6180339887498948481529999210426495892534
1176
1177
1178
1179
1180 #define ?ERWIN_EPSILON 1e-8
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206 #define ?Global_ERWIN_HASH_STRENGTH 2
1207
1208
1209
1210
1211 #define ERWIN_THE_BOOL_VALUE_ 1
1212 #define ERWIN_THE_BOOL_VALUE_0 0
1213 #define ERWIN_THE_BOOL_VALUE_1 1
1214 #define ERWIN_THE_BOOL_VALUE_no 0
1215 #define ERWIN_THE_BOOL_VALUE_yes 1
1216 #define ERWIN_THE_BOOL_VALUE_false 0
1217 #define ERWIN_THE_BOOL_VALUE_true 1
1218 #define ERWIN_THE_BOOL_VALUE_NO 0
1219 #define ERWIN_THE_BOOL_VALUE_YES 1
1220 #define ERWIN_THE_BOOL_VALUE_FALSE 0
1221 #define ERWIN_THE_BOOL_VALUE_TRUE 1
1222
1223 #ifndef NDEBUG
1224 # define ERWIN_THE_BOOL_VALUE_NDEBUG 0
1225 # define ERWIN_THE_BOOL_VALUE_DEBUG 1
1226 #else
1227 # define ERWIN_THE_BOOL_VALUE_NDEBUG 1
1228 # define ERWIN_THE_BOOL_VALUE_DEBUG 0
1229 #endif
1230
1231 #ifdef RELEASE
1232 # define ERWIN_THE_BOOL_VALUE_NRELEASE 0
1233 # define ERWIN_THE_BOOL_VALUE_RELEASE 1
1234 #else
1235 # define ERWIN_THE_BOOL_VALUE_NRELEASE 1
1236 # define ERWIN_THE_BOOL_VALUE_RELEASE 0
1237 #endif
1238
1239 #ifndef ERWIN_BOOL_VALUE
1240 # define ERWIN_BOOL_VALUE_AUX2(X) ERWIN_THE_BOOL_VALUE_##X
1241 # define ERWIN_BOOL_VALUE_AUX(X) ERWIN_BOOL_VALUE_AUX2(X)
1242 # define ERWIN_BOOL_VALUE(X) ERWIN_BOOL_VALUE_AUX(X)
1243 #endif
1244
1245
1246 #define ?Global_ERWIN_OPTIMISE 0
1247 #define ?Global_ERWIN_OPTIMISE_SIZE 0
1248
1249 #define ?ERWIN_STATIC_INLINE static ERWIN_INLINE
1250
1251 #if Global_ERWIN_OPTIMISE_SIZE
1252 # define ?ERWIN_STATIC_INLINE_SPEED static
1253 #else
1254 # define ?ERWIN_STATIC_INLINE_SPEED ERWIN_STATIC_INLINE
1255 #endif
1256
1257
1258
1259
1260 #define ?ERWIN_STATIC_INLINE_ONCE ERWIN_STATIC_INLINE
1261
1262
1263
1264
1265
1266
1267
1268 #define ?ERWIN_FLOAT_VOLATILE volatile
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280 #define ?Global_ERWIN_TMUL_OR_NULL(TYPE,COUNT,EXPR) \
1281 (ERWIN_LIKELY(Global_erwin_mul_ok(COUNT,sizeof(TYPE))) ? ((TYPE*)(EXPR)) : ((TYPE*)NULL))
1282
1283 #ifndef Global_ERWIN_TMALLOC
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317 #define ?Global_ERWIN_DEFAULT_NEW_DELETE 1
1318
1319
1320
1321
1322
1323
1324
1325 # define Global_ERWIN_TMALLOC(TYPE,SIZE) (TYPE*)(malloc (SIZE))
1326 # define Global_ERWIN_TCALLOC(TYPE,SIZE) (TYPE*)(calloc (1, SIZE))
1327 # define Global_ERWIN_TFREE(PTR,TYPE,SIZE) free(PTR)
1328
1329
1330
1331
1332
1333
1334
1335 # define Global_ERWIN_TMALLOC_ARRAY(TYPE,COUNT) \
1336 Global_ERWIN_TMUL_OR_NULL (TYPE, COUNT, malloc (COUNT * sizeof(TYPE)))
1337
1338
1339
1340 # define Global_ERWIN_TCALLOC_ARRAY(TYPE,COUNT) \
1341 Global_ERWIN_TMUL_OR_NULL (TYPE, COUNT, calloc (COUNT, sizeof(TYPE)))
1342
1343 # define Global_ERWIN_TREALLOC_ARRAY(PTR,TYPE,NEWCOUNT,OLDCOUNT) \
1344 Global_ERWIN_TMUL_OR_NULL (TYPE, NEWCOUNT, realloc(PTR,NEWCOUNT * sizeof(TYPE)))
1345
1346 # undef Global_ERWIN_TCREALLOC_ARRAY
1347
1348
1349 # define Global_ERWIN_TFREE_ARRAY(PTR) free(PTR)
1350
1351
1352
1353
1354
1355
1356
1357
1358 # define Global_ERWIN_TNEW(TYPE,SIZE) (TYPE*)(::operator new(SIZE))
1359 # undef Global_ERWIN_TCNEW
1360 # define Global_ERWIN_TDELETE(PTR,TYPE,SIZE) ::operator delete(PTR)
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372 # define Global_ERWIN_TNEW_ARRAY(TYPE,COUNT) new TYPE[COUNT]
1373 # undef Global_ERWIN_TCNEW_ARRAY
1374
1375 # undef Global_ERWIN_TRENEW_ARRAY
1376 # undef Global_ERWIN_TCRENEW_ARRAY
1377
1378
1379
1380
1381 # define Global_ERWIN_TDELETE_ARRAY(PTR) delete[] PTR
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503 #else
1504
1505
1506 # ifdef Global_ERWIN_FREE
1507
1508 # error "Please fix your memory management macros for new version of Erwin."
1509
1510
1511
1512
1513
1514 # endif
1515
1516 #endif
1517
1518
1519 #define ?Global_ERWIN_PTR_ASSIGN(P,Q) ((P)=(Q))
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551 #define ?Global_ERWIN_TCLEAR(T,P,S) \
1552 ((T*)Global_erwin_memset0((void*)(P), 0, S))
1553
1554 #define ?Global_ERWIN_TCLEAR_ARRAY(T,P,N,O) \
1555 ((T*)Global_erwin_memset0((void*)(P), (O)*sizeof(T), (N)*sizeof(T)))
1556
1557
1558
1559 #define ?Global_ERWIN_TCALLOC(T,S) \
1560 Global_ERWIN_TCLEAR(T, ??Global_ERWIN_TMALLOC(T,S), S)
1561
1562 #define ?Global_ERWIN_TCALLOC_ARRAY(T,C) \
1563 Global_ERWIN_TCLEAR_ARRAY(T, ??Global_ERWIN_TMALLOC_ARRAY(T,C), C, 0)
1564
1565 #define ?Global_ERWIN_TCREALLOC_ARRAY(P,T,N,O) \
1566 Global_ERWIN_TCLEAR_ARRAY(T, ??Global_ERWIN_TREALLOC_ARRAY(P,T,N,O), N, O)
1567
1568
1569
1570 #define ?Global_ERWIN_TCNEW(T,S) \
1571 Global_ERWIN_TCLEAR(T, ??Global_ERWIN_TNEW(T,S), S)
1572
1573 #define ?Global_ERWIN_TCNEW_ARRAY(T,C) \
1574 Global_ERWIN_TCLEAR_ARRAY(T, ??Global_ERWIN_TNEW_ARRAY(T,C), C, 0)
1575
1576 #define ?Global_ERWIN_TCRENEW_ARRAY(P,T,N,O) \
1577 Global_ERWIN_TCLEAR_ARRAY(T, ??Global_ERWIN_TRENEW_ARRAY(P,T,N,O), N, O)
1578
1579
1580 #ifndef Global_ERWIN_TMALLOC_ATOMS
1581
1582
1583 #define ?Global_ERWIN_TMALLOC_ATOMS ??Global_ERWIN_TMALLOC_ARRAY
1584 #define ?Global_ERWIN_TCALLOC_ATOMS ??Global_ERWIN_TCALLOC_ARRAY
1585 #define ?Global_ERWIN_TREALLOC_ATOMS ??Global_ERWIN_TREALLOC_ARRAY
1586 #define ?Global_ERWIN_TRECALLOC_ATOMS ??Global_ERWIN_TRECALLOC_ARRAY
1587 #define ?Global_ERWIN_TFREE_ATOMS ??Global_ERWIN_TFREE_ARRAY
1588
1589 #define ?Global_ERWIN_TNEW_ATOMS ??Global_ERWIN_TNEW_ARRAY
1590 #define ?Global_ERWIN_TCNEW_ATOMS ??Global_ERWIN_TCNEW_ARRAY
1591 #define ?Global_ERWIN_TRENEW_ATOMS ??Global_ERWIN_TRENEW_ARRAY
1592 #define ?Global_ERWIN_TRECNEW_ATOMS ??Global_ERWIN_TRECNEW_ARRAY
1593 #define ?Global_ERWIN_TDELETE_ATOMS ??Global_ERWIN_TDELETE_ARRAY
1594
1595 #endif
1596
1597
1598 #if defined(__cplusplus) && defined(Global_ERWIN_TNEW) && Global_ERWIN_CPP_ONLY && !defined(Global_ERWIN_C_MM)
1599
1600 # define Global_ERWIN_THING_NEW(T,S) (Global_ERWIN_TNEW(T,(S)))
1601 # define Global_ERWIN_THING_CNEW(T,S) (??Global_ERWIN_TCNEW(T,(S)))
1602 # define Global_ERWIN_THING_DELETE(P,T,S) do{ Global_ERWIN_TDELETE((P),T,(S)); }while(0)
1603
1604 # define Global_ERWIN_THING_NEW_ARRAY(T,C) (Global_ERWIN_TNEW_ARRAY(T,(C)))
1605 # define Global_ERWIN_THING_CNEW_ARRAY(T,C) (??Global_ERWIN_TCNEW_ARRAY(T,(C)))
1606 # define Global_ERWIN_THING_RENEW_ARRAY(P,T,N,O) (??Global_ERWIN_TRENEW_ARRAY((P),T,(N),(O)))
1607 # define Global_ERWIN_THING_CRENEW_ARRAY(P,T,N,O) (??Global_ERWIN_TCRENEW_ARRAY((P),T,(N),(O)))
1608 # define Global_ERWIN_THING_DELETE_ARRAY(P) do{ Global_ERWIN_TDELETE_ARRAY((P)); }while(0)
1609
1610 # define Global_ERWIN_THING_NEW_ATOMS(T,C) (Global_ERWIN_TNEW_ATOMS(T,(C)))
1611 # define Global_ERWIN_THING_CNEW_ATOMS(T,C) (??Global_ERWIN_TCNEW_ATOMS(T,(C)))
1612 # define Global_ERWIN_THING_RENEW_ATOMS(P,T,N,O) (??Global_ERWIN_TRENEW_ATOMS((P),T,(N),(O)))
1613 # define Global_ERWIN_THING_CRENEW_ATOMS(P,T,N,O) (??Global_ERWIN_TCRENEW_ATOMS((P),T,(N),(O)))
1614 # define Global_ERWIN_THING_DELETE_ATOMS(P) do{ Global_ERWIN_TDELETE_ATOMS((P)); }while(0)
1615
1616 #else
1617
1618 # define Global_ERWIN_THING_NEW(T,S) (Global_ERWIN_TMALLOC(T,(S)))
1619 # define Global_ERWIN_THING_CNEW(T,S) (??Global_ERWIN_TCALLOC(T,(S)))
1620 # define Global_ERWIN_THING_DELETE(P,T,S) do{ Global_ERWIN_TFREE((P),T,(S)); }while(0)
1621
1622 # define Global_ERWIN_THING_NEW_ARRAY(T,C) (Global_ERWIN_TMALLOC_ARRAY(T,(C)))
1623 # define Global_ERWIN_THING_CNEW_ARRAY(T,C) (??Global_ERWIN_TCALLOC_ARRAY(T,(C)))
1624 # define Global_ERWIN_THING_RENEW_ARRAY(P,T,N,O) (??Global_ERWIN_TREALLOC_ARRAY((P),T,(N),(O)))
1625 # define Global_ERWIN_THING_CRENEW_ARRAY(P,T,N,O) (??Global_ERWIN_TCREALLOC_ARRAY((P),T,(N),(O)))
1626 # define Global_ERWIN_THING_DELETE_ARRAY(P) do{ Global_ERWIN_TFREE_ARRAY((P)); }while(0)
1627
1628 # define Global_ERWIN_THING_NEW_ATOMS(T,C) (Global_ERWIN_TMALLOC_ATOMS(T,(C)))
1629 # define Global_ERWIN_THING_CNEW_ATOMS(T,C) (??Global_ERWIN_TCALLOC_ATOMS(T,(C)))
1630 # define Global_ERWIN_THING_RENEW_ATOMS(P,T,N,O) (??Global_ERWIN_TREALLOC_ATOMS((P),T,(N),(O)))
1631 # define Global_ERWIN_THING_CRENEW_ATOMS(P,T,N,O) (??Global_ERWIN_TCREALLOC_ATOMS((P),T,(N),(O)))
1632 # define Global_ERWIN_THING_DELETE_ATOMS(P) do{ Global_ERWIN_TFREE_ATOMS((P)); }while(0)
1633
1634 #endif
1635
1636
1637
1638
1639 #define Global_ERWIN_TMALLOC1(T) (Global_ERWIN_TMALLOC(T,sizeof(T)))
1640 #define Global_ERWIN_TCALLOC1(T) (Global_ERWIN_TCALLOC(T,sizeof(T)))
1641 #define Global_ERWIN_TFREE1(P,T) do{ Global_ERWIN_TFREE((P),T,sizeof(T)); }while(0)
1642
1643
1644 #define Global_ERWIN_TNEW1(T) (Global_ERWIN_TNEW(T,sizeof(T)))
1645 #define Global_ERWIN_TCNEW1(T) (Global_ERWIN_TCNEW(T,sizeof(T)))
1646 #define Global_ERWIN_TDELETE1(P,T) do{ Global_ERWIN_TDELETE((P),T,sizeof(T)); }while(0)
1647
1648
1649 #define Global_ERWIN_THING_NEW1(T) Global_ERWIN_THING_NEW(T,sizeof(T))
1650 #define Global_ERWIN_THING_CNEW1(T) Global_ERWIN_THING_CNEW(T,sizeof(T))
1651 #define Global_ERWIN_THING_DELETE1(P,T) Global_ERWIN_THING_DELETE(P,T,sizeof(T))
1652
1653
1654 #if defined(Global_ERWIN_TNEW)
1655 # define Global_ERWIN_PREFER_TNEW Global_ERWIN_TNEW
1656 # define Global_ERWIN_PREFER_TDELETE Global_ERWIN_TDELETE
1657 #else
1658 # define Global_ERWIN_PREFER_TNEW Global_ERWIN_TMALLOC
1659 # define Global_ERWIN_PREFER_TDELETE Global_ERWIN_TFREE
1660 #endif
1661
1662
1663 #define Global_ERWIN_SET_PTR(X,Y) ((void)(Global_ERWIN_PTR_ASSIGN((X),(Y))))
1664
1665
1666 #define ?Global_ERWIN_DEFAULT_NEW_DELETE 0
1667
1668
1669
1670 #ifdef Global_ERWIN_INLINE_FUNCTIONS
1671 # define ?Global_ERWIN_INLINE_PERHAPS ERWIN_INLINE
1672 #else
1673 # define ?Global_ERWIN_INLINE_PERHAPS
1674 #endif
1675
1676 #ifndef NDEBUG
1677 # define ?ERWIN_CAST_INLINING 0
1678
1679 # else
1680 # define ?ERWIN_CAST_INLINING 1
1681
1682 #endif
1683
1684 #ifdef Global_ERWIN_STATIC
1685 # define ?Global_ERWIN_EXPORT static Global_ERWIN_INLINE_PERHAPS
1686 #else
1687 # define ?Global_ERWIN_EXPORT extern Global_ERWIN_INLINE_PERHAPS
1688 #endif
1689
1690 #if defined(__GNUC__) && defined(__cplusplus)
1691 # if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
1692 # define ERWIN_REINTERPRET_CAST(TYPE,VALUE) (reinterpret_cast<TYPE>(VALUE))
1693 # define ERWIN_STATIC_CAST(TYPE,VALUE) (static_cast<TYPE>(VALUE))
1694 # define ERWIN_CONST_CAST(TYPE,VALUE) (const_cast<TYPE>(VALUE))
1695 # endif
1696 #endif
1697
1698 #define ?ERWIN_REINTERPRET_CAST(TYPE,VALUE) ((TYPE)(VALUE))
1699 #define ?ERWIN_STATIC_CAST(TYPE,VALUE) ((TYPE)(VALUE))
1700 #define ?ERWIN_CONST_CAST(TYPE,VALUE) ((TYPE)(VALUE))
1701
1702 #if defined(_MSC_VER) && (_MSC_VER >= 1300)
1703 # define ERWIN_FUNCTION __FUNCTION__
1704 # define ERWIN_PRETTY_FUNCTION __FUNCSIG__
1705 #elif defined(__GNUC__)
1706 # define ERWIN_FUNCTION __FUNCTION__
1707 # define ERWIN_PRETTY_FUNCTION __PRETTY_FUNCTION__
1708 #endif
1709
1710 #define ?ERWIN_FUNCTION "<unknown function>"
1711 #define ?ERWIN_PRETTY_FUNCTION ERWIN_FUNCTION
1712
1713 #ifndef Global_ERWIN_ERROR_STREAM
1714 # define Global_ERWIN_ERROR_STREAM stderr
1715 #endif
1716
1717 #ifndef Global_ERWIN_ERROR_PRINT
1718 # define Global_ERWIN_ERROR_PRINT fprintf
1719 #endif
1720
1721 #ifdef __cplusplus
1722 # define ERWIN_IF_CXX(X) X
1723 # define ERWIN_IF_C(X)
1724 #else
1725 # define ERWIN_IF_CXX(X)
1726 # define ERWIN_IF_C(X) X
1727 #endif
1728
1729
1730
1731
1732 #define ERWIN_BIN1_RAW(X) \
1733 ( \
1734 (((X) & 0x00000001u) ? 0x01u : 0x00u) | \
1735 (((X) & 0x00000010u) ? 0x02u : 0x00u) | \
1736 (((X) & 0x00000100u) ? 0x04u : 0x00u) | \
1737 (((X) & 0x00001000u) ? 0x08u : 0x00u) | \
1738 (((X) & 0x00010000u) ? 0x10u : 0x00u) | \
1739 (((X) & 0x00100000u) ? 0x20u : 0x00u) | \
1740 (((X) & 0x01000000u) ? 0x40u : 0x00u) | \
1741 (((X) & 0x10000000u) ? 0x80u : 0x00u) \
1742 )
1743
1744 #define ERWIN_BIN2_RAW(XH,XL) (ERWIN_BIN1_RAW(XL) + (ERWIN_BIN1_RAW(XH) << 8))
1745 #define ERWIN_BIN4_RAW(XHH,XHL,XLH,XLL) (ERWIN_BIN2_RAW(XLH,XLL) + (ERWIN_BIN2_RAW(XHH,XHL) << 16))
1746
1747
1748 #define ERWIN_BIN1(X) ERWIN_BIN1_RAW(0x##X)
1749 #define ERWIN_BIN2(XH,XL) ERWIN_BIN2_RAW(0x##XH, 0x##XL)
1750 #define ERWIN_BIN4(XHH,XHL,XLH,XLL) ERWIN_BIN4_RAW(0x##XHH, 0x##XHL, 0x##XLH, 0x##XLL)
1751
1752 #define ERWIN_XCHG(TYPE,A,B) \
1753 do{ TYPE ERWIN_GENSYM(e_xchg)= (A); (A)= (B); (B)= ERWIN_GENSYM(e_xchg); }while(0)
1754
1755 #define ERWIN_PTR_TYPEDEFS(X) \
1756 typedef X * X##_p; \
1757 typedef X const * X##_const_p;
1758
1759 #define ERWIN_KIND_TYPEDEFS(KIND,X) \
1760 typedef KIND _##X X; \
1761 ERWIN_PTR_TYPEDEFS(X)
1762
1763 #define ERWIN_DEFAULT_ARG(X) ERWIN_IF_CXX(= X)
1764
1765 #define ERWIN_IDENTITY(X) X
1766
1767 #define ERWIN_IS_POWER2(X) (((X) > 0) && (((X) & ((X)-1)) == 0))
1768
1769
1770 #define ERWIN_POWER2(TYPE,N) (((TYPE)1) << (N))
1771
1772 #define ERWIN_BITS0(TYPE,N) ((~((TYPE)0)) << (N))
1773 #define ERWIN_BITS1(TYPE,N) (~ERWIN_BITS0(TYPE,N))
1774
1775 #define ERWIN_BITS1_2(TYPE,N,M) ((~((~((TYPE)0)) << (N))) << (M))
1776 #define ERWIN_BITS0_2(TYPE,N,M) (~ERWIN_BITS1_2(TYPE,N,M))
1777
1778
1779
1780 #ifndef __cplusplus
1781 # define Global_ERWIN_SIZEOF_MEMBER(Container,slot) \
1782 sizeof(((Container*)0)->slot)
1783
1784 # define Global_ERWIN_OFFSETOF(Container,slot) \
1785 (((char *)&(((Container*)0)->slot)) - \
1786 ((char *)(Container*)0))
1787
1788 #else
1789 # define Global_ERWIN_SIZEOF_MEMBER(Container,slot) \
1790 sizeof(((Container*)&Global_erwin_init)->slot)
1791
1792 # define Global_ERWIN_OFFSETOF(Container,slot) \
1793 ((&reinterpret_cast<char volatile const &>(((Container*)&Global_erwin_init)->slot)) - \
1794 ((char const *)(Container*)&Global_erwin_init))
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815 #endif
1816
1817
1818
1819
1820
1821
1822
1823
1824 #define ?Global_ERWIN_TYPE_INFO 0
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845 #define ?Global_ERWIN_SPLIT ??ALL_ERWIN_SPLIT
1846
1847 #if Global_ERWIN_OPTIMISE
1848 # define ?Global_ERWIN_SPLIT 1
1849 #endif
1850 #define ?Global_ERWIN_SPLIT 0
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900 #define ERWIN_INDEX_BYTE(ORDER,N) (((ORDER) >> ((N) << 2)) & 0xf)
1901
1902 #define ERWIN_MAKE_BYTE_ORDER(I0,I1,I2,I3) \
1903 ((I0) | ((I1) << 4) | ((I2) << 8) | ((I3) << 12))
1904
1905 #define ERWIN_LBF 0x3210
1906 #define ERWIN_HBF 0x0123
1907
1908 #define ERWIN_LITTLE_ENDIAN ERWIN_LBF
1909 #define ERWIN_BIG_ENDIAN ERWIN_HBF
1910
1911
1912
1913
1914 #if defined(WORDS_BIGENDIAN)
1915 # define ?ERWIN_BYTE_ORDER ERWIN_HBF
1916 # ifdef WORDS_LITTLEENDIAN
1917 # error "Both WORDS_BIGENDIAN and WORDS_LITTLEENDIAN are defined."
1918 # endif
1919 #elif defined(WORDS_LITTLEENDIAN)
1920 # define ?ERWIN_BYTE_ORDER ERWIN_LBF
1921 #endif
1922
1923 #ifndef ERWIN_BYTE_ORDER
1924
1925
1926
1927
1928 # define ERWIN_X86_ENDIAN ERWIN_LBF
1929 # if defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(_M_X64)
1930 # define ERWIN_BYTE_ORDER ERWIN_X86_ENDIAN
1931 # elif defined(__i386__) || defined(__i386) || defined(_M_IX86)
1932 # define ERWIN_BYTE_ORDER ERWIN_X86_ENDIAN
1933 # endif
1934
1935
1936
1937 # define ERWIN_SPARC_ENDIAN ERWIN_HBF
1938 # if defined(__sparc__) || defined(__sparc)
1939 # define ERWIN_BYTE_ORDER ERWIN_SPARC_ENDIAN
1940 # endif
1941
1942
1943 # define ERWIN_PPC_ENDIAN ERWIN_HBF
1944 # if defined(__powerpc__) || defined(__powerpc) || defined(_M_PPC)
1945 # define ERWIN_BYTE_ORDER ERWIN_PPC_ENDIAN
1946 # endif
1947
1948 #endif
1949
1950
1951
1952 #ifdef HAVE_LIBERROR
1953 # define Global_ERWIN_ABORT err_crash
1954 #else
1955 # define Global_ERWIN_ABORT abort
1956 #endif
1957
1958 #ifndef Global_ERWIN_DEFAULT_ASSERTION_FAILED_HANDLER
1959 # define Global_ERWIN_DEFAULT_ASSERTION_FAILED_HANDLER(FL,I,FU,A) \
1960 ((void)(Global_erwin_assertion_is_fatal ? (Global_ERWIN_ABORT(), 0) : 0))
1961 #endif
1962
1963 #ifdef Global_ERWIN_COMPILING
1964 # include "--INCPREF2B--erwin/asm.h"
1965 #else
1966 # include <--INCPREF2B--erwin/asm.h>
1967 #endif
1968
1969 #endif
1970
1971 #endif