[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Detecting kfreebsd kernel while compiling [hurd]



Hello,

ludo@gnu.org (Ludovic Courtès) wrote:
> On GNU systems (i.e., GNU/Hurd, GNU/kFreeBSD, GNU/Linux, etc.), the
> GNU C library defines ‘__GLIBC__’.  GNU/Hurd (aka. GNU) additionally
> defines ‘__GNU__’.
> 
> Again, it’s probably the case that your application wants to know about
> the OS (“GNU”) but doesn’t have to worry about the underlying kernel
> (“kFreeBSD”, etc.) since it may not be able to tell the difference.

I know I can say 'defined (__linux__)' to specify GNU/Linux systems,
which are all official Debian architectures.

I know I can say 'defined (__freebsd_kernel__) to specify GNU/kfreebsd
systems, which change to official Debian architectures.

But I don't now how can I specify a GNU/Hurd (with mach-Kernel)
system (hurd-i386), which is still an unofficial port of Debian. I have
only tried 'defined (__hurd__)' which does not work.

I think if I say 'defined (__GNU__)' this is always the same an ALL
Debian systems because Debian alsways use GNU-OS.

Perhaps it could be (HURD) or (__hurd) or (__HURD) ?
It seems I must install an hurd system to can test it - not easy.


Fondest regards,
 Joachim Wiedorn

Attachment: signature.asc
Description: PGP signature


Reply to: