Re: GCC Preprocessor directives for GNU/Hurd?
On Thu, 2015-12-17 at 22:39 +0900, Roger Shimizu wrote:
> On Thu, Dec 17, 2015 at 10:03 PM, Svante Signell
> <email@example.com> wrote:
> > On Thu, 2015-12-17 at 21:05 +0900, Roger Shimizu wrote:
> > > > For GNU/Hurd the preprocessor directive is __GNU__
> > >
> > > Thanks for your reply!
> > > I guess like Linux and kFreeBSD, __GLIBC__ is also set in Debian Hurd,
> > > right?
> > >
> > No, __GLIBC__ is not set by default for Hurd, only when <features.h> is
> > included:
> Thanks for the detailed way to verify those!
> I confirmed for __GLIBC__, it's the same situation under GNU/Linux,
> which default is "No", but turn to "Yes" after include <features.h>.
> Since basic function like <stdio.h> or <string.h>, etc. also include
> <features.h>, it's safe for most common application to treat __GLIBC__
> as "Yes" for Linux and Hurd.
I would prefer to answer no on this question, it is only kFreeBSD that defines
__GLIBC__ unconditionally. I've experienced packages assuming that __GLIBC__ is
defined, and therefore FTBFS on GNU/Hurd.