source: git/Singular/mod2.h.in @ a70441f

spielwiese
Last change on this file since a70441f was a70441f, checked in by Olaf Bachmann <obachman@…>, 23 years ago
Windows and gcc 2.95 porting git-svn-id: file:///usr/local/Singular/svn/trunk@4273 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 14.4 KB
Line 
1/* -*-c++-*- */
2/*******************************************************************
3 *  Computer Algebra System SINGULAR
4 *
5 *  mod2.h: Main configuration file for Singular
6 *          DO NOT EDIT!
7 *
8 *  Version: $Id: mod2.h.in,v 1.82 2000-04-27 10:07:09 obachman Exp $
9 *******************************************************************/
10#ifndef MOD2_H
11#define MOD2_H
12
13/*******************************************************************
14 * Defines which are set by configure
15 ******************************************************************/
16/* Define to use dynamic linking */
17#undef HAVE_DL
18/* Define to use readline lib for fancy display */
19#undef HAVE_READLINE
20/* Define if you want to use dld's */
21#undef HAVE_DLD
22/* Define to have dbm links */
23#undef HAVE_DBM
24/* Define to have smallgmp */
25#undef HAVE_SMALLGMP
26/* Define to have MP links */
27#undef HAVE_MPSR
28/* Define to have factory functionality added */
29#undef HAVE_FACTORY
30/* Define to have libfac functionality added */
31#undef HAVE_LIBFAC_P
32/* Define if you have stdc headers */
33#undef STDC_HEADERS
34/* Define if you have asm/sigcontext.h */
35#undef HAVE_ASM_SIGCONTEXT_H
36/* Define if you have sys/file.h */
37#undef HAVE_SYS_FILE_H
38/* Define if you have sys/stat.h */
39#undef HAVE_SYS_STAT_H
40/* Define if you have sys/param.h */
41#undef HAVE_SYS_PARAM_H
42/* Define if you have sys/file.h */
43#undef HAVE_SYS_TYPES_H
44/* Define if you have sys/ioctl.h */
45#undef HAVE_SYS_IOCTL_H
46/* Define if you have sys/time.h */
47#undef HAVE_SYS_TIME_H
48/* Define if you have sys/times.h */
49#undef HAVE_SYS_TIMES_H
50/* io header: */
51/* Define if you have termcap.h */
52#undef HAVE_TERMCAP_H
53/* Define if you have termios.h */
54#undef HAVE_TERMIOS_H
55/* Define if you have term.h */
56#undef HAVE_TERM_H
57/* Define if you have readline/history.h */
58#undef HAVE_READLINE_HISTORY_H
59/* Define if readline/readline.h is ok */
60#undef READLINE_READLINE_H_OK
61/* Define if time.h and sys/time.h can be included at the same time */
62#undef TIME_WITH_SYS_TIME
63/* Define if you have alloca.h */
64#undef HAVE_ALLOCA_H
65/* Define if you have pwd.h */
66#undef HAVE_PWD_H
67/* Define if you have unistd.h */
68#undef HAVE_UNISTD_H
69/* define if you have malloc.h */
70#undef HAVE_MALLOC_H
71/* define if you have pwd.h*/
72#undef HAVE_PWD_H
73/* Define if you have alloca */
74#undef HAVE_ALLOCA
75/* Define if you have getpagesize */
76#undef GETPAGESIZE
77/* Define if you have vprintf */
78#undef HAVE_VPRINTF
79/* Define if you have gettimeofday */
80#undef HAVE_GETTIMEOFDAY
81/* Define if you have atexit */
82#undef HAVE_ATEXIT
83/* Define if you have bcopy, bzero and bcmp
84   Linux needs that define! */
85#undef HAVE_BCOPY
86/* Define if sprintf does not return number of printed chars */
87#undef BSD_SPRINTF
88/* define if you have explicit C++ constructors */
89#undef HAVE_EXPLICIT_CONSTR
90/* Define if you have the getcwd function.  */
91#undef HAVE_GETCWD
92/* Define if you have the getwd function.  */
93#undef HAVE_GETWD
94/* Define if you have snprintf */
95#undef HAVE_VSNPRINTF
96/* Define if you have sbrk */
97#undef HAVE_SBRK
98/* Define if you have readlink */
99#undef HAVE_READLINK
100/* Define if you have usleep */
101#undef HAVE_USLEEP
102/* Define if you have sleep */
103#undef HAVE_SLEEP
104/* Define if you have setenv */
105#undef HAVE_SETENV
106/* Define if you have petpwnam */
107#undef HAVE_GETPWNAM
108/* Define sizeof(char) */
109#define SIZEOF_CHAR 1
110/* Define sizeof(short) */
111#define SIZEOF_SHORT 2
112/* Define sizeof(int) */
113#define SIZEOF_INT 4
114/* Define sizeof(long) */
115#define SIZEOF_LONG 4
116/* Define sizeof(void*) */
117#define SIZEOF_VOIDP 4
118/* Define sizeof(double) */
119#define SIZEOF_DOUBLE 8
120/* Define if your integer format is big endian */
121#undef WORDS_BIGENDIAN
122/* Define the type of the exponents to be used in monomials */
123#define EXPONENT_TYPE short
124/* Define the size of exponent */
125#define SIZEOF_EXPONENT SIZEOF_SHORT
126/* Define major version of Singular -- should be set in ../configure.in!!!*/
127#define SINGULAR_MAJOR_VERSION 0
128/* Define minor version of Singular -- should be set in ../configure.in!!! */
129#define SINGULAR_MINOR_VERSION 0
130/* Define sub version of Singular -- should be set in ../configure.in!!! */
131#define SINGULAR_SUB_VERSION 0
132/* Define version as a string */
133#define S_VERSION1 ""
134/* Define version date as a string */
135#define S_VERSION2 ""
136/* Define uname identifier as a string */
137#define S_UNAME ""
138/* Absolute pathname of root directory of Singular source */
139#define S_ROOT_DIR ""
140/* Define if our gmalloc is to be used */
141#undef HAVE_GMALLOC
142/* Define pagesize of your system */
143#define SIZE_OF_SYSTEM_PAGE 4096
144/* size of page as we can use it */
145#define SIZE_OF_PAGE SIZE_OF_SYSTEM_PAGE
146/* valloc routine which returns chunk of SIZE_OF_PAGE */
147#define PALLOC malloc
148#define PFREE  free
149/* define if you have the MTRACK utilities (only on linux/elf) */
150#undef HAVE_MTRACK
151
152/*******************************************************************
153 * Defines which are not set by configure
154 ******************************************************************/
155/* define to use the dynamic linking of readline in non-distributions builds */
156/* #undef USE_STATIC_RL */
157
158/* Default value for timer resolution in ticks per second */
159/* set to 10 for resolution of tenth of a second, etc */
160#define TIMER_RESOLUTION 1
161
162/* Undefine to disable the quote/eval of expressions */
163#define SIQ 1
164
165/* Define to enable TCL interface */
166#undef HAVE_TCL
167
168/* Undefine to disable Gerhard's and Wilfried's fast and dirty std computations */
169#define FAST_AND_DIRTY
170#ifdef __MWERKS__
171/* includes for Metrowerks */
172#include "mod2.mwerks.h"
173#else
174/* works around a quirk in the generation of parser tables */
175#define INIT_BUG
176#endif
177
178/* linear algebra extensions from pcv.h/pcv.cc */
179#define HAVE_PCV 1
180
181/* Define to use old mechanismen for saving currRing with procedures
182 * Does not work with HAVE_NAMESPACES enabled
183 */
184#undef USE_IILOCALRING
185
186/* Define to use new namespaces techniks */
187#undef HAVE_NAMESPACES
188
189/* Define to enable dynamic module code */
190#undef HAVE_DYNAMIC_LOADING
191
192/* Define to use scanner when loading libraries */
193#define HAVE_LIBPARSER
194
195/*#define PROFILING*/
196#ifdef PROFILING
197#define PROFILER ,0,0
198#else
199#define PROFILER
200#endif
201
202/* Define to use gmp for rational arithmetic */
203#define HAVE_GMP
204
205/*******************************************************************
206 * Evaluate the set defines
207 ******************************************************************/
208/* dynamic readline or readline ? */
209#ifdef HAVE_DL
210  #if !defined(USE_STATIC_RL)
211    #define HAVE_DYN_RL
212  #endif
213#endif
214
215/* FGLM needs factory */
216#ifdef HAVE_FACTORY
217#define HAVE_FGLM
218#endif
219
220/* Define if you want fglm for homogeneous case */
221#ifdef HAVE_FGLM
222#undef HAVE_FGLM_HOME
223#endif
224
225/* Spectrum needs GMP */
226#ifdef HAVE_GMP
227/* #define HAVE_SPECTRUM */
228#endif
229
230/* Undefine to disable real time measurments  */
231#ifdef HAVE_GETTIMEOFDAY
232#if ! defined(__MWERKS__) && ! defined(MSDOS)
233#define HAVE_RTIMER
234#else
235#undef HAVE_RTIMER
236#endif
237#endif
238
239#if SIZEOF_VOIDP == 8
240/* SIZEOF_LONG == SIZEOF_VOIDP is guaranteed by configure */
241#define ALIGN_8
242#define LOG_SIZEOF_LONG  3
243#define LOG_SIZEOF_VOIDP 3
244#else
245#define LOG_SIZEOF_LONG  2
246#define LOG_SIZEOF_VOIDP 2
247#endif
248
249#ifndef CHAR_BIT
250#define CHAR_BIT 8
251#endif
252
253#define BIT_SIZEOF_LONG CHAR_BIT*SIZEOF_LONG
254
255#define SINGULAR_VERSION (SINGULAR_MAJOR_VERSION*1000 + SINGULAR_MINOR_VERSION*100 + SINGULAR_SUB_VERSION)
256
257#if SIZEOF_EXPONENT == 1
258#define MAX_EXPONENT 0x7f
259#define MAX_COMPONENT 0xff
260#elif SIZEOF_EXPONENT == 2
261#define MAX_EXPONENT 0x7fff
262#define MAX_COMPONENT 0xffff
263#else /* SIZEOF_EXPONENT == 4 */
264#define MAX_EXPONENT 0x7fffffff
265#define MAX_COMPONENT 0xffffffff
266#endif
267
268/*******************************************************************
269 * Miscellanous Defines
270 ******************************************************************/
271/* define MM_COUNT to enable "memory(0)" (resp. memory(1))*/
272#define MM_COUNT 1
273
274
275#ifndef HAVE_LIBPARSER
276#  undef YYLPDEBUG
277#else
278#  define YYLPDEBUG 1
279#endif
280
281#ifndef FALSE
282#define FALSE       0
283#endif
284
285#ifndef TRUE
286#define TRUE        1
287#endif
288
289#ifndef NULL
290#define NULL        (0)
291#endif
292
293#ifndef SEEK_END
294#define SEEK_END 2
295#endif
296
297#ifndef SEEK_SET
298#define SEEK_SET 0
299#endif
300
301#define HALT() m2_end(2)
302
303#define memcpy4 memcpy
304
305/* define OLD_RES for res/sres/mres(i,j,k) */
306#undef OLD_RES
307
308/* the maximal ascii length of an int number + 1 = 11 for 32 bit int */
309#define MAX_INT_LEN 11
310#define MAX_INT_VAL 0x7fffffff
311extern int pShortOut;
312
313#ifdef DO_PROFILE
314/* define to enable explicit profiling of some crucial inline
315 * routines and defines  */
316#undef DO_DEEP_PROFILE
317#endif
318
319#define buildin_rand 1
320
321/* define to enable assume */
322#ifndef HAVE_ASSUME
323#undef HAVE_ASSUME
324#endif
325
326/* set to 0 to disable aso memory mamagent */
327#ifndef HAVE_ASO
328#define HAVE_ASO 0
329#endif
330#if defined(HAVE_ASO) && HAVE_ASO == 1
331/* define to enable ASO debugging */
332#undef ASO_DEBUG
333#endif
334
335/*******************************************************************
336 * DEBUG OPTIONS
337 * -- only significant for for compiling without -DNDEBUG
338 * -- you better know what your are doing, if you touch this
339 ******************************************************************/
340#ifndef NDEBUG
341
342/* undefine to disable assume -- should normally be defined for NDEBUG */
343#define HAVE_ASSUME
344
345/* undef MDEBUG to disable memory checks
346 *
347 * define MDEBUG to
348 * -1 to enable MTRACK, but to skip memory checks
349 * 0 to enable basic memory checks (at least on each alloc/free)
350 * 1 for addtl. containment checks in free/alloc list for each memory check
351 * 2 for addtl. checks of entire free/alloc list at each memory check
352 * 3 for addtl. checks of all heaps at each memory check
353 * NOTE: For MDEBUG > 1, it gets very slow
354 * You can control MDEBUG at run-time by setting the value of the
355 * variable mm_MDEBUG (defined in mmcheck.c) to the appropriate value.
356 */
357#define MDEBUG 0
358
359/* undef HEAP_DEBUG to disable heap checks
360 *
361 * define HEAP_DEBUG to
362 * 0 to enable basic heap addr checks (at least on each alloc/free)
363 * 1 for addtl. containment checks in free/alloc list of heap
364 * 2 for addtl. check of entire  heap at each heap addr check
365 * NOTE: For HEAP_DEBUG > 1 on, it gets very slow
366 * You can control HEAP_DEBUG at run-time by setting the value of the
367 * variable mm_HEAP_DEBUG (defined in mmheap.c) to the appropriate value.
368 */
369/* #define HEAP_DEBUG 0 */
370
371/* define PAGE_DEBUG for page accesses -- never re-uses freed pages */
372#ifndef PAGE_DEBUG
373#undef PAGE_DEBUG
374#endif
375
376/* undef PDEBUG to disable checks of polys
377 *
378 * define PDEBUG to
379 * 0 for basic, explicitely requested tests
380 * 1 for tests in pProcs
381 * 2 for low-level tests (Exponent access, primitive monom operations)
382 * NOTE: for PDEBUG > 1 it gets very slow
383 *       You can locally enable tests in pProcs by setting the
384 *       define at the beginning of pProcs.cc
385 */
386#define PDEBUG 0
387
388/* undef KDEBUG for checck of data during std computations
389 *
390 * define KDEBUG to
391 * 0 for basic tests
392 * 1 for tests in kSpoly
393 * NOTE: You can locally enable tests in kspoly by setting the
394 *       define at the beginning of kspoly.cc
395 */
396#define KDEBUG 0
397
398/* define LDEBUG checking numbers, undefine otherwise */
399#define LDEBUG
400/* define RDEBUG checking rings (together with TRACE=9) */
401#define RDEBUG
402/* define TEST for non time critical tests, undefine otherwise */
403#define TEST
404/* define MLIST for printing block of used memory on exit */
405#define MLIST 1
406
407#ifdef HAVE_MTRACK
408/* define MTRACK for allowing to keep track of Alloc/Free with a backtrace */
409/* works only under linux/elf */
410#define MTRACK
411/* define to enable stack storing of free calls, as well */
412#undef MTRACK_FREE
413
414#endif /* !NDEBUG  */
415
416
417/* #define PAGE_TEST */
418
419/* define YYDEBUG 1 for debugging bison texts, 0 otherwise */
420#define YYDEBUG 1
421
422/* Undefine to disable debugging of MP stuff */
423#ifdef HAVE_MPSR
424#define MPSR_DEBUG
425#endif
426
427/* PDEBUG requires MDEBUG */
428#ifdef PDEBUG
429#ifndef MDEBUG
430#define MDEBUG 0
431#endif
432#endif
433
434#ifdef TEST
435#ifndef buildin_rand
436#define buildin_rand 1
437#endif
438#endif
439
440/* define SPECTRUM_DEBUG and SPECTRUM_PRINT for debugging the spectrum code */
441/* define SPECTRUM_IOSTREAM to use C++ iostream for error messages          */
442
443/* #define SPECTRUM_DEBUG */
444/* #define SPECTRUM_PRINT */
445#undef  SPECTRUM_IOSTREAM
446
447#ifdef  SPECTRUM_DEBUG
448#define MULTICNT_DEBUG
449#define GMPRAT_DEBUG
450#define KMATRIX_DEBUG
451#define SPLIST_DEBUG
452#define NPOLYGON_DEBUG
453#define SEMIC_DEBUG
454#endif
455
456#ifdef  SPECTRUM_PRINT
457#define MULTICNT_PRINT
458#define GMPRAT_PRINT
459#define KMATRIX_PRINT
460#define SPLIST_PRINT
461#define NPOLYGON_PRINT
462#define SEMIC_PRINT
463#endif
464
465#ifdef  SPECTRUM_IOSTREAM
466#define MULTICNT_IOSTREAM
467#define GMPRAT_IOSTREAM
468#define KMATRIX_IOSTREAM
469#define SPLIST_IOSTREAM
470#define NPOLYGON_IOSTREAM
471#define SEMIC_IOSTREAM
472#endif
473
474
475#else /* not NDEBUG **************************************************** */
476
477/* define YYDEBUG 1 for debugging bison texts, 0 otherwise */
478#define YYDEBUG 0
479
480#endif /* not NDEBUG */
481
482/* MLIST requires MDEBUG */
483#ifdef MLIST
484#ifndef MDEBUG
485#define MDEBUG 0
486#endif
487#endif
488
489/* MTRACK requires MDEBUG and MLIST*/
490#ifdef MTRACK
491#ifndef MDEBUG
492#define MDEBUG -1
493#endif
494#ifndef MLIST
495#define MLIST
496#endif
497#endif
498
499
500#ifdef HAVE_DYNAMIC_LOADING
501#   define HAVE_NAMESPACES 1
502#endif /* HAVE_DYNAMIC_LOADING */
503#ifdef HAVE_NAMESPACES
504#  undef USE_IILOCALRING
505#endif
506
507/*******************************************************************
508 *
509 * assume(x) -- a handy macro for assumptions
510 *
511 ******************************************************************/
512
513#ifndef HAVE_ASSUME
514#define assume(x) ((void*) 0)
515#define r_assume(x) ((void*) 0)
516#else /* ! HAVE_ASSUME */
517
518#ifdef __cplusplus
519extern "C" {
520#endif
521/* Set a breakpoint on this function */
522extern void assume_violation(char* file, int line);
523#ifdef __cplusplus
524}
525#endif
526
527
528#define assume(x)   _assume(x, __FILE__, __LINE__)
529#define r_assume(x) _r_assume(x, __FILE__, __LINE__)
530
531#define _assume(x, f, l)                        \
532do                                              \
533{                                               \
534  if (! (x))                                    \
535  {                                             \
536    assume_violation(f, l);                     \
537  }                                             \
538}                                               \
539while (0)
540
541#define _r_assume(x, f, l)                      \
542do                                              \
543{                                               \
544  if (! (x))                                    \
545  {                                             \
546    assume_violation(f, l);                     \
547    return 0;                                   \
548  }                                             \
549}                                               \
550while (0)
551#endif /* HAVE_ASSUME */
552
553#endif /* MOD2_H  */
Note: See TracBrowser for help on using the repository browser.