From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.user Subject: Re: make check fails on x86_64 - guile-1.8.2 Date: Wed, 10 Oct 2007 22:16:08 +0200 Message-ID: <873awivi7r.fsf@chbouib.org> References: <20071009210216.13034.qmail@station198.com> <87y7ec0yjp.fsf@chbouib.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1192047498 12764 80.91.229.12 (10 Oct 2007 20:18:18 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 10 Oct 2007 20:18:18 +0000 (UTC) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Wed Oct 10 22:18:17 2007 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Ifi0S-0002HJ-Ke for guile-user@m.gmane.org; Wed, 10 Oct 2007 22:18:13 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ifi0M-0005FG-C5 for guile-user@m.gmane.org; Wed, 10 Oct 2007 16:18:06 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ifi0H-0005Ea-Rt for guile-user@gnu.org; Wed, 10 Oct 2007 16:18:01 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ifi0H-0005EI-7X for guile-user@gnu.org; Wed, 10 Oct 2007 16:18:01 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ifi0G-0005EE-Qr for guile-user@gnu.org; Wed, 10 Oct 2007 16:18:00 -0400 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Ifi0F-00014g-Ur for guile-user@gnu.org; Wed, 10 Oct 2007 16:18:00 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1IfhzL-0006L4-LL for guile-user@gnu.org; Wed, 10 Oct 2007 20:17:03 +0000 Original-Received: from adh419.fdn.fr ([80.67.176.9]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 10 Oct 2007 20:17:03 +0000 Original-Received: from ludo by adh419.fdn.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 10 Oct 2007 20:17:03 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 228 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: adh419.fdn.fr X-URL: http://www.laas.fr/~lcourtes/ X-PGP-Key-ID: 0xEB1F5364 X-PGP-Key: http://www.laas.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 821D 815D 902A 7EAB 5CEE D120 7FBA 3D4F EB1F 5364 X-OS: i486-pc-linux-gnu User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) Cancel-Lock: sha1:8w1ADZaz8KY4Rb8bS+ypwS3W1Hw= X-Detected-Kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:6206 Archived-At: --=-=-= Hi, Greg Troxel writes: > But it seems the code is still wrong. It seems like we'd need to go to > things like PRIU64 which are defined to match the type, and #define > PRISCMTINTMAX to the corresponding one along with the typedef. I just checked and there's also `PRI{iu}MAX', which do the job. I committed the attached fix. I couldn't test it on x86_64, though, so feedback is welcome. Thanks, Ludovic. --=-=-= Content-Type: text/x-patch; charset=iso-8859-1 Content-Disposition: inline; filename*=us-ascii''%2c%2cpriimax-x86-64.diff Content-Transfer-Encoding: 8bit Content-Description: The patch --- orig/test-suite/ChangeLog +++ mod/test-suite/ChangeLog @@ -1,3 +1,13 @@ +2007-10-10 Ludovic Courtès + + * standalone/test-conversion.c: Include where + available. Use `PRIiMAX' and `PRIuMAX' to print + `scm_t_u?intmax'. Fixes warnings on x86_64. Reported by Poor + Yorick . + + * standalone/Makefile.am (test_cflags): Removed reference to + `libguile-ltdl'. + 2007-09-03 Ludovic Courtès * tests/reader.test (reading)[block comment finishing sexp]: New --- orig/test-suite/standalone/Makefile.am +++ mod/test-suite/standalone/Makefile.am @@ -1,6 +1,6 @@ ## Process this file with automake to produce Makefile.in. ## -## Copyright 2003, 2004, 2005, 2006 Software Foundation, Inc. +## Copyright 2003, 2004, 2005, 2006, 2007 Software Foundation, Inc. ## ## This file is part of GUILE. ## @@ -32,7 +32,7 @@ TESTS_ENVIRONMENT = "${top_builddir}/pre test_cflags = \ -I$(top_srcdir)/test-suite/standalone \ -I$(top_srcdir) \ - -I$(top_srcdir)/libguile-ltdl $(EXTRA_DEFS) $(GUILE_CFLAGS) + $(EXTRA_DEFS) $(GUILE_CFLAGS) AM_LDFLAGS = $(GUILE_CFLAGS) --- orig/test-suite/standalone/test-conversion.c +++ mod/test-suite/standalone/test-conversion.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999,2000,2001,2003,2004, 2006 Free Software Foundation, Inc. +/* Copyright (C) 1999,2000,2001,2003,2004, 2006, 2007 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -21,6 +21,21 @@ #include #include +#include "config.h" + +#ifdef HAVE_INTTYPES_H +# include +#elif (!defined PRIiMAX) +# if (defined SIZEOF_LONG_LONG) && (SIZEOF_LONG_LONG >= 8) +# define PRIiMAX "lli" +# define PRIuMAX "llu" +# else +# define PRIiMAX "li" +# define PRIuMAX "lu" +# endif +#endif + + static void test_1 (const char *str, scm_t_intmax min, scm_t_intmax max, int result) @@ -28,7 +43,8 @@ test_1 (const char *str, scm_t_intmax mi int r = scm_is_signed_integer (scm_c_eval_string (str), min, max); if (r != result) { - fprintf (stderr, "fail: scm_is_signed_integer (%s, %Ld, %Ld) == %d\n", + fprintf (stderr, "fail: scm_is_signed_integer (%s, " + "%" PRIiMAX ", %" PRIiMAX ") == %d\n", str, min, max, result); exit (1); } @@ -113,7 +129,8 @@ test_2 (const char *str, scm_t_uintmax m int r = scm_is_unsigned_integer (scm_c_eval_string (str), min, max); if (r != result) { - fprintf (stderr, "fail: scm_is_unsigned_integer (%s, %Lu, %Lu) == %d\n", + fprintf (stderr, "fail: scm_is_unsigned_integer (%s, " + "%" PRIuMAX ", %" PRIuMAX ") == %d\n", str, min, max, result); exit (1); } @@ -233,7 +250,8 @@ test_3 (const char *str, scm_t_intmax mi out_of_range_handler, NULL))) { fprintf (stderr, - "fail: scm_to_signed_int (%s, %Ld, %Ld) -> out of range\n", + "fail: scm_to_signed_int (%s, " + "%" PRIiMAX ", %" PRIiMAX ") -> out of range\n", str, min, max); exit (1); } @@ -245,7 +263,8 @@ test_3 (const char *str, scm_t_intmax mi wrong_type_handler, NULL))) { fprintf (stderr, - "fail: scm_to_signed_int (%s, %Ld, %Ld) -> wrong type\n", + "fail: scm_to_signed_int (%s, " + "%" PRIiMAX", %" PRIiMAX ") -> wrong type\n", str, min, max); exit (1); } @@ -258,7 +277,8 @@ test_3 (const char *str, scm_t_intmax mi || data.result != result) { fprintf (stderr, - "fail: scm_to_signed_int (%s, %Ld, %Ld) = %Ld\n", + "fail: scm_to_signed_int (%s, " + "%" PRIiMAX ", %" PRIiMAX ") = %" PRIiMAX "\n", str, min, max, result); exit (1); } @@ -365,7 +385,8 @@ test_4 (const char *str, scm_t_uintmax m out_of_range_handler, NULL))) { fprintf (stderr, - "fail: scm_to_unsigned_int (%s, %Lu, %Lu) -> out of range\n", + "fail: scm_to_unsigned_int (%s, " + "%" PRIuMAX ", %" PRIuMAX ") -> out of range\n", str, min, max); exit (1); } @@ -377,7 +398,8 @@ test_4 (const char *str, scm_t_uintmax m wrong_type_handler, NULL))) { fprintf (stderr, - "fail: scm_to_unsigned_int (%s, %Lu, %Lu) -> wrong type\n", + "fail: scm_to_unsigned_int (%s, " + "%" PRIuMAX ", %" PRIuMAX ") -> wrong type\n", str, min, max); exit (1); } @@ -390,7 +412,8 @@ test_4 (const char *str, scm_t_uintmax m || data.result != result) { fprintf (stderr, - "fail: scm_to_unsigned_int (%s, %Lu, %Lu) == %Lu\n", + "fail: scm_to_unsigned_int (%s, " + "%" PRIuMAX ", %" PRIuMAX ") == %" PRIuMAX "\n", str, min, max, result); exit (1); } @@ -446,7 +469,7 @@ test_5 (scm_t_intmax val, const char *re SCM res = scm_c_eval_string (result); if (scm_is_false (scm_equal_p (scm_from_signed_integer (val), res))) { - fprintf (stderr, "fail: scm_from_signed_integer (%Ld) == %s\n", + fprintf (stderr, "fail: scm_from_signed_integer (%" PRIiMAX ") == %s\n", val, result); exit (1); } @@ -478,7 +501,8 @@ test_6 (scm_t_uintmax val, const char *r SCM res = scm_c_eval_string (result); if (scm_is_false (scm_equal_p (scm_from_unsigned_integer (val), res))) { - fprintf (stderr, "fail: scm_from_unsigned_integer (%Lu) == %s\n", + fprintf (stderr, "fail: scm_from_unsigned_integer (%" + PRIuMAX ") == %s\n", val, result); exit (1); } @@ -507,7 +531,7 @@ test_7s (SCM n, scm_t_intmax c_n, const if (scm_is_false (scm_equal_p (n, r))) { - fprintf (stderr, "fail: %s (%Ld) == %s\n", func, c_n, result); + fprintf (stderr, "fail: %s (%" PRIiMAX ") == %s\n", func, c_n, result); exit (1); } } @@ -521,7 +545,7 @@ test_7u (SCM n, scm_t_uintmax c_n, const if (scm_is_false (scm_equal_p (n, r))) { - fprintf (stderr, "fail: %s (%Lu) == %s\n", func, c_n, result); + fprintf (stderr, "fail: %s (%" PRIuMAX ") == %s\n", func, c_n, result); exit (1); } } @@ -580,7 +604,7 @@ test_8s (const char *str, scm_t_intmax ( || data.result != result) { fprintf (stderr, - "fail: %s (%s) = %Ld\n", func_name, str, result); + "fail: %s (%s) = %" PRIiMAX "\n", func_name, str, result); exit (1); } } @@ -638,7 +662,7 @@ test_8u (const char *str, scm_t_uintmax || data.result != result) { fprintf (stderr, - "fail: %s (%s) = %Ld\n", func_name, str, result); + "fail: %s (%s) = %" PRIiMAX "\n", func_name, str, result); exit (1); } } --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user --=-=-=--