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

spielwiese
Last change on this file since dc0898 was dc0898, checked in by Olaf Bachmann <obachman@…>, 23 years ago
* solved system problem under HPUX git-svn-id: file:///usr/local/Singular/svn/trunk@4502 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 14.8 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.83 2000-08-02 13:40:33 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/* Under HPUX 9, system(...) returns -1 if SIGCHLD does not equal
275   SIG_DFL. However, if it stays at SIG_DFL we get zombie processes
276   for terminated childs generated by fork. Therefors some special treatment
277   is necessary */
278#ifdef HPUX_9
279#include <stdlib.h>
280#define system hpux9_system
281#ifdef __cplusplus
282extern "C" {
283#endif
284int hpux9_system(const char* system);
285#ifdef __cplusplus
286}
287#endif
288#endif
289
290#ifndef HAVE_LIBPARSER
291#  undef YYLPDEBUG
292#else
293#  define YYLPDEBUG 1
294#endif
295
296#ifndef FALSE
297#define FALSE       0
298#endif
299
300#ifndef TRUE
301#define TRUE        1
302#endif
303
304#ifndef NULL
305#define NULL        (0)
306#endif
307
308#ifndef SEEK_END
309#define SEEK_END 2
310#endif
311
312#ifndef SEEK_SET
313#define SEEK_SET 0
314#endif
315
316#define HALT() m2_end(2)
317
318#define memcpy4 memcpy
319
320/* define OLD_RES for res/sres/mres(i,j,k) */
321#undef OLD_RES
322
323/* the maximal ascii length of an int number + 1 = 11 for 32 bit int */
324#define MAX_INT_LEN 11
325#define MAX_INT_VAL 0x7fffffff
326extern int pShortOut;
327
328#ifdef DO_PROFILE
329/* define to enable explicit profiling of some crucial inline
330 * routines and defines  */
331#undef DO_DEEP_PROFILE
332#endif
333
334#define buildin_rand 1
335
336/* define to enable assume */
337#ifndef HAVE_ASSUME
338#undef HAVE_ASSUME
339#endif
340
341/* set to 0 to disable aso memory mamagent */
342#ifndef HAVE_ASO
343#define HAVE_ASO 0
344#endif
345#if defined(HAVE_ASO) && HAVE_ASO == 1
346/* define to enable ASO debugging */
347#undef ASO_DEBUG
348#endif
349
350/*******************************************************************
351 * DEBUG OPTIONS
352 * -- only significant for for compiling without -DNDEBUG
353 * -- you better know what your are doing, if you touch this
354 ******************************************************************/
355#ifndef NDEBUG
356
357/* undefine to disable assume -- should normally be defined for NDEBUG */
358#define HAVE_ASSUME
359
360/* undef MDEBUG to disable memory checks
361 *
362 * define MDEBUG to
363 * -1 to enable MTRACK, but to skip memory checks
364 * 0 to enable basic memory checks (at least on each alloc/free)
365 * 1 for addtl. containment checks in free/alloc list for each memory check
366 * 2 for addtl. checks of entire free/alloc list at each memory check
367 * 3 for addtl. checks of all heaps at each memory check
368 * NOTE: For MDEBUG > 1, it gets very slow
369 * You can control MDEBUG at run-time by setting the value of the
370 * variable mm_MDEBUG (defined in mmcheck.c) to the appropriate value.
371 */
372#define MDEBUG 0
373
374/* undef HEAP_DEBUG to disable heap checks
375 *
376 * define HEAP_DEBUG to
377 * 0 to enable basic heap addr checks (at least on each alloc/free)
378 * 1 for addtl. containment checks in free/alloc list of heap
379 * 2 for addtl. check of entire  heap at each heap addr check
380 * NOTE: For HEAP_DEBUG > 1 on, it gets very slow
381 * You can control HEAP_DEBUG at run-time by setting the value of the
382 * variable mm_HEAP_DEBUG (defined in mmheap.c) to the appropriate value.
383 */
384/* #define HEAP_DEBUG 0 */
385
386/* define PAGE_DEBUG for page accesses -- never re-uses freed pages */
387#ifndef PAGE_DEBUG
388#undef PAGE_DEBUG
389#endif
390
391/* undef PDEBUG to disable checks of polys
392 *
393 * define PDEBUG to
394 * 0 for basic, explicitely requested tests
395 * 1 for tests in pProcs
396 * 2 for low-level tests (Exponent access, primitive monom operations)
397 * NOTE: for PDEBUG > 1 it gets very slow
398 *       You can locally enable tests in pProcs by setting the
399 *       define at the beginning of pProcs.cc
400 */
401#define PDEBUG 0
402
403/* undef KDEBUG for checck of data during std computations
404 *
405 * define KDEBUG to
406 * 0 for basic tests
407 * 1 for tests in kSpoly
408 * NOTE: You can locally enable tests in kspoly by setting the
409 *       define at the beginning of kspoly.cc
410 */
411#define KDEBUG 0
412
413/* define LDEBUG checking numbers, undefine otherwise */
414#define LDEBUG
415/* define RDEBUG checking rings (together with TRACE=9) */
416#define RDEBUG
417/* define TEST for non time critical tests, undefine otherwise */
418#define TEST
419/* define MLIST for printing block of used memory on exit */
420#define MLIST 1
421
422#ifdef HAVE_MTRACK
423/* define MTRACK for allowing to keep track of Alloc/Free with a backtrace */
424/* works only under linux/elf */
425#define MTRACK
426/* define to enable stack storing of free calls, as well */
427#undef MTRACK_FREE
428
429#endif /* !NDEBUG  */
430
431
432/* #define PAGE_TEST */
433
434/* define YYDEBUG 1 for debugging bison texts, 0 otherwise */
435#define YYDEBUG 1
436
437/* Undefine to disable debugging of MP stuff */
438#ifdef HAVE_MPSR
439#define MPSR_DEBUG
440#endif
441
442/* PDEBUG requires MDEBUG */
443#ifdef PDEBUG
444#ifndef MDEBUG
445#define MDEBUG 0
446#endif
447#endif
448
449#ifdef TEST
450#ifndef buildin_rand
451#define buildin_rand 1
452#endif
453#endif
454
455/* define SPECTRUM_DEBUG and SPECTRUM_PRINT for debugging the spectrum code */
456/* define SPECTRUM_IOSTREAM to use C++ iostream for error messages          */
457
458/* #define SPECTRUM_DEBUG */
459/* #define SPECTRUM_PRINT */
460#undef  SPECTRUM_IOSTREAM
461
462#ifdef  SPECTRUM_DEBUG
463#define MULTICNT_DEBUG
464#define GMPRAT_DEBUG
465#define KMATRIX_DEBUG
466#define SPLIST_DEBUG
467#define NPOLYGON_DEBUG
468#define SEMIC_DEBUG
469#endif
470
471#ifdef  SPECTRUM_PRINT
472#define MULTICNT_PRINT
473#define GMPRAT_PRINT
474#define KMATRIX_PRINT
475#define SPLIST_PRINT
476#define NPOLYGON_PRINT
477#define SEMIC_PRINT
478#endif
479
480#ifdef  SPECTRUM_IOSTREAM
481#define MULTICNT_IOSTREAM
482#define GMPRAT_IOSTREAM
483#define KMATRIX_IOSTREAM
484#define SPLIST_IOSTREAM
485#define NPOLYGON_IOSTREAM
486#define SEMIC_IOSTREAM
487#endif
488
489
490#else /* not NDEBUG **************************************************** */
491
492/* define YYDEBUG 1 for debugging bison texts, 0 otherwise */
493#define YYDEBUG 0
494
495#endif /* not NDEBUG */
496
497/* MLIST requires MDEBUG */
498#ifdef MLIST
499#ifndef MDEBUG
500#define MDEBUG 0
501#endif
502#endif
503
504/* MTRACK requires MDEBUG and MLIST*/
505#ifdef MTRACK
506#ifndef MDEBUG
507#define MDEBUG -1
508#endif
509#ifndef MLIST
510#define MLIST
511#endif
512#endif
513
514
515#ifdef HAVE_DYNAMIC_LOADING
516#   define HAVE_NAMESPACES 1
517#endif /* HAVE_DYNAMIC_LOADING */
518#ifdef HAVE_NAMESPACES
519#  undef USE_IILOCALRING
520#endif
521
522/*******************************************************************
523 *
524 * assume(x) -- a handy macro for assumptions
525 *
526 ******************************************************************/
527
528#ifndef HAVE_ASSUME
529#define assume(x) ((void*) 0)
530#define r_assume(x) ((void*) 0)
531#else /* ! HAVE_ASSUME */
532
533#ifdef __cplusplus
534extern "C" {
535#endif
536/* Set a breakpoint on this function */
537extern void assume_violation(char* file, int line);
538#ifdef __cplusplus
539}
540#endif
541
542
543#define assume(x)   _assume(x, __FILE__, __LINE__)
544#define r_assume(x) _r_assume(x, __FILE__, __LINE__)
545
546#define _assume(x, f, l)                        \
547do                                              \
548{                                               \
549  if (! (x))                                    \
550  {                                             \
551    assume_violation(f, l);                     \
552  }                                             \
553}                                               \
554while (0)
555
556#define _r_assume(x, f, l)                      \
557do                                              \
558{                                               \
559  if (! (x))                                    \
560  {                                             \
561    assume_violation(f, l);                     \
562    return 0;                                   \
563  }                                             \
564}                                               \
565while (0)
566#endif /* HAVE_ASSUME */
567
568#endif /* MOD2_H  */
Note: See TracBrowser for help on using the repository browser.