On Sun, Oct 22, 2023 at 4:03 PM <rep.dot....@gmail.com> wrote: > > On 22 October 2023 21:45:12 CEST, Jeff Law <jeffreya...@gmail.com> wrote: > > > > > >On 10/22/23 10:09, Andrew Pinski wrote: > >> On Sun, Oct 22, 2023 at 12:47 AM Florian Weimer <fwei...@redhat.com> wrote: > >>> > >>> Current glibc headers only declare fputs_unlocked for _GNU_SOURCE. > >>> Defining the macro avoids an implicit function declaration. > >> > >> This does not help targets that don't use glibc though. > >> Note for builtins testsuite there is a lib-fputs.c file which will > >> define a fputs_unlock which is how it will link even if the libc does > >> not define a fputs_unlock. > >But isn't fputs_unlocked glibc specific to begin with? ie, the test really > >doesn't make sense AFAICT on non-glibc targets. > > I think uClibc had it too, at least at one point in the past. >
gnulib has these portability notes about fputs_unlocked: https://www.gnu.org/software/gnulib/manual/html_node/fputs_005funlocked.html Unfortunately, it only lists the platforms that *don't* have it, not the ones that *do* have it, so I'm afraid its notes aren't actually that helpful after all... oh well, never mind...