This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


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

Re: Patch to nuke POSIX and MAXPATHLEN from xm-*.h


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


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