Pavel Sanda, le Sun 19 Sep 2010 16:59:52 +0200, a écrit : > Samuel Thibault wrote: > > LyX Ticket Tracker, le Sun 19 Sep 2010 13:12:51 -0000, a écrit : > > > i'm no expert on glibc, but man pages explicitly states that realpath > > > shouldn't be used at all. > > > > Please update your manpages. > > why not if you give me root access on that box ;)
Well, any linux box with manpages >= 3.20 will have that latest text. Take debian's http://ftp.de.debian.org/debian/pool/main/m/manpages/manpages_3.25.orig.tar.gz for instance. > > > what is the correct fix for hurd then? > > > > This is precisely the correct fix: just using POSIX 2008's behavior, > > already available in glibc since ages. > > i hope those ages also cover the distros still shipping apparently old man > pages because otherwise this fix will introduce new bugs on other platforms > than hurd. The old manpages still do say that glibc allocates memory in that case, so it'll work there. They are saying it's not a good idea to rely on it because it's a glibc extension, but in my patch I'm precisely using it only with glibc, so it's completely fine. And when I say "ages", I mean it: it was added in 1996... > > Sure, since hurd's libc is glibc. > > > > > i would rather try to put it there "unconditionally" if possible. > > > > Put what? canonicalize_file_name is only a glibc extension so you'd need > > at least detection of this feature. > > to reformulate my question: is there posix solution without ifdefs? No. That's one of the biggest mistakes of Posix. Samuel