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

* Re: [Patch] SCM_C_INLINE is used wrongly in numbers.c
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Rottmann @ 2003-06-18  8:39 UTC (permalink / raw)
  Cc: guile-devel

Matthias Koeppe <mkoeppe@mail.math.uni-magdeburg.de> writes:

> 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:
>
[snip]

Wouldn't it be more simple to define SCM_C_INLINE empty?

Regards, Andy
-- 
Andreas Rottmann         | Rotty@ICQ      | 118634484@ICQ | a.rottmann@gmx.at
http://www.8ung.at/rotty | GnuPG Key: http://www.8ung.at/rotty/gpg.asc
Fingerprint              | DFB4 4EB4 78A4 5EEE 6219  F228 F92F CFC5 01FD 5B62

Make free software, not war!


_______________________________________________
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

* Re: [Patch] SCM_C_INLINE is used wrongly in numbers.c
  2003-06-18  8:39 ` Andreas Rottmann
@ 2003-07-27 13:36   ` Marius Vollmer
  0 siblings, 0 replies; 3+ messages in thread
From: Marius Vollmer @ 2003-07-27 13:36 UTC (permalink / raw)
  Cc: Matthias Koeppe, guile-devel

Andreas Rottmann <a.rottmann@gmx.at> writes:

> Matthias Koeppe <mkoeppe@mail.math.uni-magdeburg.de> writes:
> 
> > 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:
> >
> [snip]
> 
> Wouldn't it be more simple to define SCM_C_INLINE empty?

That would conflict with the way SCM_C_INLINE is used elsewhere.  What
about defining an addditional SCM_C_INLINE_KEYWORD and using that in
numbers.c?

In __scm.h:

    #ifdef SCM_C_INLINE
    #define SCM_C_INLINE_KEYWORD SCM_C_INLINE
    #else
    #define SCM_C_INLINE_KEYWORD
    #endif

I have commited this change already.  Matthias, could you test it?

-- 
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3  331E FAF8 226A D5D4 E405


_______________________________________________
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).