unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* [Patch] SCM_C_INLINE is used wrongly in numbers.c
@ 2003-06-18  6:49 Matthias Koeppe
  2003-06-18  8:39 ` Andreas Rottmann
  0 siblings, 1 reply; 3+ messages in thread
From: Matthias Koeppe @ 2003-06-18  6:49 UTC (permalink / raw)


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


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-07-27 13:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-18  6:49 [Patch] SCM_C_INLINE is used wrongly in numbers.c Matthias Koeppe
2003-06-18  8:39 ` Andreas Rottmann
2003-07-27 13:36   ` Marius Vollmer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).