From 879f4fa041cfdefee655eb877f1a91f86a9c62b7 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Fri, 3 Mar 2017 00:56:40 -0800 Subject: New upstream version 5f2 --- scmfig.h | 78 ++++++++++++++++++++++++++++++++++++---------------------------- 1 file changed, 44 insertions(+), 34 deletions(-) mode change 100644 => 100755 scmfig.h (limited to 'scmfig.h') diff --git a/scmfig.h b/scmfig.h old mode 100644 new mode 100755 index a8e8667..07b91f4 --- a/scmfig.h +++ b/scmfig.h @@ -403,39 +403,6 @@ rgx.c init_rgx(); regcomp and regexec. */ # endif #endif -/* Define BIGDIG to an integer type whose size is smaller than long if - you want bignums. BIGRAD is one greater than the biggest BIGDIG. */ -/* Define DIGSTOOBIG if the digits equivalent to a long won't fit in a long. */ -#ifdef BIGNUMS -# ifdef _UNICOS -# define DIGSTOOBIG -# if (1L << 31) <= USHRT_MAX -# define BIGDIG unsigned short -# else -# define BIGDIG unsigned int -# endif -# define BITSPERDIG 32 -# else -# define BIGDIG unsigned short -# define BITSPERDIG (sizeof(BIGDIG)*CHAR_BIT) -# endif -# define BIGRAD (1L << BITSPERDIG) -# define DIGSPERLONG ((sizet)((sizeof(long)*CHAR_BIT+BITSPERDIG-1)/BITSPERDIG)) -# define BIGUP(x) ((unsigned long)(x) << BITSPERDIG) -# define BIGDN(x) ((x) >> BITSPERDIG) -# define BIGLO(x) ((x) & (BIGRAD-1)) -/* NUMDIGS_MAX is the maximum number of digits for BIGNUMS */ -# ifndef NUMDIGS_MAX -# define NUMDIGS_MAX 1000 -# endif -#endif - -#ifndef BIGDIG -# ifndef FLOATS -# define INUMS_ONLY -# endif -#endif - #ifndef __builtin_expect # ifndef __GNUC__ # define __builtin_expect(expr, expected) (expr) @@ -630,6 +597,45 @@ extern ints_infot *ints_info; #endif #define INTBUFLEN (5+LONG_BIT) +/* Define BIGDIG to an integer type whose size is smaller than long if + you want bignums. BIGRAD is one greater than the biggest BIGDIG. */ +/* Define DIGSTOOBIG if the digits equivalent to a long won't fit in a long. */ +#ifdef BIGNUMS +# define SBIGLONG long +# define UBIGLONG unsigned SBIGLONG +# ifdef _UNICOS +# define DIGSTOOBIG +# if (1L << 31) <= USHRT_MAX +# define BIGDIG unsigned short +# else +# define BIGDIG unsigned int +# endif +# define BITSPERDIG 32 +# else +# if INT_MAX < LONG_MAX +# define BIGDIG unsigned int +# else +# define BIGDIG unsigned short +# endif +# endif +# define BITSPERDIG (sizeof(BIGDIG)*CHAR_BIT) +# define BIGRAD (1L << BITSPERDIG) +# define DIGSPERLONG ((sizet)((sizeof(UBIGLONG))/sizeof(BIGDIG))) +# define BIGUP(x) (((UBIGLONG)(x)) << BITSPERDIG) +# define BIGDN(x) (((UBIGLONG)(x)) >> BITSPERDIG) +# define BIGLO(x) ((x) & (BIGRAD-1L)) +/* NUMDIGS_MAX is the maximum number of digits for BIGNUMS */ +# ifndef NUMDIGS_MAX +# define NUMDIGS_MAX 1000 +# endif +#endif + +#ifndef BIGDIG +# ifndef FLOATS +# define INUMS_ONLY +# endif +#endif + /* FLOBUFLEN is the maximum number of characters neccessary for the printed or string representation of an inexact number. */ @@ -747,6 +753,10 @@ typedef SCM *SCMPTR; # endif #endif +#ifdef __APPLE__ +# include +#endif + #ifdef macintosh # include #endif @@ -805,7 +815,7 @@ typedef SCM *SCMPTR; #endif #define SCM_OPENCALL(line) {int gcs = 0;\ - while (!0) {errno = 0; if (line) break;\ + while (!0) {errno = 0; if ((line)) break;\ if (0==gcs++ && SCM_NEED_FDS(errno)) \ gc_for_open_files();\ else if (!SCM_INTERRUPTED(errno)) break;}} -- cgit v1.2.3