Eli Schwartz <eschwa...@gentoo.org> reported that the 'fpurge' configure test,
on musl libc, produces different results
  a) with CC="gcc"
  b) with CC="gcc -Werror=implicit-function-declaration" (which is used as
     an approximation for strict C23 compilers, such as recent clang releases
     with -std=gnu23).
     
In case a):
ac_cv_func___fpurge=yes
ac_cv_func_fpurge=yes
ac_cv_have_decl_fpurge=no
gl_cv_func_fpurge_works=yes
REPLACE_FPURGE=0
A file fpurge.o is not created.

In case b):
ac_cv_func___fpurge=yes
ac_cv_func_fpurge=yes
ac_cv_have_decl_fpurge=no
gl_cv_func_fpurge_works=no
REPLACE_FPURGE=1
A file fpurge.o is created, that implements rpl_fpurge through a call to 
__fpurge.

Since it looks like the fpurge function in musl libc is an unintended left-over 
from earlier releases, it is better to have the outcome of b) in both cases.

This patch does it.


2024-11-26  Bruno Haible  <br...@clisp.org>

        fpurge: Improve configure test.
        Reported by Eli Schwartz <eschwa...@gentoo.org>.
        * m4/fpurge.m4 (gl_FUNC_FPURGE): If fpurge is not declared, don't test
        whether it works.

https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=043bfdaebae7ea885befb2710200d59f2ec4b349




Reply via email to