This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/21823] New: MAXPATHLEN usage in [gcc]/fixincludes
- From: "ams at gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 May 2005 15:09:04 -0000
- Subject: [Bug c/21823] New: MAXPATHLEN usage in [gcc]/fixincludes
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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