Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Jul 2011 14:40:29 +0200
From:      Guillem Jover <guillem@debian.org>
To:        Robert Millan <rmh@debian.org>
Cc:        debian-hurd@lists.debian.org, Ed Schouten <ed@80386.nl>, Ed Maste <emaste@freebsd.org>, freebsd-hackers@freebsd.org
Subject:   Re: [PATCH] avoid assuming MAXPATHLEN in config(8)
Message-ID:  <20110730124029.GA2817@gaara.hadrons.org>
In-Reply-To: <CAOfDtXN0RkYaWKidXjwJd3UP9LNmW0BdFqH5boMUA_W19%2BsUiQ@mail.gmail.com>
References:  <CAOfDtXNreaFYKvyR_C15dk9mOqU30_Z4gHxQPkPH5ntY7rRtzA@mail.gmail.com> <20110707100123.GF71453@hoeg.nl> <CAOfDtXN0RkYaWKidXjwJd3UP9LNmW0BdFqH5boMUA_W19%2BsUiQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi!

On Thu, 2011-07-07 at 13:12:03 +0200, Robert Millan wrote:
> 2011/7/7 Ed Schouten <ed@80386.nl>:
> > 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110730124029.GA2817>