Imported Debian patch 0.1beta-15
[debian/yforth] / config.h
1 /* yForth? - Written by Luca Padovani (C) 1996/97
2  * ------------------------------------------------------------------------
3  * This software is FreeWare as long as it comes with this header in each
4  * source file, anyway you can use it or any part of it whatever
5  * you want. It comes without any warranty, so use it at your own risk.
6  * ------------------------------------------------------------------------
7  * Module name:     config.h
8  * Abstract:        configuration file. Before any compilation please check
9  *                  that actual configuration is consistent with your
10  *                  hardware AND your compiler.
11  */
12
13 /* module definition: 1 indicates that a module should be included in the
14  * base vocabulary, 0 excludes a module. Note however that some words in
15  * excluded word lists may be linked to final code if used by other words.
16  */
17
18 #include <endian.h>
19
20 #define COREE_DEF           1L
21 #define DOUBLE_DEF          1L
22 #define DOUBLEE_DEF         1L
23 #define FLOAT_DEF           1L
24 #define FLOATE_DEF          1L
25 #define MEMALL_DEF          1L
26 #define MEMALLE_DEF         0L
27 #define SEARCH_DEF          1L
28 #define SEARCHE_DEF         1L
29 #define TOOLS_DEF           1L
30 #define TOOLSE_DEF          1L
31 #define LOCALS_DEF          1L
32 #define LOCALSE_DEF         1L
33 #define FACILITY_DEF        1L
34 #define FACILITYE_DEF       0L
35 #define BLOCK_DEF           1L
36 #define BLOCKE_DEF          1L
37 #define EXCEPTION_DEF       1L
38 #define EXCEPTIONE_DEF      0L
39 #define FILE_DEF            1L
40 #define FILEE_DEF           1L
41 #define STRING_DEF          1L
42 #define STRINGE_DEF         0L
43
44 #define VERSION_PATTERN     (COREE_DEF | (DOUBLE_DEF << 1) |\
45                                                          (DOUBLEE_DEF << 2) | (FLOAT_DEF << 3) |\
46                              (FLOATE_DEF << 4) | (MEMALL_DEF << 5) |\
47                              (MEMALLE_DEF << 6) | (SEARCH_DEF << 7) |\
48                              (SEARCHE_DEF << 8) | (TOOLS_DEF << 9) |\
49                              (TOOLSE_DEF << 10) | (LOCALS_DEF << 11) |\
50                              (LOCALSE_DEF << 12) | (FACILITY_DEF << 13) |\
51                              (FACILITYE_DEF << 14) | (BLOCK_DEF << 15) |\
52                              (BLOCKE_DEF << 16) | (EXCEPTION_DEF << 17) |\
53                              (EXCEPTIONE_DEF << 18) | (FILE_DEF << 19) |\
54                              (FILEE_DEF << 20) | (STRING_DEF << 21) |\
55                              (STRINGE_DEF << 22)\
56                             )
57
58 /************************************************************************/
59 /* compilation and machine dependent definitions                        */
60 /************************************************************************/
61
62 /* Define LITTLE_ENDIAN if you machine is little-endian (e.g. Intel), undefine
63  * it if your machine is big-endian (e.g. Motorola, Sparc...)
64  * Note that some compilers have LITTLE_ENDIAN yet defined.
65  */
66 #if __BYTE_ORDER == __LITTLE_ENDIAN
67 #       define LITTLE_ENDIAN
68 #else
69 #       undef  LITTLE_ENDIAN
70 #endif
71
72 /* When DCELL_MEM is defined, double cell transfer is realized by memory
73  * copy, if not defined shift and logical operators are used to combine
74  * or isolate cell values
75  */
76 #define DCELL_MEM
77  
78 /* DATA TYPES: please modify this list accordingly to your system. Note that
79  * sizeof(DCell) == 2 * sizeof(Cell) MUST BE satisfied.
80  * For example, using Borland C for DOS Cell may be "int" and DCell "long int".
81  * Under Linux, Cell may be "int" and DCell "long long".
82  */
83
84 /* this might work for other 64 bit architectures, too? */
85 #if defined(__alpha__)
86 # define Cell                           long
87 #else
88 # define Cell                           int
89 #endif /* __alpha__ */
90
91 #define Char                            char
92 #define Real                            float
93
94 #define UCell                           unsigned Cell
95 #define DCell               long long
96 #define UDCell                          unsigned DCell
97 #define UChar                           unsigned Char
98
99 #define CellBits            (sizeof(Cell) * 8)
100 #define CellLog             (sizeof(Cell) - 1)
101 #define RealLog                         (sizeof(Real) - 1)
102
103 #define FFLAG(n)            (-(n))
104
105 /* Please modify this definitions accordingly with your data types */
106
107 #define MAX_CHAR                        UCHAR_MAX
108 #define MAX_D                           LONG_MAX
109 #define MAX_N                           INT_MAX
110 #define MAX_U                           UINT_MAX
111 #define MAX_UD                          ULONG_MAX
112 #define MAX_F                           0.0
113
114 /* Some compilers doesn't provide some functions in the standard library.
115  * If you don't have, turn 1s into 0s 
116  */
117 #define HAVE_ACOSH                      1
118 #define HAVE_ASINH                      1
119 #define HAVE_ATANH                      1
120
121 /* Set following define to 1 if you're compiling under Turbo C, Borland C,
122  * or GCC for DOS.
123  */
124 #define HAVE_CONIO                      0