Bug#560105: autoconf: AC_TYPE_INT32_T generates broken test?

2009-12-09 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

According to Ralf Wildenhues on 12/8/2009 11:25 PM:
 * Ralf Wildenhues wrote on Tue, Dec 08, 2009 at 11:59:26PM CET:
 * Pierre Ynard wrote on Tue, Dec 08, 2009 at 11:42:02PM CET:
 AC_TYPE_INT32_T, and also AC_TYPE_INT16_T and AC_TYPE_INT64_T, output C
 code that looks like:

 Patch below.  OK to commit and add Pierre to THANKS?

Yes, please.


 I think we need to start comparing test results against tables for at
 least a couple of systems, in order to guard against such issues.

 My current idea for this is to have a mode in which AT_CHECK_MACRO
 records cache values, or we simply run `testsuite -d' and collect cache
 values across all tests, maybe weeding out or commenting out those that
 are not consistent across the testsuite; then redo the same for an older
 release, and compare.

Not as part of this patch, but the idea seems like it might be worthwhile.

- --
Don't work too hard, make some time for fun as well!

Eric Blake e...@byu.net
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAksfmigACgkQ84KuGfSFAYBGYQCZARbU/kagiplAzOdCO7t7vrCX
/LkAnjIfRjNGaeHfcSa7VkH76766hs4k
=kyCF
-END PGP SIGNATURE-



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#560105: autoconf: AC_TYPE_INT32_T generates broken test?

2009-12-09 Thread Ralf Wildenhues
* Eric Blake wrote on Wed, Dec 09, 2009 at 01:38:00PM CET:
 According to Ralf Wildenhues on 12/8/2009 11:25 PM:
  * Ralf Wildenhues wrote on Tue, Dec 08, 2009 at 11:59:26PM CET:
  * Pierre Ynard wrote on Tue, Dec 08, 2009 at 11:42:02PM CET:
  AC_TYPE_INT32_T, and also AC_TYPE_INT16_T and AC_TYPE_INT64_T, output C
  code that looks like:
 
  Patch below.  OK to commit and add Pierre to THANKS?
 
 Yes, please.

Thanks.  Pushed, after fixing the description and NEWS entry to mention
2.65 not 2.64.

I also pushed this patch which fixes the other wrong NEWS entry.

Cheers,
Ralf

Fix NEWS description for AC_FUNC_MMAP entry.

* NEWS: Update.

diff --git a/NEWS b/NEWS
index d24db8a..69cca79 100644
--- a/NEWS
+++ b/NEWS
@@ -3,7 +3,7 @@ GNU Autoconf NEWS - User visible changes.
 * Major changes in Autoconf 2.65a (-??-??) [experimental]
   Released by  
 
-** AC_FUNC_MMAP works in C++ mode again.  Regression introduced in 2.64.
+** AC_FUNC_MMAP works in C++ mode again.  Regression introduced in 2.65.
 
 ** Use of m4_divert without a named diversion now issues a syntax warning,
since it is seldom right to change diversions behind autoconf's back.



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#560105: autoconf: AC_TYPE_INT32_T generates broken test?

2009-12-08 Thread Pierre Ynard
Package: autoconf
Version: 2.65-2
Severity: normal

AC_TYPE_INT32_T, and also AC_TYPE_INT16_T and AC_TYPE_INT64_T, output C
code that looks like:

int
main ()
{
static int test_array [1 - 2 * !(enum { N = $2 / 2 - 1 };
 0  ($ac_type) ($ac_type) 1  N)  N) - 1) * 2 + 1))];
test_array [0] = 0

  ;
  return 0;
}

which fails to compile with errors like:

conftest.c: In function 'main':
conftest.c:73: error: expected ')' before ';' token
conftest.c:74: error: expected expression before ']' token

Thus, the check always returns no. And then ./configure of project foo
aborts because it can find its int types...

This problem isn't there in autoconf 2.64-4.

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.31.5-grsec
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages autoconf depends on:
ii  debianutils   3.2.2  Miscellaneous utilities specific t
ii  m41.4.13-3   a macro processing language
ii  perl  5.10.1-8   Larry Wall's Practical Extraction 

Versions of packages autoconf recommends:
ii  automake [automaken]  1:1.11-1   A tool for generating GNU Standard

Versions of packages autoconf suggests:
pn  autoconf-archive  none (no description available)
pn  autoconf-doc  none (no description available)
pn  autoconf2.13  none (no description available)
ii  gettext   0.17-8 GNU Internationalization utilities
pn  gnu-standards none (no description available)
ii  libtool   2.2.6a-4   Generic library support script

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#560105: autoconf: AC_TYPE_INT32_T generates broken test?

2009-12-08 Thread Ralf Wildenhues
tags upstream forwarded
thanks

[ This is http://bugs.debian.org/560105 ]

Hello Pierre,

thanks for the bug report.

* Pierre Ynard wrote on Tue, Dec 08, 2009 at 11:42:02PM CET:
 AC_TYPE_INT32_T, and also AC_TYPE_INT16_T and AC_TYPE_INT64_T, output C
 code that looks like:

 static int test_array [1 - 2 * !(enum { N = $2 / 2 - 1 };
  0  ($ac_type) ($ac_type) 1  N)  N) - 1) * 2 + 1))];
 test_array [0] = 0

 which fails to compile with errors like:
 
 conftest.c: In function 'main':
 conftest.c:73: error: expected ')' before ';' token
 conftest.c:74: error: expected expression before ']' token
 
 Thus, the check always returns no. And then ./configure of project foo
 aborts because it can find its int types...
 
 This problem isn't there in autoconf 2.64-4.

What an ugly regression.  Confirmed.  bisect converges at:

15f8838bb6239ebc16beb8472de0217a10de3d5e is the first bad commit
commit 15f8838bb6239ebc16beb8472de0217a10de3d5e
Author: Eric Blake e...@byu.net
Date:   Tue Oct 20 08:30:03 2009 -0600

Fix AC_TYPE_UINT64_T on Tru64 with gcc 3.4.4.

* lib/autoconf/types.m4 (_AC_TYPE_UNSIGNED_INT_BODY)
(_AC_TYPE_INT_BODY): Avoid undefined behavior of attempting shift
wider than type.
* NEWS: Document this.
Reported by Rainer Orth.

I think we need to start comparing test results against tables for at
least a couple of systems, in order to guard against such issues.

Cheers,
Ralf



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#560105: autoconf: AC_TYPE_INT32_T generates broken test?

2009-12-08 Thread Ralf Wildenhues

* Ralf Wildenhues wrote on Tue, Dec 08, 2009 at 11:59:26PM CET:
 * Pierre Ynard wrote on Tue, Dec 08, 2009 at 11:42:02PM CET:
  AC_TYPE_INT32_T, and also AC_TYPE_INT16_T and AC_TYPE_INT64_T, output C
  code that looks like:

Patch below.  OK to commit and add Pierre to THANKS?

 I think we need to start comparing test results against tables for at
 least a couple of systems, in order to guard against such issues.

My current idea for this is to have a mode in which AT_CHECK_MACRO
records cache values, or we simply run `testsuite -d' and collect cache
values across all tests, maybe weeding out or commenting out those that
are not consistent across the testsuite; then redo the same for an older
release, and compare.

Thanks,
Ralf

Fix 2.64 AC_TYPE_INT*_T macro body text regression.

* lib/autoconf/types.m4 (_AC_TYPE_INT_BODY): Move helper enum
definition to prologue section, to avoid syntax error.
* NEWS, THANKS: Update.
Report by Pierre Ynard.

diff --git a/NEWS b/NEWS
index 97dcab0..c36584c 100644
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,9 @@ GNU Autoconf NEWS - User visible changes.
 ** Use of m4_divert without a named diversion now issues a syntax warning,
since it is seldom right to change diversions behind autoconf's back.
 
+** The macros AC_TYPE_INT8_T, AC_TYPE_INT16_T, AC_TYPE_INT32_T, and
+   AC_TYPE_INT64_T work again.  Regression introduced in 2.64.
+
 * Major changes in Autoconf 2.65 (2009-11-21) [stable]
   Released by Eric Blake, based on git versions 2.64.*.
 
diff --git a/lib/autoconf/types.m4 b/lib/autoconf/types.m4
index 7a73fc2..3829c4c 100644
--- a/lib/autoconf/types.m4
+++ b/lib/autoconf/types.m4
@@ -635,14 +635,14 @@ m4_define([_AC_TYPE_INT_BODY],
 'long long int' 'short int' 'signed char'; do
AC_COMPILE_IFELSE(
 [AC_LANG_BOOL_COMPILE_TRY(
-   [AC_INCLUDES_DEFAULT],
-   [enum { N = $[]2 / 2 - 1 };
-0  ($ac_type) ($ac_type) 1  N)  N) - 1) * 2 + 1)])],
+   [AC_INCLUDES_DEFAULT
+enum { N = $[]2 / 2 - 1 };],
+   [0  ($ac_type) ($ac_type) 1  N)  N) - 1) * 2 + 1)])],
 [AC_COMPILE_IFELSE(
[AC_LANG_BOOL_COMPILE_TRY(
-  [AC_INCLUDES_DEFAULT],
-  [enum { N = $[]2 / 2 - 1 };
-   ($ac_type) ($ac_type) 1  N)  N) - 1) * 2 + 1)
+  [AC_INCLUDES_DEFAULT
+   enum { N = $[]2 / 2 - 1 };],
+  [($ac_type) ($ac_type) 1  N)  N) - 1) * 2 + 1)
  ($ac_type) ($ac_type) 1  N)  N) - 1) * 2 + 2)])],
[],
[AS_CASE([$ac_type], [int$[]2_t],



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org