This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: declare canonicalize_file_name



* Andrew Cagney writes:
> The call was only just added for the hurd :-( Hmm,
> http://sources.redhat.com/ml/gdb-patches/2002-02/msg00631.html

This was added because realpath() is horribly broken, and that the Hurd
does not define any MAXPATHLEN/PATH_MAX, which in turn breaks realpath().
Which the old code depended on to be defined.

The only obscure function is realpath() that depends on the values of
MAXPATHLEN/PATH_MAX to be defined, which are not required by POSIX,
and on any system that actually provides canonicalize_file_name() it
should be used. Specially on GNU and GNU/Linux.

> Oops, ulgh! if RichardE tweeks to code (as I suggested) to simply
> prefer realpath() it will break the hurd again.  I think prefering
> realpath() is correct (only use an obscure function when forced too)
> but that logic is going to need to be scrambled a bit more :-(.

The code that has been checked in now looks OK, other then the fact that
GNU/Linux will use the obscure function realpath().

-- 
Alfred M. Szmidt


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]