]> www.ginac.de Git - cln.git/blob - src/base/cl_sysdep.h
Use paths relative the `src' directory in the #include directives.
[cln.git] / src / base / cl_sysdep.h
1 // System dependent definitions
2
3 #ifndef _CL_SYSDEP_H
4 #define _CL_SYSDEP_H
5
6 // CPU and other
7 #include "cln/config.h"
8
9 // char_bitsize, short_bitsize, long_bitsize, long_long_bitsize
10 #include "cln/intparam.h"
11
12 // The CPU's endianness
13 #if defined(short_little_endian) || defined(int_little_endian) || defined(long_little_endian)
14   // Z80, VAX, I80X86, DECALPHA, MIPSEL, ...:
15   // Low byte at low address, high byte at high address
16   #if defined(CL_CPU_BIG_ENDIAN_P)
17     #error "Bogus CL_CPU_BIG_ENDIAN_P!"
18   #endif
19   #define CL_CPU_BIG_ENDIAN_P  0
20 #endif
21 #if defined(short_big_endian) || defined(int_big_endian) || defined(long_big_endian)
22   // MC680X0, SPARC, HPPA, MIPSEB, M88000, RS6000, ...:
23   // High byte at low address, low byte at high address
24   #if defined(CL_CPU_BIG_ENDIAN_P)
25     #error "Bogus CL_CPU_BIG_ENDIAN_P!"
26   #endif
27   #define CL_CPU_BIG_ENDIAN_P  1
28 #endif
29 #if !defined(CL_CPU_BIG_ENDIAN_P)
30   #error "Bogus CL_CPU_BIG_ENDIAN_P!"
31 #endif
32
33 // Auswahl der Floating-Point-Fähigkeiten:
34 // FAST_DOUBLE sollte definiert werden, wenn ein Floating-Point-Coprozessor
35 // vorhanden ist, dessen `double'-Typ IEEE-Floating-Points mit 64 Bits sind.
36 // FAST_FLOAT sollte definiert werden, wenn ein Floating-Point-Coprozessor
37 // vorhanden ist, dessen `float'-Typ IEEE-Floating-Points mit 32 Bits sind,
38 // und der C++-Compiler auch `float'- und nicht `double'-Operationen generiert.
39 #if defined(__sparc__) || defined(__sparc64__) || defined(__hppa__) || defined(__m88k__) || defined(__rs6000__)
40   #define FAST_DOUBLE
41   #define FAST_FLOAT
42 #endif
43 #if defined(__i386__) && (defined(linux) || defined(__linux__) || defined(NeXT))
44   // Linux hat einen funktionierenden Floating-Point-Coprozessor-Emulator.
45   // NeXTstep läuft sowieso nur mit Floating-Point-Coprozessor.
46   // Aber auf Intel-Pentium-Prozessoren ist die FPU fehlerhaft.
47   #define FAST_DOUBLE
48   #define FAST_FLOAT
49 #endif
50 #if defined(__arm__)
51   // Bei Integers ist der Prozessor Little-Endian, bei Double-Floats Big-Endian!
52   #undef FAST_DOUBLE
53 #endif
54
55 // Macros for internal use.
56 #include "base/cl_macros.h"
57
58 // Elementary types.
59 #include "cln/types.h"
60
61 // Dependencies among modules.
62 #include "cln/modules.h"
63
64 #endif /* _CL_SYSDEP_H */