Imported Debian patch 0.1beta-19
[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 #ifndef LITTLE_ENDIAN
67 # if __BYTE_ORDER == __LITTLE_ENDIAN
68 #       define LITTLE_ENDIAN
69 # else
70 #       undef  LITTLE_ENDIAN
71 # endif
72 #endif
73
74 /* When DCELL_MEM is defined, double cell transfer is realized by memory
75  * copy, if not defined shift and logical operators are used to combine
76  * or isolate cell values
77  */
78 #define DCELL_MEM
79  
80 /* DATA TYPES: please modify this list accordingly to your system. Note that
81  * sizeof(DCell) == 2 * sizeof(Cell) MUST BE satisfied.
82  * For example, using Borland C for DOS Cell may be "int" and DCell "long int".
83  * Under Linux, Cell may be "int" and DCell "long long".
84  */
85
86 /* this might work for other 64 bit architectures, too? */
87 #if defined(__alpha__)
88 # define Cell                           long
89 #else
90 # define Cell                           int
91 #endif /* __alpha__ */
92
93 #define Char                            char
94 #define Real                            float
95
96 #define UCell                           unsigned Cell
97 #define DCell               long long
98 #define UDCell                          unsigned DCell
99 #define UChar                           unsigned Char
100
101 #define CellBits            (sizeof(Cell) * 8)
102 #define CellLog             (sizeof(Cell) - 1)
103 #define RealLog                         (sizeof(Real) - 1)
104
105 #define FFLAG(n)            (-(n))
106
107 /* Please modify this definitions accordingly with your data types */
108
109 #define MAX_CHAR                        UCHAR_MAX
110 #define MAX_D                           LONG_MAX
111 #define MAX_N                           INT_MAX
112 #define MAX_U                           UINT_MAX
113 #define MAX_UD                          ULONG_MAX
114 #define MAX_F                           0.0
115
116 /* Some compilers doesn't provide some functions in the standard library.
117  * If you don't have, turn 1s into 0s 
118  */
119 #define HAVE_ACOSH                      1
120 #define HAVE_ASINH                      1
121 #define HAVE_ATANH                      1
122
123 /* Set following define to 1 if you're compiling under Turbo C, Borland C,
124  * or GCC for DOS.
125  */
126 #define HAVE_CONIO                      0