This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch to nuke POSIX and MAXPATHLEN from xm-*.h
- To: ghazi at caip dot rutgers dot edu
- Subject: Re: Patch to nuke POSIX and MAXPATHLEN from xm-*.h
- From: Mark Kettenis <kettenis at science dot uva dot nl>
- Date: Thu, 8 Mar 2001 12:20:50 +0100 (MET)
- CC: gcc-patches at gcc dot gnu dot org
Hi Kaveh,
I'm having some problems with the MAXPATHLEN changes. On the Hurd
MAXPATHLEN isn't defined, and for a reason: there is no fixed limit on
path names. Portable code shouldn't rely on MAXPATHLEN (it should use
dynamically allocated buffers instead), and therefore I think that
putting a definition of MAXPATHLEN into system.h is wrong.
The only places where MAXPATHLEN is currently used is in collect2
(where it is only used for legacy systems that define
SUNOS4_SHARED_LIBRARIES), and in fixincl (which IMHO is a piece of
junk that needs a good code cleanup). Adding MAXPATHLEN to system.h
might result in a more widespread use. And by setting MAXPATHLEN to
512 you're in a way crippling fixincl for the Hurd, restricting it to
path names of 512 bytes instead of the previous limit of 4096.
Mark