autoconf-patches
[Top][All Lists]
Advanced

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

Re: [PATCH] Add quotes in AS_IF test for gid_t


From: Sam James
Subject: Re: [PATCH] Add quotes in AS_IF test for gid_t
Date: Wed, 07 Feb 2024 21:44:02 +0000
User-agent: mu4e 1.10.8; emacs 30.0.50

Nick Bowler <nbowler@draconx.ca> writes:

> On 2024-02-06 22:33, Sam James wrote:
>> Noticed when building Emacs:
>> ```
>> * checking type of array argument to getgroups... ./configure: 42782: test: 
>> =: unexpected operator
>> ```
>> This turns out to be because of missing quotes in AS_IF for
>> ac_cv_type_gid_t in AC_TYPE_GETGROUPS.
>
> No, I don't think this is the right fix.  The lack of shell quotation is
> not the cause of this problem.

Nick, thanks for your insight as always!

>
> In the AC_TYPE_GETGROUPS macro, ac_cv_type_gid_t should not be empty,
> because Autoconf has code to assign this variable to a nonempty value.
> The fact that it is suggests the problem is elsewhere.
>
> Oh look, I see this line in emacs-29.2/configure.ac:
>
>   AC_DEFUN([AC_TYPE_UID_T])
>
> This is the actual cause of the problem, because AC_TYPE_UID_T is the
> part of Autoconf that would have assigned this variable.  Since Emacs
> has deleted its definition, it has therefore broken other Autoconf
> macros (like AC_TYPE_GETGROUPS) which depend on it.
>
> I don't think it's right to work around damage like this in Autoconf.
>
> The right place to fix this problem is in Emacs.

FWIW, I did mean to note that most other uses seem to be quoted, which
is why it felt like the right fix, but given it would obscure a real
problem, perhaps we better not - even if it would be more consistent.

>
> Cheers,
>   Nick

thanks,
sam



reply via email to

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