Follow @Openwall on Twitter for new release announcements and other news
[<prev] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251003010914.GH1827@brightrain.aerifal.cx>
Date: Thu, 2 Oct 2025 21:09:14 -0400
From: Rich Felker <dalias@...c.org>
To: "Jun. T" <takimoto-j@....biglobe.ne.jp>
Cc: musl@...ts.openwall.com
Subject: Re: Bug?: weak alias fpurge() may better be removed

On Fri, Oct 03, 2025 at 08:42:03AM +0900, Jun. T wrote:
> fpurge() exists as a weak_alias in stdio/ext.c, but it is not
> declared in any header files. This causes a problem when building,
> for example, zsh:
> 
> AC_CHECK_FUNCS(fpurge) finds the alias and defines HAVE_FPURGE,
> but compiling a C code using fpurge() fails since it can't be
> found in any headers.
> 
> It seems fpurge() is removed from stdio.h by an old commit:
> a34b0465ba14c70532b8eaba650a9eac228fce57
> 
> Is there any reason that the weak_alias needs be kept?

If anything has linked to it, removing the symbol would break those
binaries. I'm not sure if this is justifiable. Configure tests that
just check for linkability without testing for successful compilation
are buggy and really really need to be fixed. They will cause massive
breakage when the right feature-test macros are not defined to expose
symbols the program is going to try to use, especially with modern gcc
and clang versions that default to disallowing implicit function
declarations.

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.