[Xcb] [PATCH RESEND image 11/12] test: use AM_CPPFLAGS rather than per-target test_swap_CPPFLAGS aand others
Gaetan Nadon
memsize at videotron.ca
Thu Mar 27 14:16:23 PDT 2014
On 14-03-27 03:22 PM, Josh Triplett wrote:
> "one target in this directory" does not seem accurate in this case.
Indeed. Multiple targets, but only one source per target with same C
Flags unless... point below:
>
> Also, test_formats_CPPFLAGS had $(XPROTO_CFLAGS), which got lost in the
> move to AM_CPPFLAGS.
Nice catch. Other util repos used to depend on X11 protocol in the past.
They had removed this dependency from configure.ac but had left this
undefined variable in the Makefiles. I got in the habit of removing it
(and this time without realizing it).
However, I noticed that the test subdir does not #include any X11
protocol. Should it remain removed?
The image subdir does #include <X11/Xfuncproto.h>., but only for
_X_INLINE. I thought XCB would be independent of X protocols.
If I replace the includes with the following code from Xfuncproto.h in
xcb_bitops.h, then the compilation is successful:
/* C99 keyword "inline" or equivalent extensions in pre-C99 compilers */
/* requires xproto >= 7.0.9
(introduced in 7.0.8 but didn't support all compilers until 7.0.9) */
#if defined(inline) /* assume autoconf set it correctly */ || \
(defined(__STDC_VERSION__) && (__STDC_VERSION__ - 0 >= 199901L))
/* C99 */ || \
(defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550))
# define _X_INLINE inline
#elif defined(__GNUC__) && !defined(__STRICT_ANSI__) /* gcc
w/C89+extensions */
# define _X_INLINE __inline__
#else
# define _X_INLINE
#endif
It'd be nice to completely remove X11 proto from the picture.
It's a nice trade-off between unwanted dependencies and code reuse...
We now require C99 for all of xorg. Hmmmm...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/xcb/attachments/20140327/493828b0/attachment.html>
More information about the Xcb
mailing list