bug-autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug#560105: autoconf: AC_TYPE_INT32_T generates broken test?


From: Ralf Wildenhues
Subject: Re: Bug#560105: autoconf: AC_TYPE_INT32_T generates broken test?
Date: Wed, 9 Dec 2009 07:25:33 +0100
User-agent: Mutt/1.5.20 (2009-10-28)

* 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],




reply via email to

[Prev in Thread] Current Thread [Next in Thread]