On Tue, Nov 30, 2010 at 21:53:26 -0800, Alan Coopersmith wrote: > 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. > > The old Xprintf() API is deprecated, but left for compatibility for now. > > The new API is added in a new header so that it can be used in parts of > the server such as hw/xfree86/parser that don't include all the server > headers. > > Signed-off-by: Alan Coopersmith <[email protected]> > --- > configure.ac | 2 +- > hw/xfree86/loader/sdksyms.sh | 1 + > include/Makefile.am | 1 + > include/Xprintf.h | 63 ++++++++++++++++ > include/dix-config.h.in | 3 + > include/os.h | 12 ++- > os/xprintf.c | 163 +++++++++++++++++++++++++++++++++++------ > 7 files changed, 216 insertions(+), 29 deletions(-) > create mode 100644 include/Xprintf.h > Reviewed-by: Julien Cristau <[email protected]>
Cheers, Julien _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
