Re: Detecting kfreebsd kernel while compiling [hurd]

2010-02-06 Thread Joachim Wiedorn
Hello Guillem, thanks for the whole detailed infos. I will look through the source code and see how it can be optimized. Also thanks for your patch. I will send it to upstream, too. Fondest regards, Joachim Wiedorn signature.asc Description: PGP signature

Re: Detecting kfreebsd kernel while compiling [hurd]

2010-02-05 Thread Guillem Jover
Hi Joachim! On Tue, 2010-02-02 at 14:35:01 +0100, Joachim Wiedorn wrote: > Guillem Jover wrote: > > As being said on the list, explicitly checking for those on the source > > is not usually the correct solution. I've taken a look at the xfe code > But what is the correct solution? It depends. M

Re: Detecting kfreebsd kernel while compiling [hurd]

2010-02-02 Thread Thorsten Glaser
Joachim Wiedorn dixit: >Guillem Jover wrote: >> As being said on the list, explicitly checking for those on the source >> is not usually the correct solution. I've taken a look at the xfe code Also called imake-style. >But what is the correct solution? GNU autof^Htools. Benny is holding a talk

Re: Detecting kfreebsd kernel while compiling [hurd]

2010-02-02 Thread Joachim Wiedorn
Hello Guillem, Guillem Jover wrote: > As being said on the list, explicitly checking for those on the source > is not usually the correct solution. I've taken a look at the xfe code But what is the correct solution? > now, and I see three portability checks. Thanks for looking! > For the tty o

Re: Detecting kfreebsd kernel while compiling [hurd]

2010-02-02 Thread Guillem Jover
Hi! On Mon, 2010-02-01 at 17:43:32 +0100, Joachim Wiedorn wrote: > Luca Bruno wrote: > > From our hurd-i386 porterbox: > > > > lu...@strauss:~$ echo | gcc -g3 -E - | grep -i hurd > > #define __gnu_hurd__ 1 > > lu...@strauss:~$ echo | gcc -g3 -E - | grep -i gnu > > #define __GNUC__ 4 > > #define

Re: Detecting kfreebsd kernel while compiling [hurd]

2010-02-01 Thread Joachim Wiedorn
Hello Luca, Luca Bruno wrote: > From our hurd-i386 porterbox: > > lu...@strauss:~$ echo | gcc -g3 -E - | grep -i hurd > #define __gnu_hurd__ 1 > lu...@strauss:~$ echo | gcc -g3 -E - | grep -i gnu > #define __GNUC__ 4 > #define __GNUC_MINOR__ 4 > #define __GNUC_PATCHLEVEL__ 3 > #define __GNUC_GN

Re: Detecting kfreebsd kernel while compiling [hurd]

2010-01-31 Thread Ludovic Courtès
Hi, Joachim Wiedorn writes: > 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 >

Re: Detecting kfreebsd kernel while compiling [hurd]

2010-01-31 Thread Luca Bruno
Joachim Wiedorn scrisse: > 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 > Deb

Re: Detecting kfreebsd kernel while compiling [hurd]

2010-01-31 Thread Joachim Wiedorn
Hello, l...@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

Re: Detecting kfreebsd kernel while compiling [hurd]

2010-01-30 Thread Ludovic Courtès
Hi, Joachim Wiedorn writes: > Joachim Wiedorn wrote: [...] > But now I see it is not so easy to test it on other architectures. Does > some now how gcc give the string for 'hurd-i386' architectures? I have > thought it should be simple: > >__hurd__ > > But it seems not. On GNU systems (i

Re: Detecting kfreebsd kernel while compiling [hurd]

2010-01-30 Thread Thorsten Glaser
Joachim Wiedorn dixit: >But now I see it is not so easy to test it on other architectures. Does >some now how gcc give the string for 'hurd-i386' architectures? I have >thought it should be simple: There's the Mach kernel, the Hurd set of translators, the eglibc and the i386 platform. The Debian

Re: Detecting kfreebsd kernel while compiling [hurd]

2010-01-30 Thread Joachim Wiedorn
Hello, Joachim Wiedorn wrote: > > Useful trick (at least if you have an installation, VM or porterbox > > acces): echo | gcc -E -dD - | less > > Wonderful - that is it! Now I can test this an all other architectures > to see which strings are available. But now I see it is not so easy to test i