gnustep-dev
[Top][All Lists]
Advanced

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

fix for 30094 breaks HURD compilation again


From: Riccardo Mottola
Subject: fix for 30094 breaks HURD compilation again
Date: Thu, 10 Jun 2010 23:24:34 +0200
User-agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.9) Gecko/20100418 SeaMonkey/2.0.4

Hi,

Yavor's patch is in theory correct, but in practice wrong. GLIBC is a mess to work with. I already tried to make the original code which used __USE_UNIX98 more portable.

---

Trivial patch attached.

GNU libc supports several kernels: Linux, GNU Mach+Hurd, kFreeBSD and (unofficially) kOpenSolaris. So the correct check in this case is for the symbol /_GLIBC_/, which is guaranteed to be defined on all glibc-based platforms. Perhaps it's worth to leave /_linux_/ for the rare cases when another libc is used with Linux (uClibc, dietlibc, etc.), although I'm not sure if the GNUstep stack works on those systems at all.

---

It is not trivial at all! It took me one evening of testing with David to get that combination of defines to work on all systems I tested. Unfortunately I don't have all the tests at hand I did, however, rereading from my commits, the concept is to define _XOPEN_SOURCE only on certain systems. Namely Linux and Hurd. My define __hurd__ was wrong and replaced with __GNU__

now using __GLIBC__ causes troubles on Hurd with GCC (and possibly other platforms which I don't remember),

I recall that the goal is not to check for GLIBC, but for certain platforms which need some tweaks to get broken glibc working. Sorry if this is not very scientific.

reading:

http://glibc-bsd.alioth.debian.org/porting/PORTING

I propose to check for linux, GNU and GLIBC. I commit the patch, let me know if it works for you all on different systems, I reopened the bug to keep track of that.

Else I think I will revert the check to my version, which was very proven.


Riccardo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]