The way MAXPATHLEN is used in fixincludes (server.c and fixincl.c) is wrong,
instead of defining a bogus value on platforms that do not have MAXPATHLEN
defined (i.e. GNU) one should try and use getcwd as follows:

  char *dir = getcwd (NULL, 0);

instead of passing a buffer and a size.

This will only work on systems that use the GNU C Library.

-- 
           Summary: MAXPATHLEN usage in [gcc]/fixincludes
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ams at gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-gnu0.3
  GCC host triplet: i686-pc-gnu0.3
GCC target triplet: i686-pc-gnu0.3


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21823

Reply via email to