Permalink
Browse files

Make libXmx compile without warnings

Aparently it was sufficient to include some headers and fix one type signature.
1 parent c8ec245 commit fd11fb7c900e850ff24b6b8c6548324190c335ac @fuzxxl fuzxxl committed Mar 11, 2013
Showing with 20 additions and 11 deletions.
  1. +7 −2 libXmx/Xmx.c
  2. +2 −0 libXmx/Xmx2.c
  3. +11 −9 libXmx/XmxP.h
View
@@ -51,6 +51,11 @@
* Comments and questions are welcome and can be sent to *
* mosaic-x@ncsa.uiuc.edu. *
****************************************************************************/
+
+#include <stdint.h>
+
+#include <Xm/RepType.h>
+
#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);
View
@@ -51,6 +51,8 @@
* Comments and questions are welcome and can be sent to *
* mosaic-x@ncsa.uiuc.edu. *
****************************************************************************/
+#include <stdlib.h>
+
#include "../config.h"
#include "XmxP.h"
View
@@ -57,18 +57,20 @@
/* System includes. */
+#include <stdint.h>
+
/* Here are some nasty ifdef's to make SGI's weird header files happy -DXP */
#ifdef __sgi
-#ifndef _SVR4_SOURCE
-#define _SVR4_SOURCE
-#include <stdio.h>
-#undef _SVR4_SOURCE
-#else
-#include <stdio.h>
-#endif
+# ifndef _SVR4_SOURCE
+# define _SVR4_SOURCE
+# include <stdio.h>
+# undef _SVR4_SOURCE
+# else
+# include <stdio.h>
+# endif
#else
-#include <stdio.h>
+# include <stdio.h>
#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

0 comments on commit fd11fb7

Please sign in to comment.