diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2017-02-20 00:05:31 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2017-02-20 00:05:31 -0800 |
commit | ae2b295c7deaf2d7c18ad1ed9b6050970e56bae7 (patch) | |
tree | eee15e02ae016333546d3841712be591b2bcb06f /scmfig.h | |
parent | 302e3218b7d487539ec305bf23881a6ee7d5be99 (diff) | |
download | scm-upstream/5e2.tar.gz scm-upstream/5e2.zip |
Import Upstream version 5e2upstream/5e2
Diffstat (limited to 'scmfig.h')
-rw-r--r-- | scmfig.h | 36 |
1 files changed, 30 insertions, 6 deletions
@@ -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 |