diff options
author | Aaron Plattner <aplattner@nvidia.com> | 2011-08-16 09:53:55 -0700 |
---|---|---|
committer | Aaron Plattner <aplattner@nvidia.com> | 2011-08-16 10:02:28 -0700 |
commit | bd60c0f398d3c2c04f4bea5f62b3593fb0ccc920 (patch) | |
tree | b3389c0f081769ea5cee71360acb4efbc0b1aac9 | |
parent | 0637e22d055584e414de2e834e006368e6c0c022 (diff) |
xts5: Define X11_t and TRANS_CLIENT to get Xtrans function prototypes
ConnDis.c uses various Xtrans functions. Even though the Xtrans code itself is
compiled in x11_trans.c, we need to define these preprocessor macros in
ConnDis.c also to get prototypes for various functions. Otherwise, this causes
warnings and a sign-extension bug on 64-bit platforms that can cause crashes:
ConnDis.c: In function ‘_X11TransConnectDisplay’:
ConnDis.c:351:2: warning: implicit declaration of function ‘_X11TransOpenCOTSClient’
ConnDis.c:351:19: warning: assignment makes pointer from integer without a cast
ConnDis.c:355:2: warning: implicit declaration of function ‘_X11TransConnect’
ConnDis.c:357:6: warning: implicit declaration of function ‘_X11TransClose’
ConnDis.c:366:2: warning: implicit declaration of function ‘_X11TransGetPeerAddr’
ConnDis.c:374:2: warning: implicit declaration of function ‘_X11TransConvertAddress’
ConnDis.c:399:5: warning: implicit declaration of function ‘_X11TransSetOption’
ConnDis.c: In function ‘_XConnectDisplay’:
ConnDis.c:521:8: warning: implicit declaration of function ‘_X11TransGetConnectionNumber’
ConnDis.c:522:8: warning: implicit declaration of function ‘_X11TransFreeConnInfo’
ConnDis.c: In function ‘_XDisconnectDisplay’:
ConnDis.c:545:5: warning: implicit declaration of function ‘_X11TransDisconnect’
ConnDis.c: In function ‘_XSendClientPrefix’:
ConnDis.c:588:5: warning: implicit declaration of function ‘_X11TransWritev’
pAllocColorCell[27592]: segfault at 58fe7f0 ip 000000000016670e sp 00007fff0da0c110 error 4 in libxts5proto.so[110000+6a000]
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
-rw-r--r-- | xts5/src/libproto/ConnDis.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/xts5/src/libproto/ConnDis.c b/xts5/src/libproto/ConnDis.c index 9cc0dd8c..c3a57cf3 100644 --- a/xts5/src/libproto/ConnDis.c +++ b/xts5/src/libproto/ConnDis.c @@ -36,6 +36,9 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_CONFIG_H #include <config.h> #endif + +#define X11_t +#define TRANS_CLIENT #include <X11/Xlibint.h> #include <X11/Xtrans/Xtrans.h> #include <X11/Xauth.h> |