From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Alfred M\. Szmidt" Newsgroups: gmane.emacs.devel Subject: Re: emacs & MAXPATHLEN Date: Sat, 30 Jul 2005 13:53:20 +0200 Message-ID: <1122724400.456845.1155.nullmailer@Update.UU.SE> References: <87fytzj6a7.fsf@gmail.com> <87pst2h35e.fsf@gmail.com> <87r7dhxenv.fsf@gmail.com> Reply-To: ams@gnu.org NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1122726628 29001 80.91.229.2 (30 Jul 2005 12:30:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 30 Jul 2005 12:30:28 +0000 (UTC) Cc: gscrivano@gmail.com, rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jul 30 14:30:26 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DyqTa-0003KS-Ha for ged-emacs-devel@m.gmane.org; Sat, 30 Jul 2005 14:30:02 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DyqW7-0004il-Rf for ged-emacs-devel@m.gmane.org; Sat, 30 Jul 2005 08:32:40 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DyqBr-000430-7X for emacs-devel@gnu.org; Sat, 30 Jul 2005 08:11:43 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DyqBn-00041Z-6D for emacs-devel@gnu.org; Sat, 30 Jul 2005 08:11:40 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dyq3u-0002IY-1M for emacs-devel@gnu.org; Sat, 30 Jul 2005 08:03:30 -0400 Original-Received: from [130.238.4.154] (helo=colibri.its.uu.se) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Dyq5t-0003DB-Qe; Sat, 30 Jul 2005 08:05:34 -0400 Original-Received: by colibri.its.uu.se (Postfix, from userid 211) id F3395339; Sat, 30 Jul 2005 13:53:30 +0200 (DFT) Original-Received: from colibri.its.uu.se(127.0.0.1) by colibri.its.uu.se via virus-scan id s14345; Sat, 30 Jul 05 13:53:21 +0200 Original-Received: from Psilocybe.Update.UU.SE (Psilocybe.Update.UU.SE [130.238.19.25]) by colibri.its.uu.se (Postfix) with ESMTP id 5F9B72F3; Sat, 30 Jul 2005 13:53:21 +0200 (DFT) Original-Received: from localhost (localhost [127.0.0.1]) by Psilocybe.Update.UU.SE (Postfix) with ESMTP id 4D95744004; Sat, 30 Jul 2005 13:53:21 +0200 (CEST) Original-Received: from Psilocybe.Update.UU.SE ([127.0.0.1]) by localhost (Psilocybe [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 29265-04-4; Sat, 30 Jul 2005 13:53:20 +0200 (CEST) Original-Received: from Update.UU.SE (Lem.Update.UU.SE [130.238.19.73]) by Psilocybe.Update.UU.SE (Postfix) with SMTP id 9167544002; Sat, 30 Jul 2005 13:53:20 +0200 (CEST) Original-Received: (nullmailer pid 1156 invoked by uid 30270); Sat, 30 Jul 2005 11:53:20 -0000 Original-To: Eli Zaretskii In-reply-to: (message from Eli Zaretskii on Sat, 30 Jul 2005 13:56:33 +0300) 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:41338 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:41338 I also wonder whether we should keep the "#ifdef MAXPATHLEN" branch, or just use the loop below on all platforms that have getcwd. If MAXPATHLEN is defined, it should be respected, if you try to use a file name that is longer than MAXPATHLEN then the behaviour of the system is undefined. Maybe just something like: #ifdef MAXPATHLEN if (buf_size >= MAXPATHLEN) break; #endif Would be sufficient for platforms with MAXPATHLEN, and then just use that in the loop.