From fd11fb7c900e850ff24b6b8c6548324190c335ac Mon Sep 17 00:00:00 2001 From: Robert Clausecker Date: Mon, 11 Mar 2013 18:12:50 +0100 Subject: [PATCH] Make libXmx compile without warnings Aparently it was sufficient to include some headers and fix one type signature. --- libXmx/Xmx.c | 9 +++++++-- libXmx/Xmx2.c | 2 ++ libXmx/XmxP.h | 20 +++++++++++--------- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/libXmx/Xmx.c b/libXmx/Xmx.c index 17112ea..2243d20 100644 --- a/libXmx/Xmx.c +++ b/libXmx/Xmx.c @@ -51,6 +51,11 @@ * Comments and questions are welcome and can be sent to * * mosaic-x@ncsa.uiuc.edu. * ****************************************************************************/ + +#include + +#include + #include "../config.h" #include "XmxP.h" @@ -134,8 +139,8 @@ XmxExtractToken (int cd) /* This function should be called by every Xmx routine when registering a callback or event handler. */ /* This is PRIVATE but accessible to Xmx2.c also. */ -int -_XmxMakeClientData (int token) +uintptr_t +_XmxMakeClientData (uintptr_t token) { if (Xmx_uniqid_has_been_set) return ((Xmx_uniqid << 16) | token); diff --git a/libXmx/Xmx2.c b/libXmx/Xmx2.c index bc90127..3e74033 100644 --- a/libXmx/Xmx2.c +++ b/libXmx/Xmx2.c @@ -51,6 +51,8 @@ * Comments and questions are welcome and can be sent to * * mosaic-x@ncsa.uiuc.edu. * ****************************************************************************/ +#include + #include "../config.h" #include "XmxP.h" diff --git a/libXmx/XmxP.h b/libXmx/XmxP.h index b284be8..bf46f33 100644 --- a/libXmx/XmxP.h +++ b/libXmx/XmxP.h @@ -57,18 +57,20 @@ /* System includes. */ +#include + /* Here are some nasty ifdef's to make SGI's weird header files happy -DXP */ #ifdef __sgi -#ifndef _SVR4_SOURCE -#define _SVR4_SOURCE -#include -#undef _SVR4_SOURCE +# ifndef _SVR4_SOURCE +# define _SVR4_SOURCE +# include +# undef _SVR4_SOURCE +# else +# include +# endif #else -#include -#endif -#else -#include +# include #endif #ifdef __sgi @@ -132,7 +134,7 @@ #endif /* if 0 */ /* Prototypes for internal routines found in Xmx.c. */ -extern int _XmxMakeClientData (int); +extern uintptr_t _XmxMakeClientData (uintptr_t); /* Marc's defines. */ #undef private