[Top][All Lists]
[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 06:17:19 -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 12:41 AM:
Paolo Bonzini <bonzini <at> gnu.org> writes:
> >> Should that be "int$[]2_t", rather than '', since we want shell
expansion of $2
> >> to take place in creating $ac_type?
> >
> > Indeed.
> >
>
> Here's the patch with the above changes.
Fix these problems, then apply.
> +# _AC_TYPE_INT_BODY
> +# -----------------
> +# Shell function body for _AC_TYPE_INT.
> +m4_define([_AC_TYPE_INT_BODY],
> +[ AS_LINENO_PUSH([$[]1])
> + AC_CACHE_CHECK([for int$[]2_t], [$[]3],
int$[]2_t is buggy. You want int${2}_t, since the variable $2_t is not
defined.
[side note: Posix 200x states that ${2} gives unspecified behavior in m4.
This is because Posix has always required $10 to be the first argument
concatenated with 0 rather than the tenth argument; and my plans for
future m4 is that it will eventually need ${{10}} rather than $10 for the
tenth argument. My planned use of double {} for m4 is intentional;
discussion on this list has convinced me that too much existing code would
have to be audited if m4 started consuming ${10} - so even though Posix is
leaving it undefined, we can rely on GNU m4 using ${2} as itself rather
than the second parameter. The upshot of this is that while int$[]{2}_t
is technically more portable to other Posix m4 implementations, omitting
the [] shouldn't make a difference in autoconf where we are tied to GNU m4.]
> + [AS_VAR_SET([$[]3], [no])
> + for ac_type in "int$[]2_t" 'int' 'long int' \
Likewise.
> + [AS_CASE([$ac_type], [int$[]2_t],
And again.
> +AC_DEFUN([_AC_TYPE_INT],
> +[AC_REQUIRE_SHELL_FN([ac_func_c_find_intX_t],
> + [AS_FUNCTION_DESCRIBE([ac_func_c_find_intX_t], [LINENO BITS],
Add VAR to the list of shell function parameters.
> +m4_define([_AC_TYPE_UNSIGNED_INT_BODY],
> +[ AS_LINENO_PUSH([$[]1])
> + AC_CACHE_CHECK([for uint$[]2_t], $[]3,
Same four comments for the unsigned variant.
- --
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
iEUEARECAAYFAkkHAs8ACgkQ84KuGfSFAYBnmACYhoMBN8RMKMkIDMW3y8+5SjZe
FwCfVtAnbOaiLQvkk8R9yvOq/AlsQPA=
=SQf9
-----END PGP SIGNATURE-----
- [PATCH 12/12] use a shell function for AC_TYPE_INTx_T, Paolo Bonzini, 2008/10/20
- [PATCH 12/12] use a shell function for AC_TYPE_INTx_T, Paolo Bonzini, 2008/10/27
- Re: [PATCH 12/12] use a shell function for AC_TYPE_INTx_T, Eric Blake, 2008/10/27
- Re: [PATCH 12/12] use a shell function for AC_TYPE_INTx_T, Ralf Wildenhues, 2008/10/28
- Re: [PATCH 12/12] use a shell function for AC_TYPE_INTx_T, Paolo Bonzini, 2008/10/28
- Re: [PATCH 12/12] use a shell function for AC_TYPE_INTx_T, Eric Blake, 2008/10/28
- Re: [PATCH 12/12] use a shell function for AC_TYPE_INTx_T, Paolo Bonzini, 2008/10/28
- Re: [PATCH 12/12] use a shell function for AC_TYPE_INTx_T, Ralf Wildenhues, 2008/10/28
- Re: [PATCH 12/12] use a shell function for AC_TYPE_INTx_T, Paolo Bonzini, 2008/10/28
- Re: [PATCH 12/12] use a shell function for AC_TYPE_INTx_T, Ralf Wildenhues, 2008/10/28
- Re: [PATCH 12/12] use a shell function for AC_TYPE_INTx_T, Eric Blake, 2008/10/28