config(8) assumes MAXPATHLEN is defined in a few places, but presence
of this macro isn't garanteed (POSIX says that it is only present when
a file length limit exists, which may not be the case).
This patch fixes a usr.sbin/config compile problem on Debian GNU/Hurd
by using dynamic allocation. D
Hi Robert,
* Robert Millan , 20110707 11:33:
> config(8) assumes MAXPATHLEN is defined in a few places, but presence
> of this macro isn't garanteed (POSIX says that it is only present when
> a file length limit exists, which may not be the case).
Even though it is good to make our code conform t
2011/7/7 Ed Schouten :
> * Robert Millan , 20110707 11:33:
>> config(8) assumes MAXPATHLEN is defined in a few places, but presence
>> of this macro isn't garanteed (POSIX says that it is only present when
>> a file length limit exists, which may not be the case).
>
> Even though it is good to make
* Robert Millan , 20110707 13:12:
> As for the __GLIBC__ bit, it is difficult to handle this without a
> function that canonicalizes arbitrary-length pathnames. Would you
> prefer something like:
>
> #ifdef MAXPATHLEN
> // use realpath on a statically-allocated buffer
> #else
> // assume canonica
2011/7/7 Ed Schouten :
> Considering that the function is rather small anyway, why not compile it
> in unconditionally (though having a different name).
Hi Ed,
I made the adjustment you requested, plus a bit more polishing
(plugged a memleak, etc), and then I hit what seems like a memory
corrupti
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 i
Hi,
On Thu, Jul 07, 2011 at 11:33:53AM +0200, Robert Millan wrote:
> - (void)snprintf(fname, sizeof fname, "../../conf/options.%s",
> + (void)asprintf(&fname, "../../conf/options.%s",
> machinename);
Ignoring the return value of asprintf() is not a good idea, as it can
indicate
7 matches
Mail list logo