diff options
author | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2009-01-29 20:12:24 -0200 |
---|---|---|
committer | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2009-01-29 20:17:14 -0200 |
commit | 692baebcc50f1e952800bfe4e2e6bc42f54e62fe (patch) | |
tree | bc3282d633974bc5a9b7cbd08d14720e8c21f004 | |
parent | a1977883c9f5ef0e515569d6e2ebccb07411f98c (diff) |
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).
-rw-r--r-- | configure.ac | 6 | ||||
-rw-r--r-- | src/x11_trans.c | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac index bbc394ba..4bf55205 100644 --- a/configure.ac +++ b/configure.ac @@ -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) diff --git a/src/x11_trans.c b/src/x11_trans.c index 594c8752..6620b4dc 100644 --- a/src/x11_trans.c +++ b/src/x11_trans.c @@ -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> |