autoconf-patches
[Top][All Lists]
Advanced

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

Re: [PATCH 12/12] use a shell function for AC_TYPE_INTx_T


From: Eric Blake
Subject: Re: [PATCH 12/12] use a shell function for AC_TYPE_INTx_T
Date: Tue, 28 Oct 2008 21:53:48 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.17) Gecko/20080914 Thunderbird/2.0.0.17 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Paolo Bonzini on 10/28/2008 8:29 AM:
>>> I'll do $[]2${ac_nonexistent_var}_t for the AC_CACHE_CHECK, and
>>> int$[]2""_t elsewhere.
>> Since, as you pointed out, POSIX requires $2_t to be equivalent to ${2}_t, 
>> do 
>> we really need the hack of ${ac_nonexistent_var} after all?
> 
> Better to err on the safe side, since both you and Ralf were suspicious.

I think our suspicions were unfounded; I'm committing this to simplify the
code.

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

Eric Blake             address@hidden
-----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

iEYEARECAAYFAkkH3ksACgkQ84KuGfSFAYDjyACg0Is6ZHIfDakLl+7N5R0NYPmh
3GoAnimz6NMPs44Stl8ECaWxXDaW3/NU
=D6J6
-----END PGP SIGNATURE-----
>From 11c8919bdbe8690c43bbeeceb27d636b4eb371bc Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Tue, 28 Oct 2008 20:45:58 -0600
Subject: [PATCH] Undo needless efforts to protect $2 in $2_t.

* lib/autoconf/types.m4 (_AC_TYPE_INT_BODY)
(_AC_TYPE_UNSIGNED_INT_BODY): Reduce extra quoting.

Signed-off-by: Eric Blake <address@hidden>
---
 ChangeLog             |    6 ++++++
 lib/autoconf/types.m4 |   12 ++++++------
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b5d860f..3d9d6fd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-10-28  Eric Blake  <address@hidden>
+
+       Undo needless efforts to protect $2 in $2_t.
+       * lib/autoconf/types.m4 (_AC_TYPE_INT_BODY)
+       (_AC_TYPE_UNSIGNED_INT_BODY): Reduce extra quoting.
+
 2008-10-28  Ralf Wildenhues  <address@hidden>
 
        Fix parallel test execution output lossage.
diff --git a/lib/autoconf/types.m4 b/lib/autoconf/types.m4
index 5e48a16..6360d40 100644
--- a/lib/autoconf/types.m4
+++ b/lib/autoconf/types.m4
@@ -647,9 +647,9 @@ AC_DEFUN([AC_TYPE_UINT64_T], [_AC_TYPE_UNSIGNED_INT(64)])
 # Shell function body for _AC_TYPE_INT.
 m4_define([_AC_TYPE_INT_BODY],
 [  AS_LINENO_PUSH([$[]1])
-  AC_CACHE_CHECK([for int$[]2${ac_nonexistent_var}_t], [$[]3],
+  AC_CACHE_CHECK([for int$[]2_t], [$[]3],
     [AS_VAR_SET([$[]3], [no])
-     for ac_type in int$[]2""_t 'int' 'long int' \
+     for ac_type in int$[]2_t 'int' 'long int' \
         'long long int' 'short int' 'signed char'; do
        AC_COMPILE_IFELSE(
         [AC_LANG_BOOL_COMPILE_TRY(
@@ -661,7 +661,7 @@ m4_define([_AC_TYPE_INT_BODY],
               [($ac_type) (((($ac_type) 1 << ($[]2 - 2)) - 1) * 2 + 1)
                 < ($ac_type) (((($ac_type) 1 << ($[]2 - 2)) - 1) * 2 + 2)])],
            [],
-           [AS_CASE([$ac_type], [int$[]2""_t],
+           [AS_CASE([$ac_type], [int$[]2_t],
               [AS_VAR_SET([$[]3], [yes])],
               [AS_VAR_SET([$[]3], [$ac_type])])])])
        AS_VAR_IF([$[]3], [no], [], [break])
@@ -697,15 +697,15 @@ esac
 # Shell function body for _AC_TYPE_UNSIGNED_INT.
 m4_define([_AC_TYPE_UNSIGNED_INT_BODY],
 [  AS_LINENO_PUSH([$[]1])
-  AC_CACHE_CHECK([for uint$[]2${ac_nonexistent_var}_t], $[]3,
+  AC_CACHE_CHECK([for uint$[]2_t], $[]3,
     [AS_VAR_SET([$[]3], [no])
-     for ac_type in uint$[]2""_t 'unsigned int' 'unsigned long int' \
+     for ac_type in uint$[]2_t 'unsigned int' 'unsigned long int' \
         'unsigned long long int' 'unsigned short int' 'unsigned char'; do
        AC_COMPILE_IFELSE(
         [AC_LANG_BOOL_COMPILE_TRY(
            [AC_INCLUDES_DEFAULT],
            [($ac_type) -1 >> ($[]2 - 1) == 1])],
-        [AS_CASE([$ac_type], [uint$[]2""_t],
+        [AS_CASE([$ac_type], [uint$[]2_t],
            [AS_VAR_SET([$[]3], [yes])],
            [AS_VAR_SET([$[]3], [$ac_type])])])
        AS_VAR_IF([$[]3], [no], [], [break])
-- 
1.6.0.2


reply via email to

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