From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Matthias Koeppe Newsgroups: gmane.lisp.guile.devel Subject: [Patch] SCM_C_INLINE is used wrongly in numbers.c Date: Wed, 18 Jun 2003 08:49:13 +0200 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1055919291 12694 80.91.224.249 (18 Jun 2003 06:54:51 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 18 Jun 2003 06:54:51 +0000 (UTC) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Jun 18 08:54:50 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19SWqH-0003IS-00 for ; Wed, 18 Jun 2003 08:54:49 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19SWlo-00025E-BR for guile-devel@m.gmane.org; Wed, 18 Jun 2003 02:50:12 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19SWl8-00020z-LC for guile-devel@gnu.org; Wed, 18 Jun 2003 02:49:30 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19SWkw-0001Yx-84 for guile-devel@gnu.org; Wed, 18 Jun 2003 02:49:21 -0400 Original-Received: from merkur.math.uni-magdeburg.de ([141.44.75.40]) by monty-python.gnu.org with esmtp (Exim 4.20) id 19SWkt-0001TB-Qd for guile-devel@gnu.org; Wed, 18 Jun 2003 02:49:15 -0400 Original-Received: from kombi4 ([141.44.75.44] helo=kombi4.math.uni-magdeburg.de) by merkur.math.uni-magdeburg.de with esmtp (Exim 4.10) id 19SWkt-0002Nd-00 for guile-devel@gnu.org; Wed, 18 Jun 2003 08:49:15 +0200 Original-Received: (from mkoeppe@localhost) by kombi4.math.uni-magdeburg.de (8.11.6+Sun/8.10.2) id h5I6nD305265; Wed, 18 Jun 2003 08:49:13 +0200 (MEST) X-Authentication-Warning: kombi4.math.uni-magdeburg.de: mkoeppe set sender to mkoeppe@mail.math.uni-magdeburg.de using -f Original-To: guile-devel@gnu.org Original-Lines: 85 X-Warning: no 'abuse'-account in domain mail.math.uni-magdeburg.de (cf. RFC2142/4.) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Developers list for Guile, the GNU extensibility library List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:2548 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:2548 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