=================================================================== RCS file: /home/cvs/OpenXM_contrib2/asir2000/include/ca.h,v retrieving revision 1.94 retrieving revision 1.97 diff -u -p -r1.94 -r1.97 --- OpenXM_contrib2/asir2000/include/ca.h 2015/08/20 08:42:07 1.94 +++ OpenXM_contrib2/asir2000/include/ca.h 2016/08/24 05:33:58 1.97 @@ -45,12 +45,13 @@ * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. * - * $OpenXM: OpenXM_contrib2/asir2000/include/ca.h,v 1.93 2015/08/14 13:51:55 fujimoto Exp $ + * $OpenXM: OpenXM_contrib2/asir2000/include/ca.h,v 1.96 2016/06/28 11:59:30 ohara Exp $ */ #include #include #include #include +#include /* from mpfr-impl.h */ #define MPFR_PREC(x) ((x)->_mpfr_prec) @@ -59,6 +60,10 @@ #define MPFR_LAST_LIMB(x) ((MPFR_PREC (x) - 1) / GMP_NUMB_BITS) #define MPFR_LIMB_SIZE(x) (MPFR_LAST_LIMB (x) + 1) +#define RAT_CEIL(nm,dn) (((nm)+(dn)-1)/((dn))) +#define MPFR_LIMB_SIZE_REAL(x) (RAT_CEIL(MPFR_PREC((x)),sizeof(mp_limb_t)*CHAR_BIT) * (sizeof(mp_limb_t)/sizeof(int)) ) +#define MPFR_LIMB_SIZE_BODY(x) (RAT_CEIL(MPFR_PREC((x)),sizeof(unsigned int)*CHAR_BIT)) + #if defined(hpux) #include # define setbuffer(FP,buf,siz) setvbuf(FP,buf,_IOFBF,siz) @@ -663,6 +668,9 @@ struct order_spec { int nv; int ispot; /* 1 means Position over Term (Pos then Term) */ int pot_nelim; /* size of positions for pot-elimination order */ + int *top_weight; + int module_rank; + int *module_top_weight; union { int simple; struct { @@ -778,8 +786,17 @@ typedef unsigned int ModNum; #define ALLOCA(d) MALLOC(d) #endif +/* for handling signals */ +#if defined(HAVE_SIGACTION) /* POSIX */ +void (*set_signal(int sig, void (*handler)(int)))(int); +#define set_signal_for_restart(x,y) (0) +#else +#define set_signal(x,y) (signal(x,y)) +#define set_signal_for_restart(x,y) (signal(x,y)) +#endif + /* for setjmp/longjmp compatibility */ -#if defined(__CYGWIN__) || (defined(__x86_64) && !defined(__MINGW32__)) +#if defined(__CYGWIN__) || defined(HAVE_SIGACTION) || (defined(__x86_64) && !defined(__MINGW32__)) #define JMP_BUF sigjmp_buf #define SETJMP(x) sigsetjmp(x,~0) #define LONGJMP(x,y) siglongjmp(x,y)