summaryrefslogtreecommitdiffstats
path: root/scmfig.h
diff options
context:
space:
mode:
Diffstat (limited to 'scmfig.h')
-rw-r--r--scmfig.h38
1 files changed, 31 insertions, 7 deletions
diff --git a/scmfig.h b/scmfig.h
index 9b8b1f3..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
@@ -281,7 +281,11 @@ rgx.c init_rgx(); regcomp and regexec. */
#ifdef __alpha
# define SHORT_INT
#endif
-#if defined(__ia64) || defined (__powerpc64__) || defined(__x86_64__)
+#ifdef __ia64
+# define SHORT_INT
+# define CDR_DOUBLES
+#endif
+#ifdef __x86_64
# define SHORT_INT
# define CDR_DOUBLES
#endif
@@ -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