[Bug c/21706] New: MAXPATHLEN usage in [gcc]/gcc/tlink.c
ams at gnu dot org
gcc-bugzilla@gcc.gnu.org
Sun May 22 12:13:00 GMT 2005
Please do not use MAXPATHLEN, it is a arbitrary limit, and is not
defined on GNU. Currently gcc 4.0.0 is unbuildable on GNU since
[gcc]/gcc/tlink.c assumes that MAXPATHLEN is defined. Please do not
use these kind of limits in GNU programs.
Suggested fix is to declare initial_cwd as:
char *initial_cwd;
and then instead of doing:
getcwd (initial_cwd, sizeof (initial_cwd));
do:
initial_cwd = getcwd (NULL, 0);
Note: getcwd (NULL, 0) is a GNU extention, and might not be available
on non-GNU platforms. (End of Note)
Sorry for not supplying a patch, happy hacking.
--
Summary: MAXPATHLEN usage in [gcc]/gcc/tlink.c
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: critical
Priority: P1
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=21706
More information about the Gcc-bugs
mailing list