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

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