Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Thu, 16 Feb 2012 00:11:59 -0500
From: Rich Felker <>
Subject: Re: Little nit in string.h

On Wed, Feb 15, 2012 at 09:04:26PM -0800, Isaac Dunham wrote:
> libiberty is declaring it as an extern, if __linux__ or any other
> indicator of a FOSS libc (OpenBSD, GNU Libc, Cygwin...) is detected.
> Yes, I know this is completely wrong and insane (as is most of the
> GNU approach).

Yes, this is completely wrong, and the only solution I see is the one
I suggested (the non-prototype declaration).

> basename in string.h is guarded by _GNU_SOURCE (in both musl &
> glibc), so if you don't define that, musl/glibc would still work
> fine. If you define it, include string.h, and then include libgen.h,
> it certainly won't work with glibc; currently musl would accept
> that.

You mean if you included both in libiberty? It certainly works to
include both in other programs using glibc as long as those programs
don't declare their own basename...

> It would be possible to  
> #undef basename
> in libgen.h, but I don't like that idea. 

I don't quite follow..


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.