[PATCH v4 0/7] Xprintf -> asprintf
Alan Coopersmith
alan.coopersmith at oracle.com
Sat Dec 4 12:14:34 PST 2010
I'm mostly resending since the mail server I used yesterday sent some
patches through, and sent others through a mail server in our DMZ that
seems to be failing at DNS, and thus didn't get them all through.
I've switched outgoing servers from the sun.com to the oracle.com
side, so hopefully this series will all get delivered.
Changes since v3:
- Patch #1 & 2: Move Oracle line in COPYING to between Nvidia & Packard
as noted by Simon
- Patch #2: Add _X_ATTRIBUTE_PRINTF(*,0) for varargs versions
as suggested by Jeremy
- Patch #3: Add Jeremy's Reviewed-by
For those who didn't see the v3 summary, it said:
This version adopts the middle road, as I suggested earlier today and we
discussed on #xorg-devel IRC today.
To the linker, the ABI will export the function Xasprintf() from the
X server to modules. To programmers, they simply have to include
Xprintf.h (or os.h which includes it), and can then write code using
asprintf(), and let autoconf & Xprintf.h determine whether it should
mapped by a #define to Xasprintf() or simply use the platform's libc
definition.
There's a bonus copyright notice update tacked on the front, so that
the main asprintf() patch can update the COPYING file correctly.
I did also try removing the old API completely, but it turns out at least
the xf86-video-intel driver calls XNFprintf (I'd only searched for Xprintf
when I found no calls to it). We may still be able to do that as part of
the Xserver 1.10 ABI/API changes, but should figure out first how drivers
should check for which version to call (check #ifdefs for server version?
ABI version? autoconf check for existence of <xorg/Xprintf.h> ?).
[PATCH v4 1/7] Sun's copyrights now belong to Oracle
[PATCH v4 2/7] Add asprintf() implementation for platforms without it
[PATCH v4 3/7] Convert existing Xprintf style calls to asprintf style
[PATCH v4 4/7] Convert hw/xfree86/parser code to use asprintf() calls
[PATCH v4 5/7] Convert alloc+sprintf pairs into asprintf() & XNFasprintf() calls
[PATCH v4 6/7] Replace alloc+strcpy+strcat with asprintf() & XNFasprintf() calls
[PATCH v4 7/7] Convert cvt code to use XNFasprintf()
-Alan Coopersmith- alan.coopersmith at oracle.com
Oracle Solaris Platform Engineering: X Window System
More information about the xorg-devel
mailing list