public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/21706] New: MAXPATHLEN usage in [gcc]/gcc/tlink.c
@ 2005-05-22 12:13 ams at gnu dot org
  2005-05-22 13:52 ` [Bug c/21706] " schwinge-bugzilla-gcc dot gnu dot org at nic-nac-project dot de
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: ams at gnu dot org @ 2005-05-22 12:13 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-06-19 14:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-22 12:13 [Bug c/21706] New: MAXPATHLEN usage in [gcc]/gcc/tlink.c ams at gnu dot org
2005-05-22 13:52 ` [Bug c/21706] " schwinge-bugzilla-gcc dot gnu dot org at nic-nac-project dot de
2005-05-22 14:04 ` [Bug middle-end/21706] " pinskia at gcc dot gnu dot org
2005-05-22 15:35 ` gdr at integrable-solutions dot net
2005-05-22 15:36 ` schwab at suse dot de
2005-05-26 13:51 ` ams at gnu dot org
2005-05-30 15:23 ` pinskia at gcc dot gnu dot org
2005-06-19 14:00 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).