[PATCH 06/11] Add X*asprintf() routines to mirror common asprintf() routines
wharms at bfs.de
Wed Dec 1 02:48:22 PST 2010
Am 30.11.2010 23:37, schrieb Dan Nicholson:
> On Tue, Nov 30, 2010 at 10:16 AM, walter harms <wharms at bfs.de> wrote:
>> Am 30.11.2010 05:57, schrieb Alan Coopersmith:
>>> Provides a portable implementation of this common allocating sprintf()
>>> API found in many, but not yet all, of the platforms we support.
>>> If the platform provides vasprintf() we simply wrap it, otherwise we
>>> implement it - either way callers can use it regardless of platform.
>>> Since not all platforms guarantee to NULL out the return pointer on
>>> failure, we don't either, and require callers to check the return
>>> value for -1, in order to allow easier transition to asprintf() in the
>>> future when we no longer support platforms without it.
>> if i remember correctly gnulib has a asprintf() implementation.
>> perhaps it is more easy to this an other code instead of implementing
>> it again. Having that bit of compartibility would allow to support
>> system even without asprintf() (and other interessting features).
> I took a look at that earlier today when I saw this patch, and it
> looks like you'd have to pull in a pile of gnulib dependencies.
the idea was to have POSIX in X11, and use glibc as base (or ulibc if you like).
import of nice ideas via gnulib (or like) would allow any POSIX system to compile.
you can sustitute POSIX with SUSVx if you like. The strength of X11 is in it compatibility
to all the different implementation and i think gnulib is a nice tool to help with that goal.
More information about the xorg-devel