patches to avoid gcc warnings for libX11 (#1)

Author is Peter Breitenlohner <peb@mppmu.mpg.de>
Bug #17946, attachment #19439

Define as 1 (one) as done by autoconf and the command line
option, e.g. -DX11_t, not as empty.

This avoids the gcc (3.4.6) warnings:
	../../libX11-1.1.5/src/x11_trans.c:27:1: warning: "X11_t" redefined
	<command line>:7:1: warning: this is the location of the previous definition
	../../libX11-1.1.5/src/x11_trans.c:28:1: warning: "TRANS_CLIENT" redefined
	<command line>:8:1: warning: this is the location of the previous definition

Similarly, follow the autoconf convention to define XTHREADS
and XUSE_MTSAFE_API as one.

This avoids analogous warnings when compiling libXcomposite,
libXcursor, and libXdamage.

No reason to AC_SUBST XTHREADS and XUSE_MTSAFE_API (unused).
This commit is contained in:
Paulo Cesar Pereira de Andrade 2009-01-29 20:12:24 -02:00
parent a1977883c9
commit 692baebcc5
2 changed files with 4 additions and 6 deletions

View file

@ -205,17 +205,15 @@ AC_CHECK_LIB(c, getpwuid_r, [mtsafeapi="yes"], [mtsafeapi="no"])
case x$xthreads in
xyes)
AC_DEFINE(XTHREADS,[],[Whether libX11 is compiled with thread support])
AC_DEFINE(XTHREADS,1,[Whether libX11 is compiled with thread support])
if test x$mtsafeapi = xyes
then
AC_DEFINE(XUSE_MTSAFE_API,[],[Whether libX11 needs to use MT safe API's])
AC_DEFINE(XUSE_MTSAFE_API,1,[Whether libX11 needs to use MT safe API's])
fi
;;
*)
;;
esac
AC_SUBST(XTHREADS)
AC_SUBST(XUSE_MTSAFE_API)
AC_CHECK_LIB(c, pthread_self, [thrstubs="no"], [thrstubs="yes"])
AM_CONDITIONAL(THRSTUBS, test x$thrstubs = xyes)

View file

@ -24,7 +24,7 @@
#include "config.h"
#endif
#define X11_t
#define TRANS_CLIENT
#define X11_t 1
#define TRANS_CLIENT 1
#include <X11/Xtrans/transport.c>