1 | /* winnt/factoryconf.h automatically generated by makeheader from factoryconf.template */ |
---|
2 | /* emacs edit mode for this file is -*- C -*- */ |
---|
3 | /* $Id: factoryconf.h,v 1.7 2008-12-08 08:59:27 Singular Exp $ */ |
---|
4 | |
---|
5 | #ifndef INCL_FACTORYCONF_H |
---|
6 | #define INCL_FACTORYCONF_H |
---|
7 | |
---|
8 | /* {{{ docu |
---|
9 | * |
---|
10 | * factoryconf.template - template to generate `factoryconf.h'. |
---|
11 | * |
---|
12 | * `factoryconf.h' serves as a configuration file for the |
---|
13 | * installed source files (templates and `factory.h') the same |
---|
14 | * way as `config.h' serves as a configuration file for the |
---|
15 | * source files from which the library is build. Additionally, |
---|
16 | * we paste a copy of our `assert.h' into this file which is |
---|
17 | * necessary for the templates to translate. |
---|
18 | * |
---|
19 | */ |
---|
20 | /* }}} */ |
---|
21 | |
---|
22 | /* stuff included from ./winnt/config.h */ |
---|
23 | |
---|
24 | /* emacs edit mode for this file is -*- C -*- */ |
---|
25 | /* $Id: factoryconf.h,v 1.7 2008-12-08 08:59:27 Singular Exp $ */ |
---|
26 | |
---|
27 | #ifndef INCL_CONFIG_H |
---|
28 | #define INCL_CONFIG_H |
---|
29 | |
---|
30 | /* {{{ docu |
---|
31 | * |
---|
32 | * config.h.in - used by `configure' to create `config.h'. |
---|
33 | * |
---|
34 | * This file is included at building time from almost all source |
---|
35 | * files belonging to Factory. Furthermore, it is (textually) |
---|
36 | * included into `factoryconf.h' by `makeheader' so we have an |
---|
37 | * installed version of this file, too. This way, the installed |
---|
38 | * source files will be compiled with the same settings as the |
---|
39 | * library itself. |
---|
40 | * |
---|
41 | * In general, you should let `configure' guess the correct |
---|
42 | * values for the `#define's below. But if something seriously |
---|
43 | * goes wrong in configuring, please inform the authors and feel |
---|
44 | * free to edit the marked section. |
---|
45 | * |
---|
46 | * ---RS--- |
---|
47 | * This is the specialized version of config.h for compiling |
---|
48 | * Factory on Windows NT 4.0 with MS Visula C++ 5.x |
---|
49 | * ---RS--- |
---|
50 | */ |
---|
51 | /* }}} */ |
---|
52 | |
---|
53 | /************** START OF CONFIGURABLE SECTION **************/ |
---|
54 | |
---|
55 | /* Define to empty if the keyword does not work. */ |
---|
56 | /* #undef const */ |
---|
57 | |
---|
58 | /* Define as __inline if that's what the C compiler calls it. */ |
---|
59 | /* #undef inline */ |
---|
60 | |
---|
61 | /* factory version */ |
---|
62 | #define FACTORYVERSION "1.3b" |
---|
63 | |
---|
64 | /* factory configuration */ |
---|
65 | #define FACTORYCONFIGURATION "WINNT" |
---|
66 | |
---|
67 | /* where the gftables live */ |
---|
68 | #define GFTABLEDIR "." |
---|
69 | |
---|
70 | /* define if your compiler does arithmetic shift */ |
---|
71 | #define HAS_ARITHMETIC_SHIFT 1 |
---|
72 | |
---|
73 | /* define to build factory without stream IO */ |
---|
74 | #undef NOSTREAMIO |
---|
75 | |
---|
76 | /* define if linked to Singular */ |
---|
77 | #undef SINGULAR |
---|
78 | |
---|
79 | /* define if linked with factory memory manager */ |
---|
80 | #define USE_MEMUTIL 1 |
---|
81 | |
---|
82 | /* define if linked with old factory memory manager */ |
---|
83 | #define USE_OLD_MEMMAN 1 |
---|
84 | |
---|
85 | /* define if linked with new factory manager, debugging version */ |
---|
86 | #undef MDEBUG |
---|
87 | |
---|
88 | /* define if you do not want to activate assertions */ |
---|
89 | #undef NOASSERT |
---|
90 | |
---|
91 | /* define if you want to activate the timing stuff */ |
---|
92 | #undef TIMING |
---|
93 | |
---|
94 | /* define if you want to have debugging output */ |
---|
95 | #undef DEBUGOUTPUT |
---|
96 | |
---|
97 | /* define type of your compilers 64 bit integer type */ |
---|
98 | #define INT64 __int64 |
---|
99 | |
---|
100 | /************** END OF CONFIGURABLE SECTION **************/ |
---|
101 | |
---|
102 | #endif /* ! INCL_CONFIG_H */ |
---|
103 | |
---|
104 | /* stuff included from ./assert.h */ |
---|
105 | |
---|
106 | /* emacs edit mode for this file is -*- C -*- */ |
---|
107 | /* $Id: factoryconf.h,v 1.7 2008-12-08 08:59:27 Singular Exp $ */ |
---|
108 | |
---|
109 | /* This is for compatibility with standard assert.h */ |
---|
110 | #if defined (NDEBUG) && ! defined (NOASSERT) |
---|
111 | #define NOASSERT |
---|
112 | #endif |
---|
113 | |
---|
114 | /* It should be possible to include this file multiple times for different */ |
---|
115 | /* settings of NOASSERT */ |
---|
116 | |
---|
117 | /* {{{ undefines */ |
---|
118 | #undef __ASSERT |
---|
119 | #undef __ASSERT1 |
---|
120 | #undef STICKYASSERT |
---|
121 | #undef STICKYASSERT1 |
---|
122 | #undef ASSERT |
---|
123 | #undef ASSERT1 |
---|
124 | |
---|
125 | #undef __WARN |
---|
126 | #undef STICKYWARN |
---|
127 | #undef WARN |
---|
128 | |
---|
129 | #undef PVIRT_VOID |
---|
130 | #undef PVIRT_INTCF |
---|
131 | #undef PVIRT_BOOL |
---|
132 | #undef PVIRT_INT |
---|
133 | #undef PVIRT_CHARCC |
---|
134 | /* }}} */ |
---|
135 | |
---|
136 | #ifdef HAVE_CSTDIO |
---|
137 | #include <cstdio> |
---|
138 | #else |
---|
139 | #ifdef __cplusplus |
---|
140 | extern "C" { |
---|
141 | #endif |
---|
142 | |
---|
143 | #include <stdio.h> |
---|
144 | #include <stdlib.h> |
---|
145 | |
---|
146 | #ifdef __cplusplus |
---|
147 | } |
---|
148 | #endif |
---|
149 | #endif |
---|
150 | |
---|
151 | /* {{{ permanent macro definitions */ |
---|
152 | #ifndef __GNUC__ |
---|
153 | #define __ASSERT(expression, message, file, line) \ |
---|
154 | (fprintf( stderr, "error: " message "\n%s:%u: failed assertion `%s'\n", \ |
---|
155 | file, line, expression ), abort(), 0 ) |
---|
156 | #define __ASSERT1(expression, message, parameter1, file, line) \ |
---|
157 | (fprintf( stderr, "error: " message "\n%s:%u: failed assertion `%s'\n", \ |
---|
158 | parameter1, file, line, expression ), abort(), 0 ) |
---|
159 | |
---|
160 | #define STICKYASSERT(expression, message) \ |
---|
161 | ((void)((expression) ? 0 : __ASSERT(#expression, message, __FILE__, __LINE__))) |
---|
162 | #define STICKYASSERT1(expression, message, parameter1) \ |
---|
163 | ((void)((expression) ? 0 : __ASSERT1(#expression, message, parameter1, __FILE__, __LINE__))) |
---|
164 | |
---|
165 | #define __WARN(expression, message, file, line) \ |
---|
166 | (fprintf( stderr, "warning: " message "\n%s:%u: failed assertion `%s'\n", \ |
---|
167 | file, line, expression ), 0 ) |
---|
168 | #define STICKYWARN(expression, message) \ |
---|
169 | ((void)((expression) ? 0 : __WARN(#expression, message, __FILE__, __LINE__))) |
---|
170 | #else /* __GNUCC__ */ |
---|
171 | /* use preprocessor macro __PRETTY_FUNCTION__ for more informative output */ |
---|
172 | #define __ASSERT(expression, message, file, line, function) \ |
---|
173 | (fprintf( stderr, "error: " message "\n%s:%u: In function `%s':\nfailed assertion `%s'\n", \ |
---|
174 | file, line, function, expression ), abort(), 0 ) |
---|
175 | #define __ASSERT1(expression, message, parameter1, file, line, function) \ |
---|
176 | (fprintf( stderr, "error: " message "\n%s:%u: In function `%s':\nfailed assertion `%s'\n", \ |
---|
177 | parameter1, file, line, function, expression ), abort(), 0 ) |
---|
178 | |
---|
179 | #define STICKYASSERT(expression, message) \ |
---|
180 | ((void)((expression) ? 0 : __ASSERT(#expression, message, __FILE__, __LINE__, __PRETTY_FUNCTION__))) |
---|
181 | #define STICKYASSERT1(expression, message, parameter1) \ |
---|
182 | ((void)((expression) ? 0 : __ASSERT1(#expression, message, parameter1, __FILE__, __LINE__, __PRETTY_FUNCTION__))) |
---|
183 | |
---|
184 | #define __WARN(expression, message, file, line, function) \ |
---|
185 | (fprintf( stderr, "warning: " message "\n%s:%u: In function `%s':\nfailed assertion `%s'\n", \ |
---|
186 | file, line, function, expression ), 0 ) |
---|
187 | #define STICKYWARN(expression, message) \ |
---|
188 | ((void)((expression) ? 0 : __WARN(#expression, message, __FILE__, __LINE__, __PRETTY_FUNCTION__))) |
---|
189 | #endif /* __GNUCC__ */ |
---|
190 | /* }}} */ |
---|
191 | |
---|
192 | /* {{{ macro definitions dependent on NOASSERT */ |
---|
193 | #ifndef NOASSERT |
---|
194 | #ifndef __GNUC__ |
---|
195 | #define ASSERT(expression, message) \ |
---|
196 | ((void)((expression) ? 0 : __ASSERT(#expression, message, __FILE__, __LINE__))) |
---|
197 | #define ASSERT1(expression, message, parameter1) \ |
---|
198 | ((void)((expression) ? 0 : __ASSERT1(#expression, message, parameter1, __FILE__, __LINE__))) |
---|
199 | |
---|
200 | #define WARN(expression, message) \ |
---|
201 | ((void)((expression) ? 0 : __WARN(#expression, message, __FILE__, __LINE__))) |
---|
202 | #else /* __GNUCC__ */ |
---|
203 | /* use preprocessor macro __PRETTY_FUNCTION__ for more informative output */ |
---|
204 | #define ASSERT(expression, message) \ |
---|
205 | ((void)((expression) ? 0 : __ASSERT(#expression, message, __FILE__, __LINE__, __PRETTY_FUNCTION__))) |
---|
206 | #define ASSERT1(expression, message, parameter1) \ |
---|
207 | ((void)((expression) ? 0 : __ASSERT1(#expression, message, parameter1, __FILE__, __LINE__, __PRETTY_FUNCTION__))) |
---|
208 | |
---|
209 | #define WARN(expression, message) \ |
---|
210 | ((void)((expression) ? 0 : __WARN(#expression, message, __FILE__, __LINE__, __PRETTY_FUNCTION__))) |
---|
211 | #endif /* __GNUCC__ */ |
---|
212 | |
---|
213 | #define PVIRT_VOID(msg) \ |
---|
214 | { fprintf( stderr, "pure method( " msg " ) called\n" ); abort(); } |
---|
215 | #define PVIRT_INTCF(msg) \ |
---|
216 | { fprintf( stderr, "pure method( " msg " ) called\n" ); abort(); return 0; } |
---|
217 | #define PVIRT_BOOL(msg) \ |
---|
218 | { fprintf( stderr, "pure method( " msg " ) called\n" ); abort(); return false; } |
---|
219 | #define PVIRT_INT(msg) \ |
---|
220 | { fprintf( stderr, "pure method( " msg " ) called\n" ); abort(); return 0; } |
---|
221 | #define PVIRT_CHARCC(msg) \ |
---|
222 | { fprintf( stderr, "pure method( " msg " ) called\n" ); abort(); return 0; } |
---|
223 | #else /* NOASSERT */ |
---|
224 | #define ASSERT(expression, message) |
---|
225 | #define ASSERT1(expression, message, parameter1) |
---|
226 | |
---|
227 | #define WARN(expression, message) |
---|
228 | |
---|
229 | #define PVIRT_VOID(msg) = 0 |
---|
230 | #define PVIRT_INTCF(msg) = 0 |
---|
231 | #define PVIRT_BOOL(msg) = 0 |
---|
232 | #define PVIRT_INT(msg) = 0 |
---|
233 | #define PVIRT_CHARCC(msg) = 0 |
---|
234 | #endif /* NOASSERT */ |
---|
235 | /* }}} */ |
---|
236 | |
---|
237 | #endif /* ! INCL_FACTORYCONF_H */ |
---|