[PATCH 06/11] Add X*asprintf() routines to mirror common asprintf() routines
Alan Coopersmith
alan.coopersmith at oracle.com
Tue Nov 30 15:04:03 PST 2010
Mikhail Gusarov wrote:
> Twas brillig at 20:57:43 29.11.2010 UTC-08 when alan.coopersmith at oracle.com did gyre and gimble:
>
> AC> +#ifndef XPRINTF_H
> AC> +#define XPRINTF_H
> AC> +
> AC> +#include <stdarg.h>
> AC> +#include <X11/Xfuncproto.h>
> AC> +
> AC> +#ifndef _X_RESTRICT_KYWD
> AC> +# if defined(restrict) /* assume autoconf set it correctly */ || \
> AC> + (defined(__STDC__) && (__STDC_VERSION__ - 0 >= 199901L)) /* C99 */
> AC> +# define _X_RESTRICT_KYWD restrict
> AC> +# elif defined(__GNUC__) && !defined(__STRICT_ANSI__) /* gcc w/C89+extensions */
> AC> +# define _X_RESTRICT_KYWD __restrict__
> AC> +# else
> AC> +# define _X_RESTRICT_KYWD
> AC> +# endif
> AC> +#endif
>
> Maybe this is a material for Xfuncproto.h?
Yes, which is why I wrapped it in a #ifndef _X_RESTRICT_KYWD so that it could be
moved there later without clashing, but I didn't want to introduce a requirement
on an unreleased xproto release for it.
--
-Alan Coopersmith- alan.coopersmith at oracle.com
Oracle Solaris Platform Engineering: X Window System
More information about the xorg-devel
mailing list