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

spielwiese
Last change on this file since d4490e4 was d4490e4, checked in by Hans Schoenemann <hannes@…>, 14 years ago
3-1-1-1 git-svn-id: file:///usr/local/Singular/svn/trunk@12774 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 18.6 KB
RevLine 
[a70441f]1/* -*-c++-*- */
[5f9072]2/*******************************************************************
3 *  Computer Algebra System SINGULAR
4 *
5 *  mod2.h: Main configuration file for Singular
6 *          DO NOT EDIT!
7 *
[341696]8 *  Version: $Id$
[5f9072]9 *******************************************************************/
10#ifndef MOD2_H
11#define MOD2_H
12
13/*******************************************************************
[a693ce]14 * Defines which are set by configure
[5f9072]15 ******************************************************************/
[f413ec5]16/* Define to use dynamic linking */
17#undef HAVE_DL
[833e11]18/* Define to use readline lib for fancy display: configure result */
19#undef HAVE_LIBREADLINE
[7e5a38]20/* Define to use static readline lib for fancy display */
[5f9072]21#undef HAVE_READLINE
[7e5a38]22/* define to use dynamic version of readline lib */
23#undef HAVE_DYN_RL
[5f9072]24/* Define to have dbm links */
25#undef HAVE_DBM
26/* Define to have MP links */
27#undef HAVE_MPSR
28/* Define to have factory functionality added */
29#undef HAVE_FACTORY
30/* Define if you have stdc headers */
31#undef STDC_HEADERS
[b60fb4]32/* Define if you have asm/sigcontext.h */
33#undef HAVE_ASM_SIGCONTEXT_H
[5f9072]34/* Define if you have sys/file.h */
35#undef HAVE_SYS_FILE_H
[64c6d1]36/* Define if you have sys/stat.h */
37#undef HAVE_SYS_STAT_H
[1caa72]38/* Define if you have sys/param.h */
39#undef HAVE_SYS_PARAM_H
40/* Define if you have sys/file.h */
41#undef HAVE_SYS_TYPES_H
[5f9072]42/* Define if you have sys/ioctl.h */
43#undef HAVE_SYS_IOCTL_H
44/* Define if you have sys/time.h */
45#undef HAVE_SYS_TIME_H
[b85a6c]46/* Define if you have sys/times.h */
47#undef HAVE_SYS_TIMES_H
[3037783]48/* io header: */
49/* Define if you have termcap.h */
50#undef HAVE_TERMCAP_H
51/* Define if you have termios.h */
52#undef HAVE_TERMIOS_H
[bd337e]53/* Define if you have term.h */
54#undef HAVE_TERM_H
[7d52ae]55/* Define if you have readline/history.h */
56#undef HAVE_READLINE_HISTORY_H
[3a8afb6]57/* Define if readline/readline.h is ok */
58#undef READLINE_READLINE_H_OK
[5f9072]59/* Define if time.h and sys/time.h can be included at the same time */
60#undef TIME_WITH_SYS_TIME
61/* Define if you have alloca.h */
62#undef HAVE_ALLOCA_H
[1caa72]63/* Define if you have pwd.h */
64#undef HAVE_PWD_H
[52a5e8]65/* Define if you have unistd.h */
66#undef HAVE_UNISTD_H
[138f0c]67/* define if you have malloc.h */
[52a5e8]68#undef HAVE_MALLOC_H
[138f0c]69/* define if you have pwd.h*/
70#undef HAVE_PWD_H
[5f9072]71/* Define if you have alloca */
72#undef HAVE_ALLOCA
73/* Define if you have getpagesize */
74#undef GETPAGESIZE
75/* Define if you have vprintf */
76#undef HAVE_VPRINTF
77/* Define if you have gettimeofday */
78#undef HAVE_GETTIMEOFDAY
79/* Define if you have atexit */
80#undef HAVE_ATEXIT
[a693ce]81/* Define if you have bcopy, bzero and bcmp
[2c3da6]82   Linux needs that define! */
83#undef HAVE_BCOPY
[5f9072]84/* Define if sprintf does not return number of printed chars */
85#undef BSD_SPRINTF
[c7db8e]86/* define if you have explicit C++ constructors */
87#undef HAVE_EXPLICIT_CONSTR
[1caa72]88/* Define if you have the getcwd function.  */
89#undef HAVE_GETCWD
90/* Define if you have the getwd function.  */
91#undef HAVE_GETWD
[a79a128]92/* Define if you have snprintf */
93#undef HAVE_VSNPRINTF
[a8bce04]94/* Define if you have readlink */
95#undef HAVE_READLINK
[45f7bf]96/* Define if you have usleep */
97#undef HAVE_USLEEP
[3bb3e6a]98/* Define if you have sleep */
99#undef HAVE_SLEEP
[9c35ef]100/* Define if you have setenv */
101#undef HAVE_SETENV
[138f0c]102/* Define if you have petpwnam */
103#undef HAVE_GETPWNAM
[9d72fe]104/* Define if you have popen */
105#undef HAVE_POPEN
[4094088]106/* Define if you have sysconf */
107#undef HAVE_SYSCONF
[206aed]108/* Define if you have siginterrupt (BSD4.3) */
109#undef HAVE_SIGINTERRUPT
[1cddd8]110/* define for boost includes and lib */
[f5da37]111//////////////////////// #undef HAVE_BOOST_DYNAMIC_BITSET_HPP
[ea6657f]112/* define for std:vector includes */
113#undef USE_STDVECBOOL
[51c163]114/* Define sizeof(char) */
115#define SIZEOF_CHAR 1
116/* Define sizeof(short) */
117#define SIZEOF_SHORT 2
118/* Define sizeof(int) */
119#define SIZEOF_INT 4
120/* Define sizeof(long) */
121#define SIZEOF_LONG 4
[5f9072]122/* Define sizeof(void*) */
123#define SIZEOF_VOIDP 4
[fff984]124/* Define sizeof(double) */
125#define SIZEOF_DOUBLE 8
[51c163]126/* Define if your integer format is big endian */
127#undef WORDS_BIGENDIAN
[64c6d1]128/* Define major version of Singular -- should be set in ../configure.in!!!*/
[cb0e67b]129#define SINGULAR_MAJOR_VERSION 0
[64c6d1]130/* Define minor version of Singular -- should be set in ../configure.in!!! */
[cb0e67b]131#define SINGULAR_MINOR_VERSION 0
[64c6d1]132/* Define sub version of Singular -- should be set in ../configure.in!!! */
[cb0e67b]133#define SINGULAR_SUB_VERSION 0
[5f9072]134/* Define version as a string */
135#define S_VERSION1 ""
136/* Define version date as a string */
137#define S_VERSION2 ""
[72f950]138/* Define uname identifier as a string */
139#define S_UNAME ""
[9c35ef]140/* Absolute pathname of root directory of Singular source */
141#define S_ROOT_DIR ""
[814c11]142/* Define to enable dynamic module code */
143#undef HAVE_DYNAMIC_LOADING
144/* Define to enable plural */
145#undef HAVE_PLURAL
[9e9dbc]146/* Define to enable ratGB/ ratGRING */
147#undef HAVE_RATGRING
[037df4]148/* Define to enable shiftbba */
149#undef HAVE_SHIFTBBA
[696db9]150/* Define to enable libsvd */
151#undef HAVE_SVD
[7afec5]152/* CPU type: i[3456]86: */
153#undef SI_CPU_I386
154/* CPU type: sparc: */
155#undef SI_CPU_SPARC
156/* CPU type: ppc: */
157#undef SI_CPU_PPC
158/* CPU type: IA64: */
159#undef SI_CPU_IA64
160/* CPU type: x86_64: */
161#undef SI_CPU_X86_64
[5f9072]162
163/*******************************************************************
164 * Defines which are not set by configure
165 ******************************************************************/
[f413ec5]166
[5f9072]167/* Default value for timer resolution in ticks per second */
168/* set to 10 for resolution of tenth of a second, etc */
169#define TIMER_RESOLUTION 1
[f413ec5]170
[5f9072]171/* Undefine to disable the quote/eval of expressions */
172#define SIQ 1
[f413ec5]173
[5f9072]174/* Define to enable TCL interface */
[49c4ae]175#undef HAVE_TCL
[f413ec5]176
[dc87554]177/* Undefine to disable Gerhard's and Wilfried's fast and dirty std computations */
[5f9072]178#define FAST_AND_DIRTY
179
[c3f0f3]180/* eigenvalues */
[670d92]181#ifndef HAVE_DYNAMIC_LOADING
[c3f0f3]182#define HAVE_EIGENVAL 1
183
[bb0153]184/* Gauss-Manin system */
185#define HAVE_GMS 1
[670d92]186#endif
[bb0153]187
[057751]188/* linear algebra extensions from pcv.h/pcv.cc */
189#define HAVE_PCV 1
190
[b546c0]191/* procedures to compute groebner bases with the f5 implementation */
192/* still testing */
[c1a5fd]193#undef HAVE_F5
[586b38]194
195/* procedures to compute groebner bases with the f5c implementation */
196/* still testing */
[5979b5]197#undef HAVE_F5C
[797ff9]198
[b4e3253]199/* letterplace gb:*/
[4b00ef]200#define HAVE_SHIFTBBA 1
[b546c0]201
202/* rings as coefficients */
203#define HAVE_RINGS
204
205/* procedures to compute with units */
[4abea21]206#define HAVE_UNITS
[7e67559]207
[77ff8e]208/* Define to use old mechanismen for saving currRing with procedures
209 */
210#undef USE_IILOCALRING
211
[6a51ef]212
213/* Define to use scanner when loading libraries */
214#define HAVE_LIBPARSER
215
[2b3f23]216/*#define PROFILING*/
[670667]217#ifdef PROFILING
[2b3f23]218#define PROFILER ,0,0
[670667]219#else
[a693ce]220#define PROFILER
[670667]221#endif
222
[5f9072]223/*******************************************************************
224 * Evaluate the set defines
225 ******************************************************************/
226/* FGLM needs factory */
227#ifdef HAVE_FACTORY
228#define HAVE_FGLM
229#endif
230
[223114]231/* Define if you want fglm for homogeneous case */
232#ifdef HAVE_FGLM
233#undef HAVE_FGLM_HOME
234#endif
235
[7885020]236/* Spectrum needs GMP */
[d3bf098]237#define HAVE_SPECTRUM 1
[7885020]238
[5f9072]239/* Undefine to disable real time measurments  */
240#ifdef HAVE_GETTIMEOFDAY
241#define HAVE_RTIMER
[3ebcbd]242#endif
[5f9072]243
244#if SIZEOF_VOIDP == 8
[b7b08c]245/* SIZEOF_LONG == SIZEOF_VOIDP is guaranteed by configure */
[5f9072]246#define ALIGN_8
[b7b08c]247#define LOG_SIZEOF_LONG  3
248#define LOG_SIZEOF_VOIDP 3
249#else
250#define LOG_SIZEOF_LONG  2
251#define LOG_SIZEOF_VOIDP 2
[5f9072]252#endif
253
[f62e786]254#ifndef CHAR_BIT
255#define CHAR_BIT 8
256#endif
257
258#define BIT_SIZEOF_LONG CHAR_BIT*SIZEOF_LONG
259
[d4490e4]260#define SINGULAR_PATCHLEVEL 1
[ea6657f]261#define SINGULAR_VERSION ((SINGULAR_MAJOR_VERSION*1000 + SINGULAR_MINOR_VERSION*100 + SINGULAR_SUB_VERSION*10)+SINGULAR_PATCHLEVEL)
[5f9072]262
263/*******************************************************************
[a693ce]264 * Miscellanous Defines
[5f9072]265 ******************************************************************/
[dc0898]266/* Under HPUX 9, system(...) returns -1 if SIGCHLD does not equal
267   SIG_DFL. However, if it stays at SIG_DFL we get zombie processes
268   for terminated childs generated by fork. Therefors some special treatment
269   is necessary */
270#ifdef HPUX_9
271#include <stdlib.h>
272#define system hpux9_system
273#ifdef __cplusplus
274extern "C" {
275#endif
276int hpux9_system(const char* system);
277#ifdef __cplusplus
278}
279#endif
280#endif
[faaef1]281
[6a51ef]282#ifndef HAVE_LIBPARSER
283#  undef YYLPDEBUG
284#else
[799ce1]285#  define YYLPDEBUG 1
[6a51ef]286#endif
287
[5f9072]288#ifndef FALSE
289#define FALSE       0
290#endif
291
292#ifndef TRUE
293#define TRUE        1
294#endif
295
296#ifndef NULL
297#define NULL        (0)
298#endif
299
300#ifndef SEEK_END
301#define SEEK_END 2
302#endif
303
304#ifndef SEEK_SET
305#define SEEK_SET 0
306#endif
307
308#define HALT() m2_end(2)
309
310#define memcpy4 memcpy
311
[faaef1]312/* define OLD_RES for res/sres/mres(i,j,k) */
[1dc07a7]313#undef OLD_RES
[faaef1]314
[5f9072]315/* the maximal ascii length of an int number + 1 = 11 for 32 bit int */
316#define MAX_INT_LEN 11
[82af190]317#define MAX_INT_VAL 0x7fffffff
[5f9072]318
[51c163]319#ifdef DO_PROFILE
[a693ce]320/* define to enable explicit profiling of some crucial inline
[f92fa13]321 * routines and defines  */
[7a5e7c]322#undef DO_DEEP_PROFILE
[51c163]323#endif
[f92fa13]324
[52a5e8]325#define buildin_rand 1
326
327/* define to enable assume */
328#ifndef HAVE_ASSUME
329#undef HAVE_ASSUME
330#endif
331
[6b32990]332/* define LINKAGE to "extern C" if compiling for shared libs */
333#ifndef LINKAGE
334#if defined(PIC)
335#define LINKAGE extern "C"
336#else
337#define LINKAGE
338#endif
339#endif
340
[b7b08c]341
[5f9072]342/*******************************************************************
343 * DEBUG OPTIONS
344 * -- only significant for for compiling without -DNDEBUG
345 * -- you better know what your are doing, if you touch this
346 ******************************************************************/
[a693ce]347#ifndef NDEBUG
[5f9072]348
[ec7aac]349/* undefine to enable inline */
350#define NO_INLINE
351
[52a5e8]352/* undefine to disable assume -- should normally be defined for NDEBUG */
353#define HAVE_ASSUME
354
[d14712]355/* undef PDEBUG to disable checks of polys
[cb66fa]356
357 define PDEBUG to
358  0 for enabling pTest
[512a2b]359  1 plus tests in Level 1 poly routines (operations on monomials)
360  2 plus tests in Level 2 poly routines (operations on single exponents)
[cb66fa]361 -- see also polys.h for more info
362
363 NOTE: you can set the value of PDEBUG on a per-file basis, before
[512a2b]364       including mod2.h, provided ! PDEBUG is defined in mod2.h E.g.:
[cb66fa]365
366       #define PDEBUG 2
367       #include "mod2.h"
368       ...
369
370       makes sure that all poly operations in your file are done with
371       PDEBUG == 2
[512a2b]372 To break after an error occured, set a debugger breakpoint on
373 dErrorBreak.
[cb66fa]374*/
[a6a239]375#ifndef PDEBUG
[d14712]376#define PDEBUG 0
[a6a239]377#endif
[d14712]378
[c232af]379/* define MDEBUG to enable memory checks */
380#define MDEBUG 0
381
382#ifdef MDEBUG
383/* If ! defined(OM_NDEBUG) and (defined(OM_TRACK) or defined(OM_CHECK)
384   then omDebug routines are used for memory allocation/free:
385
[512a2b]386   The omDebug routines are controlled by the values of OM_TRACK, OM_CHECK
387   and OM_KEEP.  There meaning is roughly as follows:
[c232af]388   OM_TRACK: strored with address                              : extra space
389     0     : no additional info is stored                      : 0
390     1     : file:line of location where address was allocated : 1 word
391     2     : plus backtrace of stack where adress was allocated: 6 words
392     3     : plus size/bin info and front-, and back padding   : 9 words
393     4     : plus file:line of location where adress was freed : 10 words
394     5     : plus backtrace of stack where adress was allocated: 15 words
395   OM_CHECK: checks done
396     0     : no checks
397     1     : constant-time checks: i.e. addr checks only
398     2     : plus linear-time checks and constant related bin check
399     3     : plus quadratic-time checks and linear-time related bin checks and
400             constant time all memory checks
401     4     : and so on
402     ==> for OM_CHECK >= 3 it gets rather slow
[512a2b]403   OM_KEEP:  determines whether addresses are really freed  (
404     0     : addresses are really freed
405     1     : addresses are only marked as free and not really freed.
[c232af]406
[512a2b]407   OM_CHECK, OM_TRACK, and OM_KEEP can be set on a per-file basis
408   (as can OM_NDEBUG),  e.g.:
[c232af]409     #define OM_CHECK 3
410     #define OM_TRACK 5
[512a2b]411     #define OM_KEEP  1
412     #include "mod2.h"
413     #include "omalloc.h"
[c232af]414   ensures that all memory allocs/free in this file are done with
[512a2b]415   OM_CHECK==3 and OM_TRACK==5, and that all addresses allocated/freed
416   in this file are only marked as free and never really freed.
[c232af]417 
[512a2b]418   To set OM_CHECK, OM_TRACK and OM_KEEP under dynamic scope, set
419   om_Opts.MinCheck, om_Opts.MinTrack to the respectiv values and
420   om_Opts.Keep to the number of addresses which are kept before they are
421   actually freed. E.g.:
422     int check=om_Opts.MinCheck, track=om_Opts.MinTrack, keep= m_OPts.Keep;
423     om_Opts.MinCheck = 3; om_Opts.MinTrack = 5; omOpts.Keep = LONG_MAX;
[c232af]424     ExternalRoutine();
[512a2b]425     om_Opts.MinCheck = check; omOpts.MinTrack = track; omOpts.Keep = keep;
[c232af]426   ensures that all calls omDebug routines  occuring during the computation of
[512a2b]427   ExternalRoutine() are done with OM_CHECK==3 and OM_TRACK==5, and
428   calls to omFree only mark addresses as free and not really free them.
[c232af]429
430   Furthermore, the value of OM_SING_KEEP (resp. om_Opts.Keep) specifies
[512a2b]431   how many addresses are kept before they are actually freed, independently
432   of the value of OM_KEEP.
433
434   Some tips on possible values of OM_TRACK, OM_CHECK, OM_KEEP:
435   + To find out about an address that has been freed twice, first locate the
436     file(s) where the error occured, and then at the beginning of these files:
437       #define OM_CHECK 3
438       #define OM_TRACK 5
439       #define OM_KEEP  1
440       #include "mod2.h"
441       #include "omalloc.h"
442     Under dynamic scope, do (e.g., from within the debugger):
443       om_Opts.MinCheck = 3; om_Opts.MinTrack = 5; omOpts.Keep = LONG_MAX;
[c232af]444   + to find out where "memory corruption" occured, increase value of
445     OM_CHECK - the higher this value is, the more consistency checks are
446     done (However a value > 3 checks the entire memory each time an omalloc
[cb66fa]447     routine is used!)
[c232af]448   
449   Some more tips on the usage of omalloc:
450   + omAlloc*, omRealloc*, omFree*, omCheck* omDebug* omTest* rotuines
451     assume that sizes are > 0 and pointers are != NULL
452   + omalloc*, omrealloc*, omfree* omcheck*, omdebug* omtest* routines allow
453     NULL pointers and sizes == 0
454   + You can safely use any free/realloc routine in combination with any alloc
455     routine (including the debug versions): E.g., an address allocated with
456     omAllocBin can be freed with omfree, or an adress allocated with
457     om(Debug)Alloc can be freed with omfree, or omFree, or omFreeSize, etc.
[cb66fa]458     However, keep in mind that the efficiency decreases from
[c232af]459     Bin over Size to General routines (i.e., omFreeBin is more efficient than
[512a2b]460     omFreeSize which is more efficient than omFree, likewise with the alloc
[c232af]461     routines).
[512a2b]462   + if OM_CHECK is undefined or 0, then all omCheck routines do nothing
463   + if OM_CHECK and OM_TRACK are both undefined (or 0), or if OM_NDEBUG is
464     defined, then the "real" alloc/realloc/free macros are used, and all
465     omTest, omDebug and omCheck routines are undefined
466   + to break after an omError occured within a debugger,
467     set a breakpoint on dErrorBreak
468   + to do checks from within the debugger, or to do checks with explicit
[ec7aac]469     check level, use omTest routines.
[c232af]470*/
471
[512a2b]472/* by default, store alloc info and file/line where addr was freed */
473#ifndef OM_TRACK
474#define OM_TRACK 4
475#endif
476/* only do constant-time memory checks */
477#ifndef OM_CHECK
[c232af]478#define OM_CHECK 1
[512a2b]479#endif
480/* Do actually free memory:
481   (be careful: if this is set, memory is never really freed,
482    but only marked as free) */
483#ifndef OM_KEEP
484#define OM_KEEP 0
485#endif
486/* but only after you have freed 1000 more addresses
487   (this is actually independent of the value of OM_KEEP and used
488   to initialize om_Opts.Keep) */
489#ifndef OM_SING_KEEP
[c232af]490#define OM_SING_KEEP 1000
[512a2b]491#endif
492
[c232af]493#endif /* MDEBUG */
494
495
496/* undef KDEBUG for check of data during std computations
[d14712]497 *
498 * define KDEBUG to
499 * 0 for basic tests
500 * 1 for tests in kSpoly
501 * NOTE: You can locally enable tests in kspoly by setting the
502 *       define at the beginning of kspoly.cc
503 */
504#define KDEBUG 0
[52a5e8]505
[5f9072]506/* define LDEBUG checking numbers, undefine otherwise */
[a693ce]507#define LDEBUG
[5f9072]508/* define RDEBUG checking rings (together with TRACE=9) */
[a693ce]509#define RDEBUG
[5f9072]510/* define TEST for non time critical tests, undefine otherwise */
511#define TEST
[fff984]512
[5f9072]513/* #define PAGE_TEST */
514
[6b6b2f9]515/* define YYDEBUG 1 for debugging bison texts, 0 otherwise */
[a693ce]516#define YYDEBUG 1
517
[5f9072]518/* Undefine to disable debugging of MP stuff */
519#ifdef HAVE_MPSR
[a693ce]520#define MPSR_DEBUG
[5f9072]521#endif
522
523
524#ifdef TEST
525#ifndef buildin_rand
526#define buildin_rand 1
527#endif
528#endif
529
[7885020]530/* define SPECTRUM_DEBUG and SPECTRUM_PRINT for debugging the spectrum code */
531/* define SPECTRUM_IOSTREAM to use C++ iostream for error messages          */
532
533/* #define SPECTRUM_DEBUG */
534/* #define SPECTRUM_PRINT */
535#undef  SPECTRUM_IOSTREAM
536
537#ifdef  SPECTRUM_DEBUG
538#define MULTICNT_DEBUG
539#define GMPRAT_DEBUG
540#define KMATRIX_DEBUG
541#define SPLIST_DEBUG
542#define NPOLYGON_DEBUG
543#define SEMIC_DEBUG
544#endif
545
546#ifdef  SPECTRUM_PRINT
547#define MULTICNT_PRINT
548#define GMPRAT_PRINT
549#define KMATRIX_PRINT
550#define SPLIST_PRINT
551#define NPOLYGON_PRINT
552#define SEMIC_PRINT
553#endif
554
555#ifdef  SPECTRUM_IOSTREAM
556#define MULTICNT_IOSTREAM
557#define GMPRAT_IOSTREAM
558#define KMATRIX_IOSTREAM
559#define SPLIST_IOSTREAM
560#define NPOLYGON_IOSTREAM
561#define SEMIC_IOSTREAM
562#endif
563
564
565#else /* not NDEBUG **************************************************** */
[6b6b2f9]566
[996e19]567#define NO_PDEBUG
[a6a239]568
[6b6b2f9]569/* define YYDEBUG 1 for debugging bison texts, 0 otherwise */
570#define YYDEBUG 0
571
[5f9072]572#endif /* not NDEBUG */
[52a5e8]573
574/*******************************************************************
575 *
[7885020]576 * assume(x) -- a handy macro for assumptions
[52a5e8]577 *
578 ******************************************************************/
579
580#ifdef __cplusplus
581extern "C" {
582#endif
[cb66fa]583// routine which is used to report the error
[bd4fa1]584// returns 0
585extern int dReportError(const char* fmt, ...);
[cb66fa]586// within a debugger, set a breakpoint on dErrorBreak
587// which is called after the error has been reported
588extern void dErrorBreak();
[52a5e8]589#ifdef __cplusplus
590}
591#endif
592
[512a2b]593#ifndef HAVE_ASSUME
594#define assume(x) ((void) 0)
595#define r_assume(x) ((void) 0)
596#else /* ! HAVE_ASSUME */
597
598#define assume_violation(s,f,l) \
599  dReportError("assume violation at %s:%d condition: %s", f,l,s)
600
[52a5e8]601#define assume(x)   _assume(x, __FILE__, __LINE__)
602#define r_assume(x) _r_assume(x, __FILE__, __LINE__)
603
604#define _assume(x, f, l)                        \
605do                                              \
606{                                               \
607  if (! (x))                                    \
608  {                                             \
[ec7aac]609    assume_violation(#x, f, l);                 \
[52a5e8]610  }                                             \
611}                                               \
612while (0)
613
614#define _r_assume(x, f, l)                      \
615do                                              \
616{                                               \
617  if (! (x))                                    \
618  {                                             \
[ec7aac]619    assume_violation(#x, f, l);                 \
[52a5e8]620    return 0;                                   \
621  }                                             \
622}                                               \
623while (0)
624#endif /* HAVE_ASSUME */
625
[532abf]626/* do have RDEBUG, unless we are doing the very real thing */
627#ifdef HAVE_ASSUME
[ec7aac]628#ifndef RDEBUG
629#define RDEBUG
630#endif
631#endif
632
[6f0eb7]633#if SIZEOF_VOIDP == 8
634#ifndef OM_CHECK
635#define OM_CHECK 0
636#endif
637#endif
638
[fb0d9a]639/* If we're not using GNU C, elide __attribute__ */
640#ifndef __GNUC__
641#  define  __attribute__(x)  /*NOTHING*/
642#endif
[6f0eb7]643
[5f9072]644#endif /* MOD2_H  */
Note: See TracBrowser for help on using the repository browser.