From: Matthias Koeppe <mkoeppe@mail.math.uni-magdeburg.de>
Subject: [Patch] SCM_C_INLINE is used wrongly in numbers.c
Date: Wed, 18 Jun 2003 08:49:13 +0200 [thread overview]
Message-ID: <uw5smq7swwm.fsf@saturn.math.uni-magdeburg.de> (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
next reply other threads:[~2003-06-18 6:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-18 6:49 Matthias Koeppe [this message]
2003-06-18 8:39 ` [Patch] SCM_C_INLINE is used wrongly in numbers.c Andreas Rottmann
2003-07-27 13:36 ` Marius Vollmer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=uw5smq7swwm.fsf@saturn.math.uni-magdeburg.de \
--to=mkoeppe@mail.math.uni-magdeburg.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).