From ae2b295c7deaf2d7c18ad1ed9b6050970e56bae7 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Mon, 20 Feb 2017 00:05:31 -0800 Subject: Import Upstream version 5e2 --- scmfig.h | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) (limited to 'scmfig.h') diff --git a/scmfig.h b/scmfig.h index e43ab79..35cf06e 100644 --- a/scmfig.h +++ b/scmfig.h @@ -53,7 +53,7 @@ #endif /* MS Windows signal handling hack added by Rainer Urian */ -/* +/* SCM crashes on WindowsNT after hitting control-c. This is because signal handling in windows console applications is @@ -285,6 +285,10 @@ rgx.c init_rgx(); regcomp and regexec. */ # define SHORT_INT # define CDR_DOUBLES #endif +#ifdef __x86_64 +# define SHORT_INT +# define CDR_DOUBLES +#endif #ifdef MSDOS /* Microsoft C 5.10 and 6.00A */ # ifndef GO32 # define SHORT_INT @@ -373,8 +377,8 @@ rgx.c init_rgx(); regcomp and regexec. */ # define LACK_SBRK #endif -#ifdef __CYGWIN32__ -# define LACK_FTIME +#ifdef __CYGWIN__ +/* # define LACK_FTIME */ # define HAVE_SELECT # define HAVE_SYS_TIME_H # undef MSDOS @@ -447,6 +451,19 @@ rgx.c init_rgx(); regcomp and regexec. */ # endif #endif +#ifndef __builtin_expect +# ifndef __GNUC__ +# define __builtin_expect(expr, expected) (expr) +# else +# if (__GNUC__ < 3) +# define __builtin_expect(expr, expected) (expr) +# endif +# endif +#endif + +#define SCM_EXPECT_TRUE(expr) (__builtin_expect(expr, !0)) +#define SCM_EXPECT_FALSE(expr) (__builtin_expect(expr, 0)) + #ifdef __GNUC__ # define FENCE asm volatile ("") #else @@ -533,9 +550,9 @@ extern ints_infot *ints_info; /* FIXABLE is non-null if its long argument can be encoded in an INUM. */ -#define POSFIXABLE(n) ((n) <= MOST_POSITIVE_FIXNUM) -#define NEGFIXABLE(n) ((n) >= MOST_NEGATIVE_FIXNUM) -#define UNEGFIXABLE(n) ((n) <= -MOST_NEGATIVE_FIXNUM) +#define POSFIXABLE(n) SCM_EXPECT_TRUE((n) <= MOST_POSITIVE_FIXNUM) +#define NEGFIXABLE(n) SCM_EXPECT_TRUE((n) >= MOST_NEGATIVE_FIXNUM) +#define UNEGFIXABLE(n) SCM_EXPECT_TRUE((n) <= -MOST_NEGATIVE_FIXNUM) #define FIXABLE(n) (POSFIXABLE(n) && NEGFIXABLE(n)) /* The following 8 definitions are defined automatically by the C @@ -664,6 +681,13 @@ extern ints_infot *ints_info; # endif #endif +#ifdef FLOATS +# ifndef __MINGW32__ +/* Also asinh and acosh */ +# define HAVE_ATANH +# endif +#endif + #ifdef unix # define HAVE_UNIX #endif -- cgit v1.2.3