From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Andreas_V=F6gele?= Newsgroups: gmane.lisp.guile.bugs,gmane.lisp.guile.devel Subject: More C99isms Date: Sun, 29 Aug 2004 11:33:55 +0200 Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Message-ID: <8BA2884C-F99E-11D8-A510-000D93673682@gmx.net> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 (Apple Message framework v619) Content-Type: multipart/mixed; boundary=Apple-Mail-15--499281911 X-Trace: sea.gmane.org 1093772084 13372 80.91.224.253 (29 Aug 2004 09:34:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 29 Aug 2004 09:34:44 +0000 (UTC) Cc: guile-devel@gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Sun Aug 29 11:34:39 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1C1M59-0007hG-00 for ; Sun, 29 Aug 2004 11:34:39 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C1M9u-0007Rc-8s for guile-bugs@m.gmane.org; Sun, 29 Aug 2004 05:39:34 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1C1M9m-0007RW-17 for bug-guile@gnu.org; Sun, 29 Aug 2004 05:39:26 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1C1M9i-0007RI-2g for bug-guile@gnu.org; Sun, 29 Aug 2004 05:39:23 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C1M9h-0007RF-Rq for bug-guile@gnu.org; Sun, 29 Aug 2004 05:39:22 -0400 Original-Received: from [213.165.64.20] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.34) id 1C1M4T-00019k-L7 for bug-guile@gnu.org; Sun, 29 Aug 2004 05:33:57 -0400 Original-Received: (qmail 30839 invoked by uid 65534); 29 Aug 2004 09:33:56 -0000 Original-Received: from pD951950A.dip.t-dialin.net (EHLO [192.168.1.15]) (217.81.149.10) by mail.gmx.net (mp026) with SMTP; 29 Aug 2004 11:33:56 +0200 X-Authenticated: #14729429 Original-To: bug-guile@gnu.org X-Mailer: Apple Mail (2.619) X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.bugs:1633 gmane.lisp.guile.devel:4052 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:4052 --Apple-Mail-15--499281911 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed Hi, there are still C99isms in strings.c and threads.c. I've attached a patch that changes the relevant code so that it can be compiled with GCC 2.95. IMHO C99isms ought to be avoided as long as Debian Woody and OpenBSD 3.5 are supported products since both distributions come with GCC 2.95 as default compiler. --Apple-Mail-15--499281911 Content-Transfer-Encoding: 7bit Content-Type: application/octet-stream; x-unix-mode=0700; name="c99isms.diff" Content-Disposition: attachment; filename=c99isms.diff Index: libguile/strings.c =================================================================== RCS file: /cvsroot/guile/guile/guile-core/libguile/strings.c,v retrieving revision 1.89 diff -u -r1.89 strings.c --- libguile/strings.c 27 Aug 2004 12:45:37 -0000 1.89 +++ libguile/strings.c 29 Aug 2004 09:11:43 -0000 @@ -215,10 +215,10 @@ scm_i_substring_copy (SCM str, size_t start, size_t end) { size_t len = end - start; - SCM buf; + SCM buf, my_buf; size_t str_start; get_str_buf_start (&str, &buf, &str_start); - SCM my_buf = make_stringbuf (len); + my_buf = make_stringbuf (len); memcpy (STRINGBUF_CHARS (my_buf), STRINGBUF_CHARS (buf) + str_start + start, len); scm_remember_upto_here_1 (buf); @@ -732,9 +732,11 @@ res = scm_i_make_string (i, &data); for (l = args; !SCM_NULLP (l); l = SCM_CDR (l)) { + size_t len; + s = SCM_CAR (l); SCM_VALIDATE_STRING (SCM_ARGn, s); - size_t len = scm_i_string_length (s); + len = scm_i_string_length (s); memcpy (data, scm_i_string_chars (s), len); data += len; scm_remember_upto_here_1 (s); Index: libguile/threads.c =================================================================== RCS file: /cvsroot/guile/guile/guile-core/libguile/threads.c,v retrieving revision 1.65 diff -u -r1.65 threads.c --- libguile/threads.c 19 Aug 2004 17:16:01 -0000 1.65 +++ libguile/threads.c 29 Aug 2004 09:11:43 -0000 @@ -937,6 +937,7 @@ scm_threads_mark_stacks (void) { volatile SCM c; + long stack_len; for (c = all_threads; !SCM_NULLP (c); c = SCM_CDR (c)) { @@ -955,10 +956,10 @@ } #if SCM_STACK_GROWS_UP - long stack_len = t->top - t->base; + stack_len = t->top - t->base; scm_mark_locations (t->base, stack_len); #else - long stack_len = t->base - t->top; + stack_len = t->base - t->top; scm_mark_locations (t->top, stack_len); #endif scm_mark_locations ((SCM_STACKITEM *) t->regs, --Apple-Mail-15--499281911 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Bug-guile mailing list Bug-guile@gnu.org http://lists.gnu.org/mailman/listinfo/bug-guile --Apple-Mail-15--499281911--