From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31939 invoked by alias); 8 Aug 2007 14:13:06 -0000 Received: (qmail 31562 invoked by uid 22791); 8 Aug 2007 14:13:04 -0000 X-Spam-Check-By: sourceware.org Received: from iona.labri.fr (HELO iona.labri.fr) (147.210.8.143) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 08 Aug 2007 14:12:58 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by iona.labri.fr (Postfix) with ESMTP id 8757C90067; Wed, 8 Aug 2007 16:11:56 +0200 (CEST) Received: from iona.labri.fr ([127.0.0.1]) by localhost (iona.labri.fr [127.0.0.1]) (amavisd-new, port 10024) with LMTP id BC8QWRfT-IC1; Wed, 8 Aug 2007 16:11:56 +0200 (CEST) Received: from implementation.famille.thibault.fr (laptop-147-210-128-192.labri.fr [147.210.128.192]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by iona.labri.fr (Postfix) with ESMTP id 0FFE59005A; Wed, 8 Aug 2007 16:11:56 +0200 (CEST) Received: from samy by implementation.famille.thibault.fr with local (Exim 4.67) (envelope-from ) id 1IImHO-00021S-VX; Wed, 08 Aug 2007 16:12:55 +0200 Date: Wed, 08 Aug 2007 14:13:00 -0000 From: Samuel Thibault To: Ian Lance Taylor Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] drop MAXPATHLEN dependency from gcc/tlink.c Message-ID: <20070808141254.GD3292@implementation.labri.fr> References: <20070724203941.GE3700@interface.famille.thibault.fr> <20070801210310.GC3667@interface.famille.thibault.fr> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="ZPt4rx8FFjLCG7dd" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.11 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2007-08/txt/msg00508.txt.bz2 --ZPt4rx8FFjLCG7dd Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-length: 273 Ian Lance Taylor, le Wed 08 Aug 2007 07:00:16 -0700, a écrit : > > - getcwd (initial_cwd, sizeof (initial_cwd)); > > + initial_cwd = getpwd(); > > Space before left parenthesis. Yes I had already fixed that in my latest post. Here is a changelog-fixed version. Samuel --ZPt4rx8FFjLCG7dd Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=patch-gcc-tlink Content-length: 895 2007-08-01 Samuel Thibault * gcc/tlink.c: Include "libiberty.h" (initial_cwd): Change type into char*. (tlink_init): Call getpwd instead of getcwd. Index: gcc/tlink.c =================================================================== --- gcc/tlink.c (revision 127116) +++ gcc/tlink.c (copie de travail) @@ -30,6 +30,7 @@ #include "hashtab.h" #include "demangle.h" #include "collect2.h" +#include "libiberty.h" #define MAX_ITERATIONS 17 @@ -38,7 +39,7 @@ static int tlink_verbose; -static char initial_cwd[MAXPATHLEN + 1]; +static char *initial_cwd; /* Hash table boilerplate for working with htab_t. We have hash tables for symbol names, file names, and demangled symbols. */ @@ -274,7 +275,7 @@ tlink_verbose = 3; } - getcwd (initial_cwd, sizeof (initial_cwd)); + initial_cwd = getpwd (); } static int --ZPt4rx8FFjLCG7dd--