From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 30 12:52:57 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 106C0106564A; Sat, 30 Jul 2011 12:52:57 +0000 (UTC) (envelope-from guillemj@ono.com) Received: from resmaa14.ono.com (smtp14.ono.com [62.42.230.176]) by mx1.freebsd.org (Postfix) with ESMTP id BEFC18FC0A; Sat, 30 Jul 2011 12:52:56 +0000 (UTC) Received: from gaara.hadrons.org (85.136.146.198) by resmaa14.ono.com (8.5.113) (authenticated as guillemj@ono.com) id 4D7F86D501BDD83D; Sat, 30 Jul 2011 14:40:31 +0200 Received: from guillem by gaara.hadrons.org with local (Exim 4.76) (envelope-from ) id 1Qn8qE-0001z2-18; Sat, 30 Jul 2011 14:40:30 +0200 Date: Sat, 30 Jul 2011 14:40:29 +0200 From: Guillem Jover To: Robert Millan Message-ID: <20110730124029.GA2817@gaara.hadrons.org> Mail-Followup-To: Robert Millan , Ed Schouten , freebsd-hackers@freebsd.org, Ed Maste , debian-hurd@lists.debian.org References: <20110707100123.GF71453@hoeg.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: debian-hurd@lists.debian.org, Ed Schouten , Ed Maste , freebsd-hackers@freebsd.org Subject: Re: [PATCH] avoid assuming MAXPATHLEN in config(8) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2011 12:52:57 -0000 Hi! On Thu, 2011-07-07 at 13:12:03 +0200, Robert Millan wrote: > 2011/7/7 Ed Schouten : > > Even though it is good to make our code conform to standards as much as > > possible, do keep in mind that your patch also causes a lot of > > regressions in that area. The code now uses asprintf(), which is not > > part of POSIX. I also think the use of __GLIBC__ is frowned upon. > > Uhm... you're right. Actually I knew asprintf() is not part of POSIX, > it just didn't occur to me that this contradicted my point about > MAXPATHLEN [1]. > [1] Btw, POSIX itself is quite contradictory too: it doesn't let you > assume MAXPATHLEN, but it doesn't give you the facilities you need in > case it isn't present (e.g. asprintf and canonicalize_file_name but > gethostname and getline / fgetln come to mind too). Well, canonicalize_file_name() has been standardized in POSIX.1-2008 as realpath(path, NULL), which GNU/* and FreeBSD have supported for a long time. getline() is also part of POSIX.1-2008. regards, guillem