From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Richard M. Stallman" Newsgroups: gmane.emacs.devel Subject: Re: emacs & MAXPATHLEN Date: Fri, 29 Jul 2005 09:54:05 -0400 Message-ID: References: <87fytzj6a7.fsf@gmail.com> <87pst2h35e.fsf@gmail.com> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1122645961 22537 80.91.229.2 (29 Jul 2005 14:06:01 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 29 Jul 2005 14:06: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 16:06:00 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DyVU7-0006zI-Ng for ged-emacs-devel@m.gmane.org; Fri, 29 Jul 2005 16:05:11 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DyVWc-00062P-KM for ged-emacs-devel@m.gmane.org; Fri, 29 Jul 2005 10:07:46 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DyVTb-0005I3-92 for emacs-devel@gnu.org; Fri, 29 Jul 2005 10:04:39 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DyVTO-00059O-Sv for emacs-devel@gnu.org; Fri, 29 Jul 2005 10:04:27 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DyVTN-00055i-Mm for emacs-devel@gnu.org; Fri, 29 Jul 2005 10:04:25 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DyVVe-0006w9-1u for emacs-devel@gnu.org; Fri, 29 Jul 2005 10:06:46 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1DyVJN-0006fa-4H; Fri, 29 Jul 2005 09:54:05 -0400 Original-To: Giuseppe Scrivano In-reply-to: <87pst2h35e.fsf@gmail.com> (message from Giuseppe Scrivano on Fri, 29 Jul 2005 02:22:37 +0200) 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:41307 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:41307 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.