From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Greg Troxel Newsgroups: gmane.lisp.guile.devel Subject: Re: i guess we're frozen & stuff Date: Tue, 11 Aug 2009 09:27:45 -0400 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1249997288 30400 80.91.229.12 (11 Aug 2009 13:28:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 11 Aug 2009 13:28:08 +0000 (UTC) To: guile-devel Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Aug 11 15:28:01 2009 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MarOR-00082X-NE for guile-devel@m.gmane.org; Tue, 11 Aug 2009 15:28:00 +0200 Original-Received: from localhost ([127.0.0.1]:36521 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MarOQ-000693-4k for guile-devel@m.gmane.org; Tue, 11 Aug 2009 09:27:58 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MarOK-000687-9x for guile-devel@gnu.org; Tue, 11 Aug 2009 09:27:52 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MarOE-00064c-O3 for guile-devel@gnu.org; Tue, 11 Aug 2009 09:27:50 -0400 Original-Received: from [199.232.76.173] (port=39788 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MarOE-00064M-GC for guile-devel@gnu.org; Tue, 11 Aug 2009 09:27:46 -0400 Original-Received: from fnord.ir.bbn.com ([192.1.100.210]:55961) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MarOE-0006Ro-4A for guile-devel@gnu.org; Tue, 11 Aug 2009 09:27:46 -0400 Original-Received: by fnord.ir.bbn.com (Postfix, from userid 10853) id 64CC653E7; Tue, 11 Aug 2009 09:27:45 -0400 (EDT) X-Hashcash: 1:20:090811:wingo@pobox.com::kJslm9CRPyJFou4r:000y5B X-Hashcash: 1:20:090811:guile-devel@gnu.org::kJslm9CRPyJFou4r:0000000000000000000000000000000000000000002uid In-Reply-To: (Andy Wingo's message of "Mon, 10 Aug 2009 21:41:10 +0200") User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.3 (berkeley-unix) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:9056 Archived-At: --=-=-= guile master fails to build on NetBSD because it passes characters to tolower, which is specified to take an int. It's really a macro, and this is a messy situation. The language weenies I've talked to about this think that in this case it's the program that passes a char that's wrong. Hence the following patch. Note that because tolower is specified to take an int, this promotion to int is what would happen if it really were a function, so this "can't be wrong" :-) See http://www.opengroup.org/onlinepubs/000095399/functions/tolower.html and the statement about the argument being of type int and being of a restricted set of values. diff --git a/libguile/strings.c b/libguile/strings.c index c3ea8b8..437cedc 100644 --- a/libguile/strings.c +++ b/libguile/strings.c @@ -1427,8 +1427,8 @@ unistring_escapes_to_guile_escapes (char **bufp, size_t *lenp) /* Convert \u00NN to \xNN */ after[j] = '\\'; after[j + 1] = 'x'; - after[j + 2] = tolower (before[i + 4]); - after[j + 3] = tolower (before[i + 5]); + after[j + 2] = tolower ((int) before[i + 4]); + after[j + 3] = tolower ((int) before[i + 5]); i += 6; j += 4; } @@ -1440,12 +1440,12 @@ unistring_escapes_to_guile_escapes (char **bufp, size_t *lenp) /* Convert \U00NNNNNN to \UNNNNNN */ after[j] = '\\'; after[j + 1] = 'U'; - after[j + 2] = tolower (before[i + 4]); - after[j + 3] = tolower (before[i + 5]); - after[j + 4] = tolower (before[i + 6]); - after[j + 5] = tolower (before[i + 7]); - after[j + 6] = tolower (before[i + 8]); - after[j + 7] = tolower (before[i + 9]); + after[j + 2] = tolower ((int) before[i + 4]); + after[j + 3] = tolower ((int) before[i + 5]); + after[j + 4] = tolower ((int) before[i + 6]); + after[j + 5] = tolower ((int) before[i + 7]); + after[j + 6] = tolower ((int) before[i + 8]); + after[j + 7] = tolower ((int) before[i + 9]); i += 10; j += 8; } --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (NetBSD) iEYEARECAAYFAkqBcdEACgkQ+vesoDJhHiVMVgCggX0tHSeNO5BrcQNTShK8+PiI z9wAn2OzKeZT3Sxc+B9ujH+TQmk/Y2S1 =/Lxd -----END PGP SIGNATURE----- --=-=-=--