From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Giuseppe Scrivano Newsgroups: gmane.emacs.devel Subject: Re: emacs & MAXPATHLEN Date: Fri, 29 Jul 2005 20:30:15 +0200 Message-ID: <87ack5xy6g.fsf@gmail.com> References: <87fytzj6a7.fsf@gmail.com> <87pst2h35e.fsf@gmail.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1122661921 7774 80.91.229.2 (29 Jul 2005 18:32:01 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 29 Jul 2005 18:32:01 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 29 20:31:56 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DyZdp-0000mf-7p for ged-emacs-devel@m.gmane.org; Fri, 29 Jul 2005 20:31:29 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DyZgK-0000wI-M9 for ged-emacs-devel@m.gmane.org; Fri, 29 Jul 2005 14:34:04 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DyZg2-0000sN-4G for emacs-devel@gnu.org; Fri, 29 Jul 2005 14:33:46 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DyZg0-0000rS-Ck for emacs-devel@gnu.org; Fri, 29 Jul 2005 14:33:44 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DyZfz-0000r4-Vn for emacs-devel@gnu.org; Fri, 29 Jul 2005 14:33:43 -0400 Original-Received: from [64.233.170.206] (helo=rproxy.gmail.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DyZo4-00006A-KX for emacs-devel@gnu.org; Fri, 29 Jul 2005 14:42:04 -0400 Original-Received: by rproxy.gmail.com with SMTP id y7so1094759rne for ; Fri, 29 Jul 2005 11:30:11 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:to:cc:subject:references:from:date:in-reply-to:message-id:user-agent:mime-version:content-type; b=aEU/KUy3ue6jvyTa3neLq/VV0mJ6lml5f9krBfWOz03SeyboZNDc1zkbjOGlKzPpfZZbou/IokI4BEtSxI4LyU+CaKas10XjEL64sTBJ4czp0bHmCu6cKt3cMKNQF5bS6ecb3bsbWr+nWS3HLmY0JYRFeIEFONbI0APmx8x5tiE= Original-Received: by 10.38.97.1 with SMTP id u1mr1745219rnb; Fri, 29 Jul 2005 11:30:11 -0700 (PDT) Original-Received: from steel ([80.181.159.241]) by mx.gmail.com with ESMTP id 3sm4998587rnr.2005.07.29.11.30.10; Fri, 29 Jul 2005 11:30:11 -0700 (PDT) Original-Received: from gscrivano by steel with local (Exim 4.52) id 1DyZcd-0007hW-Vy; Fri, 29 Jul 2005 20:30:15 +0200 Original-To: rms@gnu.org In-Reply-To: (Richard M. Stallman's message of "Fri, 29 Jul 2005 09:54:05 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:41318 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:41318 "Richard M. Stallman" writes: OK, I will fix that errors and make the getcwd code allocated dynamically. Giuseppe Scrivano > You're right that xsmfns.c needs to be fixed too. I overlooked that > one. > > > +#ifdef _GNU_SOURCE > > The purpose of _GNU_SOURCE is to control the behavior of > system header files. User programs should not test it, only set it. > We could have config test for the existence of get_current_dir_name. > > + buf = malloc(strlen(pwd)+1); > + if(!buf) > + fatal ("`malloc' failed in init_buffer\n"); > > Our convention for whitespace is > > + buf = malloc (strlen (pwd)+1); > + if (!buf) > + fatal ("`malloc' failed in init_buffer\n"); > > However, the main thing is that you haven't got rid of the > arbitrary limit. You allocate the buffer dynamically, > but you don't make it bigger if the data doesn't fit.