From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27502 invoked by alias); 22 May 2005 12:13:07 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 27443 invoked by uid 48); 22 May 2005 12:12:59 -0000 Date: Sun, 22 May 2005 12:13:00 -0000 From: "ams at gnu dot org" To: gcc-bugs@gcc.gnu.org Message-ID: <20050522121257.21706.ams@gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c/21706] New: MAXPATHLEN usage in [gcc]/gcc/tlink.c X-Bugzilla-Reason: CC X-SW-Source: 2005-05/txt/msg03046.txt.bz2 List-Id: 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