bug-gnulib
[Top][All Lists]
Advanced

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

Re: Bug report: bad check for ELF binary format


From: Ben Pfaff
Subject: Re: Bug report: bad check for ELF binary format
Date: Sun, 29 Nov 2020 21:46:13 -0800

On Sun, Nov 29, 2020 at 9:43 PM comex <comexk@gmail.com> wrote:
>
> From m4/lib-prefix.m4:
>
> --
>   AC_CACHE_CHECK([for ELF binary format], [gl_cv_elf],
>     [AC_EGREP_CPP([Extensible Linking Format],
>        [#ifdef __ELF__
>         Extensible Linking Format
>         #endif
>        ],
>        [gl_cv_elf=yes],
>        [gl_cv_elf=no])
>      ])
>   if test $gl_cv_elf; then
>
>
> I believe this does not work as intended.  'test $gl_cv_elf' is equivalent to 
> 'test -n $gl_cv_elf', i.e. it tests whether the variable is nonempty.  Both 
> ‘yes’ and ‘no’ are nonempty, so the ‘if’ will always be taken.

Hmm, also ELF stands for "Executable and Linking Format", not
"Extensible Linking Format".



reply via email to

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