[49f1f45] | 1 | /* winnt/factoryconf.h automatically generated by makeheader from factoryconf.template */ |
---|
[9503e0] | 2 | /* emacs edit mode for this file is -*- C -*- */ |
---|
[49f1f45] | 3 | /* $Id: factoryconf.h,v 1.6 2007-11-20 10:08:03 Singular Exp $ */ |
---|
[63df749] | 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 | |
---|
[49f1f45] | 22 | /* stuff included from ./winnt/config.h */ |
---|
[63df749] | 23 | |
---|
| 24 | /* emacs edit mode for this file is -*- C -*- */ |
---|
[49f1f45] | 25 | /* $Id: factoryconf.h,v 1.6 2007-11-20 10:08:03 Singular Exp $ */ |
---|
[9503e0] | 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 | |
---|
[63df749] | 97 | /* define type of your compilers 64 bit integer type */ |
---|
| 98 | #define INT64 __int64 |
---|
| 99 | |
---|
[9503e0] | 100 | /************** END OF CONFIGURABLE SECTION **************/ |
---|
| 101 | |
---|
| 102 | #endif /* ! INCL_CONFIG_H */ |
---|
[63df749] | 103 | |
---|
[49f1f45] | 104 | /* stuff included from ./assert.h */ |
---|
[63df749] | 105 | |
---|
[9503e0] | 106 | /* emacs edit mode for this file is -*- C -*- */ |
---|
[49f1f45] | 107 | /* $Id: factoryconf.h,v 1.6 2007-11-20 10:08:03 Singular Exp $ */ |
---|
[9503e0] | 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 | |
---|
[49f1f45] | 136 | #ifdef __cplusplus |
---|
| 137 | extern "C" { |
---|
| 138 | #endif |
---|
| 139 | |
---|
[9503e0] | 140 | #include <stdio.h> |
---|
| 141 | #include <stdlib.h> |
---|
| 142 | |
---|
[49f1f45] | 143 | #ifdef __cplusplus |
---|
| 144 | } |
---|
| 145 | #endif |
---|
| 146 | |
---|
[9503e0] | 147 | /* {{{ permanent macro definitions */ |
---|
| 148 | #ifndef __GNUC__ |
---|
| 149 | #define __ASSERT(expression, message, file, line) \ |
---|
| 150 | (fprintf( stderr, "error: " message "\n%s:%u: failed assertion `%s'\n", \ |
---|
| 151 | file, line, expression ), abort(), 0 ) |
---|
| 152 | #define __ASSERT1(expression, message, parameter1, file, line) \ |
---|
| 153 | (fprintf( stderr, "error: " message "\n%s:%u: failed assertion `%s'\n", \ |
---|
| 154 | parameter1, file, line, expression ), abort(), 0 ) |
---|
| 155 | |
---|
| 156 | #define STICKYASSERT(expression, message) \ |
---|
| 157 | ((void)((expression) ? 0 : __ASSERT(#expression, message, __FILE__, __LINE__))) |
---|
| 158 | #define STICKYASSERT1(expression, message, parameter1) \ |
---|
| 159 | ((void)((expression) ? 0 : __ASSERT1(#expression, message, parameter1, __FILE__, __LINE__))) |
---|
| 160 | |
---|
| 161 | #define __WARN(expression, message, file, line) \ |
---|
| 162 | (fprintf( stderr, "warning: " message "\n%s:%u: failed assertion `%s'\n", \ |
---|
| 163 | file, line, expression ), 0 ) |
---|
| 164 | #define STICKYWARN(expression, message) \ |
---|
| 165 | ((void)((expression) ? 0 : __WARN(#expression, message, __FILE__, __LINE__))) |
---|
| 166 | #else /* __GNUCC__ */ |
---|
| 167 | /* use preprocessor macro __PRETTY_FUNCTION__ for more informative output */ |
---|
| 168 | #define __ASSERT(expression, message, file, line, function) \ |
---|
| 169 | (fprintf( stderr, "error: " message "\n%s:%u: In function `%s':\nfailed assertion `%s'\n", \ |
---|
| 170 | file, line, function, expression ), abort(), 0 ) |
---|
| 171 | #define __ASSERT1(expression, message, parameter1, file, line, function) \ |
---|
| 172 | (fprintf( stderr, "error: " message "\n%s:%u: In function `%s':\nfailed assertion `%s'\n", \ |
---|
| 173 | parameter1, file, line, function, expression ), abort(), 0 ) |
---|
| 174 | |
---|
| 175 | #define STICKYASSERT(expression, message) \ |
---|
| 176 | ((void)((expression) ? 0 : __ASSERT(#expression, message, __FILE__, __LINE__, __PRETTY_FUNCTION__))) |
---|
| 177 | #define STICKYASSERT1(expression, message, parameter1) \ |
---|
| 178 | ((void)((expression) ? 0 : __ASSERT1(#expression, message, parameter1, __FILE__, __LINE__, __PRETTY_FUNCTION__))) |
---|
| 179 | |
---|
| 180 | #define __WARN(expression, message, file, line, function) \ |
---|
| 181 | (fprintf( stderr, "warning: " message "\n%s:%u: In function `%s':\nfailed assertion `%s'\n", \ |
---|
| 182 | file, line, function, expression ), 0 ) |
---|
| 183 | #define STICKYWARN(expression, message) \ |
---|
| 184 | ((void)((expression) ? 0 : __WARN(#expression, message, __FILE__, __LINE__, __PRETTY_FUNCTION__))) |
---|
| 185 | #endif /* __GNUCC__ */ |
---|
| 186 | /* }}} */ |
---|
| 187 | |
---|
| 188 | /* {{{ macro definitions dependent on NOASSERT */ |
---|
| 189 | #ifndef NOASSERT |
---|
| 190 | #ifndef __GNUC__ |
---|
| 191 | #define ASSERT(expression, message) \ |
---|
| 192 | ((void)((expression) ? 0 : __ASSERT(#expression, message, __FILE__, __LINE__))) |
---|
| 193 | #define ASSERT1(expression, message, parameter1) \ |
---|
| 194 | ((void)((expression) ? 0 : __ASSERT1(#expression, message, parameter1, __FILE__, __LINE__))) |
---|
| 195 | |
---|
| 196 | #define WARN(expression, message) \ |
---|
| 197 | ((void)((expression) ? 0 : __WARN(#expression, message, __FILE__, __LINE__))) |
---|
| 198 | #else /* __GNUCC__ */ |
---|
| 199 | /* use preprocessor macro __PRETTY_FUNCTION__ for more informative output */ |
---|
| 200 | #define ASSERT(expression, message) \ |
---|
| 201 | ((void)((expression) ? 0 : __ASSERT(#expression, message, __FILE__, __LINE__, __PRETTY_FUNCTION__))) |
---|
| 202 | #define ASSERT1(expression, message, parameter1) \ |
---|
| 203 | ((void)((expression) ? 0 : __ASSERT1(#expression, message, parameter1, __FILE__, __LINE__, __PRETTY_FUNCTION__))) |
---|
| 204 | |
---|
| 205 | #define WARN(expression, message) \ |
---|
| 206 | ((void)((expression) ? 0 : __WARN(#expression, message, __FILE__, __LINE__, __PRETTY_FUNCTION__))) |
---|
| 207 | #endif /* __GNUCC__ */ |
---|
| 208 | |
---|
| 209 | #define PVIRT_VOID(msg) \ |
---|
| 210 | { fprintf( stderr, "pure method( " msg " ) called\n" ); abort(); } |
---|
| 211 | #define PVIRT_INTCF(msg) \ |
---|
| 212 | { fprintf( stderr, "pure method( " msg " ) called\n" ); abort(); return 0; } |
---|
| 213 | #define PVIRT_BOOL(msg) \ |
---|
| 214 | { fprintf( stderr, "pure method( " msg " ) called\n" ); abort(); return false; } |
---|
| 215 | #define PVIRT_INT(msg) \ |
---|
| 216 | { fprintf( stderr, "pure method( " msg " ) called\n" ); abort(); return 0; } |
---|
| 217 | #define PVIRT_CHARCC(msg) \ |
---|
| 218 | { fprintf( stderr, "pure method( " msg " ) called\n" ); abort(); return 0; } |
---|
| 219 | #else /* NOASSERT */ |
---|
| 220 | #define ASSERT(expression, message) |
---|
| 221 | #define ASSERT1(expression, message, parameter1) |
---|
| 222 | |
---|
| 223 | #define WARN(expression, message) |
---|
| 224 | |
---|
| 225 | #define PVIRT_VOID(msg) = 0 |
---|
| 226 | #define PVIRT_INTCF(msg) = 0 |
---|
| 227 | #define PVIRT_BOOL(msg) = 0 |
---|
| 228 | #define PVIRT_INT(msg) = 0 |
---|
| 229 | #define PVIRT_CHARCC(msg) = 0 |
---|
| 230 | #endif /* NOASSERT */ |
---|
| 231 | /* }}} */ |
---|
[63df749] | 232 | |
---|
| 233 | #endif /* ! INCL_FACTORYCONF_H */ |
---|