guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Patch] SCM_C_INLINE is used wrongly in numbers.c


From: Matthias Koeppe
Subject: [Patch] SCM_C_INLINE is used wrongly in numbers.c
Date: Wed, 18 Jun 2003 08:49:13 +0200

When the compiler does not understand the `inline' keyword, configure
arranges that SCM_C_INLINE is not defined as a macro.  In this case,
libguile/numbers.c (CVS HEAD) cannot be compiled.

Here is a patch:

--- numbers.c.~1.191.~  Mon Jun 16 16:49:58 2003
+++ numbers.c   Tue Jun 17 18:42:26 2003
@@ -125,7 +125,10 @@
 
 static const char s_bignum[] = "bignum";
 
-SCM_C_INLINE SCM
+#ifdef SCM_C_INLINE
+SCM_C_INLINE
+#endif
+SCM
 scm_i_mkbig ()
 {
   /* Return a newly created bignum. */
@@ -134,7 +137,10 @@
   return z;
 }
 
-SCM_C_INLINE static SCM
+#ifdef SCM_C_INLINE
+SCM_C_INLINE
+#endif
+static SCM
 scm_i_clonebig (SCM src_big, int same_sign_p)
 {
   /* Copy src_big's value, negate it if same_sign_p is false, and return. */
@@ -144,7 +150,10 @@
   return z;
 }
 
-SCM_C_INLINE int
+#ifdef SCM_C_INLINE
+SCM_C_INLINE
+#endif
+int
 scm_i_bigcmp (SCM x, SCM y)
 {
   /* Return neg if x < y, pos if x > y, and 0 if x == y */
@@ -154,7 +163,10 @@
   return result;
 }
 
-SCM_C_INLINE SCM
+#ifdef SCM_C_INLINE
+SCM_C_INLINE
+#endif
+SCM
 scm_i_dbl2big (double d)
 {
   /* results are only defined if d is an integer */
@@ -163,7 +175,10 @@
   return z;
 }
 
-SCM_C_INLINE double
+#ifdef SCM_C_INLINE
+SCM_C_INLINE
+#endif
+double
 scm_i_big2dbl (SCM b)
 {
   double result = mpz_get_d (SCM_I_BIG_MPZ (b));
@@ -171,7 +186,10 @@
   return result;
 }
 
-SCM_C_INLINE SCM
+#ifdef SCM_C_INLINE
+SCM_C_INLINE
+#endif
+SCM
 scm_i_normbig (SCM b)
 {
   /* convert a big back to a fixnum if it'll fit */



-- 
Matthias Koeppe -- http://www.math.uni-magdeburg.de/~mkoeppe




reply via email to

[Prev in Thread] Current Thread [Next in Thread]