Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110713134238.GB16618@brightrain.aerifal.cx>
Date: Wed, 13 Jul 2011 09:42:38 -0400
From: Rich Felker <dalias@...ifal.cx>
To: musl@...ts.openwall.com
Subject: Re: cluts review

On Wed, Jul 13, 2011 at 02:57:21PM +0200, Luka Marčetić wrote:
> >>Instead of<sys/param.h>
> >>for PATH_MAX, will limits.h do (that's what i usually include)?
> >No, it doesn't get PATH_MAX defined for me.
> 
> Strange, SUSv4 (which is really the std I'm testing for compliance
> against) says it should be there. I'm surprised you don't have any
> issues with SUS-specific functions. So, do you want me to replace
> limits with param.h?

Don't use sys/param.h unless you make it conditional on some check for
broken platforms (HURD?) that lack PATH_MAX.

> I already have my sreturnf function for such purposes (right now it
> uses vsnprintf). Why do you think *snprintf and *asprintf aren't
> portable?

*asprintf is not portable because it's a GNU extension, but it's
trivial to implement it as a wrapper for vsnprintf which is standard.
See the code in musl for an example of how to do it.

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.