--- openmotif-2.2.4.orig/Makefile.in	2004-04-15 04:27:19.000000000 -0400
+++ openmotif-2.2.4/Makefile.in	2008-04-26 12:36:57.000000000 -0400
@@ -188,8 +188,7 @@
              include \
              tools \
              clients \
-             doc \
-             demos
+             doc
 
 AUTOMAKE_OPTIONS = 1.4
 subdir = .
--- openmotif-2.2.4.orig/tools/wml/Makefile.in	2004-04-15 04:27:35.000000000 -0400
+++ openmotif-2.2.4/tools/wml/Makefile.in	2008-04-26 12:35:03.000000000 -0400
@@ -187,7 +187,7 @@
 wmluiltok_LDADD = @LEXLIB@
 
 wml_SOURCES = wml.c
-wml_LDADD = -L. -lwml
+wml_LDADD = libwml.a
 
 wmldbcreate_LDADD = ../../lib/Xm/libXm.la
 
--- openmotif-2.2.4.orig/configure	2008-04-26 16:57:23.000000000 -0400
+++ openmotif-2.2.4/configure	2008-04-26 16:58:14.000000000 -0400
@@ -1526,7 +1526,7 @@
 
 
 
-CURRENT=4
+CURRENT=3
 REVISION=0
 AGE=0
 
--- openmotif-2.2.4/tools/wml/Makefile.in.org	2009-03-26 20:20:50.000000000 -0400
+++ openmotif-2.2.4/tools/wml/Makefile.in	2009-03-26 20:21:27.000000000 -0400
@@ -204,7 +204,7 @@
 
 libwml_a_AR = $(AR) cru
 libwml_a_LIBADD =
-am_libwml_a_OBJECTS = wmlparse.$(OBJEXT) wml.$(OBJEXT) \
+am_libwml_a_OBJECTS = wmlparse.$(OBJEXT) \
 	wmloutkey.$(OBJEXT) wmlouth.$(OBJEXT) wmloutmm.$(OBJEXT) \
 	wmloutp1.$(OBJEXT) wmlresolve.$(OBJEXT) wmlsynbld.$(OBJEXT) \
 	wmlutils.$(OBJEXT)
--- openmotif-2.2.4/lib/Xm/DragBS.c.org	2009-08-29 15:30:40.000000000 -0400
+++ openmotif-2.2.4/lib/Xm/DragBS.c	2009-08-29 15:32:53.000000000 -0400
@@ -217,9 +217,9 @@
 static unsigned long	firstProtectRequest;
 static Window		errorWindow;
 
-static XContext 	displayToMotifWindowContext = (XContext) NULL;
-static XContext 	displayToTargetsContext = (XContext) NULL;
-static XContext		displayToAtomsContext = (XContext) NULL;
+static XContext 	displayToMotifWindowContext = (XContext)(uintptr_t) NULL;
+static XContext 	displayToTargetsContext = (XContext)(uintptr_t) NULL;
+static XContext		displayToAtomsContext = (XContext)(uintptr_t) NULL;
 
 
 /*****************************************************************************
@@ -304,7 +304,7 @@
     XContext	loc_context;
 
     _XmProcessLock();
-    if (displayToMotifWindowContext == (XContext) NULL) {
+    if (displayToMotifWindowContext == (XContext)(uintptr_t) NULL) {
         displayToMotifWindowContext = XUniqueContext();
     }
     loc_context = displayToMotifWindowContext;
@@ -335,7 +335,7 @@
     XContext loc_context;
 
     _XmProcessLock();
-    if (displayToMotifWindowContext == (XContext) NULL) {
+    if (displayToMotifWindowContext == (XContext)(uintptr_t) NULL) {
         displayToMotifWindowContext = XUniqueContext();
     }
     loc_context = displayToMotifWindowContext;
@@ -378,7 +378,7 @@
     XContext		loc_context;
 
     _XmProcessLock();
-    if (displayToTargetsContext == (XContext) NULL) {
+    if (displayToTargetsContext == (XContext)(uintptr_t) NULL) {
         displayToTargetsContext = XUniqueContext();
     }
     loc_context = displayToTargetsContext;
@@ -409,7 +409,7 @@
     XContext	loc_context;
 
     _XmProcessLock();
-    if (displayToTargetsContext == (XContext) NULL) {
+    if (displayToTargetsContext == (XContext)(uintptr_t) NULL) {
         displayToTargetsContext = XUniqueContext();
     }
     loc_context = displayToTargetsContext;
@@ -464,7 +464,7 @@
     XContext		loc_context;
 
     _XmProcessLock();
-    if (displayToAtomsContext == (XContext) NULL) {
+    if (displayToAtomsContext == (XContext)(uintptr_t) NULL) {
 	displayToAtomsContext = XUniqueContext();
     }
     loc_context = displayToAtomsContext;
@@ -495,7 +495,7 @@
     XContext loc_context;
 
     _XmProcessLock();
-    if (displayToAtomsContext == (XContext) NULL) {
+    if (displayToAtomsContext == (XContext)(uintptr_t) NULL) {
         displayToAtomsContext = XUniqueContext();
     }
     loc_context = displayToAtomsContext;
--- openmotif-2.2.4/lib/Xm/DragIcon.c.org	2009-08-29 15:34:29.000000000 -0400
+++ openmotif-2.2.4/lib/Xm/DragIcon.c	2009-08-29 15:35:37.000000000 -0400
@@ -760,7 +760,7 @@
 #undef Offset
 #define Offset(x) (XtOffsetOf( struct _XmDragIconRec, drag.x))
 
-static XContext _XmTextualDragIconContext = (XContext) NULL;
+static XContext _XmTextualDragIconContext = (XContext)(uintptr_t) NULL;
 
 static XtResource resources[]=
 {
@@ -1240,7 +1240,7 @@
    use_alt = dpy -> display.enable_drag_icon;
 
    _XmProcessLock();
-   if (_XmTextualDragIconContext == (XContext) NULL)
+   if (_XmTextualDragIconContext == (XContext)(uintptr_t) NULL)
       _XmTextualDragIconContext = XUniqueContext();
    loc_context = _XmTextualDragIconContext;
    _XmProcessUnlock();
--- openmotif-2.2.4/lib/Xm/Text.c.org	2009-08-29 15:37:21.000000000 -0400
+++ openmotif-2.2.4/lib/Xm/Text.c	2009-08-29 15:38:30.000000000 -0400
@@ -652,14 +652,14 @@
 static void 
 _XmCreateCutBuffers(Widget w)
 {
-  static XContext context = (XContext)NULL;
+  static XContext context = (XContext)(uintptr_t)NULL;
   char * tmp = NULL;
   Display *dpy = XtDisplay(w);
   Screen *screen = XtScreen(w);
   XContext local_context;
 
   _XmProcessLock();
-  if (context == (XContext)NULL) context = XUniqueContext();
+  if (context == (XContext)(uintptr_t)NULL) context = XUniqueContext();
 
   local_context = context;
   _XmProcessUnlock();
@@ -2992,7 +2992,7 @@
   if (!tw->text.editable && editable) {
     OutputData o_data = tw->text.output->data;
     
-    XmImRegister(widget, (unsigned int) NULL);
+    XmImRegister(widget, (unsigned int)(uintptr_t) NULL);
     
     (*tw->text.output->PosToXY)(tw, tw->text.cursor_position,
 				&xmim_point.x, &xmim_point.y);
--- openmotif-2.2.4/lib/Xm/TextF.c.org	2009-08-29 15:40:01.000000000 -0400
+++ openmotif-2.2.4/lib/Xm/TextF.c	2009-08-29 15:41:50.000000000 -0400
@@ -7168,7 +7168,7 @@
   XmTextFieldSetEditable((Widget)tf, TextF_Editable(tf));
   
   if (TextF_Editable(tf)) {
-    XmImRegister((Widget)tf, (unsigned int) NULL);
+    XmImRegister((Widget)tf, (unsigned int)(uintptr_t) NULL);
     GetXYFromPos(tf, TextF_CursorPosition(tf), &xmim_point.x, &xmim_point.y);
     (void)TextFieldGetDisplayRect((Widget)tf, &xmim_area);
     n = 0;
@@ -8034,7 +8034,7 @@
       diff_values = True;
       if (TextF_WcValue(new_tf) == NULL) {
 	TextF_WcValue(new_tf) = (wchar_t*) XtMalloc(sizeof(wchar_t));
-	*TextF_WcValue(new_tf) = (wchar_t)NULL;
+	*TextF_WcValue(new_tf) = (wchar_t)(uintptr_t)NULL;
       }
       ValidateString(new_tf, (char*)TextF_WcValue(new_tf), True);
     } else if (TextF_Value(new_tf) != TextF_Value(old_tf)) {
@@ -9906,7 +9906,7 @@
    * give the IM the relevent values. */
   
   if (!TextF_Editable(tf) && editable) { 
-    XmImRegister((Widget)tf, (unsigned int) NULL);
+    XmImRegister((Widget)tf, (unsigned int)(uintptr_t) NULL);
     
     GetXYFromPos(tf, TextF_CursorPosition(tf), &xmim_point.x, 
 		 &xmim_point.y);
--- openmotif-2.2.4/lib/Xm/Protocols.c.org	2009-08-29 15:43:09.000000000 -0400
+++ openmotif-2.2.4/lib/Xm/Protocols.c	2009-08-29 15:43:59.000000000 -0400
@@ -136,7 +136,7 @@
  *
  ***************************************************************************/
 
-static XContext	allProtocolsMgrContext = (XContext) NULL;
+static XContext	allProtocolsMgrContext = (XContext)(uintptr_t) NULL;
 
 
 #define Offset(field) XtOffsetOf( struct _XmProtocolRec, protocol.field)
@@ -374,7 +374,7 @@
 	  display = XtDisplay(shell);
 	  
 	  _XmProcessLock();
-	  if (allProtocolsMgrContext == (XContext) NULL)
+	  if (allProtocolsMgrContext == (XContext)(uintptr_t) NULL)
 	    allProtocolsMgrContext = XUniqueContext();
 	  _XmProcessUnlock();
 	  
--- openmotif-2.2.4/lib/Xm/Synthetic.c.org	2009-08-29 15:45:30.000000000 -0400
+++ openmotif-2.2.4/lib/Xm/Synthetic.c	2009-08-29 15:46:49.000000000 -0400
@@ -197,7 +197,7 @@
   
   for (i = 0; i < num_resources; i++)
     resources[i].resource_name = 
-      (String) XrmPermStringToQuark (resources[i].resource_name);
+      (String)(uintptr_t) XrmPermStringToQuark (resources[i].resource_name);
 }
 
 /**********************************************************************
@@ -241,7 +241,7 @@
       for (j = 0; j < num_resources; j++) 
 	{
 	  if ((resources[j].export_proc) &&
-	      (XrmQuark)(resources[j].resource_name) == quark) 
+	      (XrmQuark)(uintptr_t)(resources[j].resource_name) == quark) 
 	    {
 	      value_size = resources[j].resource_size;
 
@@ -512,7 +512,7 @@
       for (j = 0; j < num_resources; j++) 
 	{
 	  if ((resources[j].import_proc) &&
-	      (XrmQuark)(resources[j].resource_name) == quark) 
+	      (XrmQuark)(uintptr_t)(resources[j].resource_name) == quark) 
 	    {
 	      value = args[i].value;
 	      
--- openmotif-2.2.4/lib/Xm/Obso2_0.c.org	2009-08-29 15:48:36.000000000 -0400
+++ openmotif-2.2.4/lib/Xm/Obso2_0.c	2009-08-29 15:50:09.000000000 -0400
@@ -1584,7 +1584,7 @@
   Stuff from Desktop.c
 **********************/
 
-static XContext	actualClassContext = (XContext) NULL;
+static XContext	actualClassContext = (XContext)(uintptr_t) NULL;
 
 
 /*ARGSUSED*/
@@ -1611,7 +1611,7 @@
 {
 	  WidgetClass		actualClass;
 
-	  if (actualClassContext == (XContext) NULL)
+	  if (actualClassContext == (XContext)(uintptr_t) NULL)
 	    actualClassContext = XUniqueContext();
 	  
 	  /*
@@ -1645,7 +1645,7 @@
     WidgetClass previous;
     WidgetClass oldActualClass;
 
-    if (actualClassContext == (XContext) NULL)
+    if (actualClassContext == (XContext)(uintptr_t) NULL)
       actualClassContext = XUniqueContext();
     
     /*
@@ -1692,7 +1692,7 @@
         Cardinal *num_args )
 {
     XmDesktopObject	worldObject;
-    static XContext	worldObjectContext = (XContext) NULL;
+    static XContext	worldObjectContext = (XContext)(uintptr_t) NULL;
     XmWidgetExtData     ext;
     Display		*display;
     
@@ -1701,7 +1701,7 @@
     ** the display is closed, so that we don't get bad data if a second 
     ** display with the same id is opened.
     */
-    if (worldObjectContext == (XContext) NULL)
+    if (worldObjectContext == (XContext)(uintptr_t) NULL)
       worldObjectContext = XUniqueContext();
 
     display = XtDisplayOfObject(shell);
--- openmotif-2.2.4/lib/Xm/Xpmparse.c.org	2009-08-29 15:51:35.000000000 -0400
+++ openmotif-2.2.4/lib/Xm/Xpmparse.c	2009-08-29 15:55:20.000000000 -0400
@@ -360,7 +360,7 @@
 	     */
 	    if (USE_HASHTABLE) {
 		ErrorStatus =
-		    xpmHashIntern(hashtable, color->string, HashAtomData(a));
+		    xpmHashIntern(hashtable, color->string, HashAtomData((uintptr_t)a));
 		if (ErrorStatus != XpmSuccess) {
 		    xpmFreeColorTable(colorTable, ncolors);
 		    return (ErrorStatus);
@@ -442,7 +442,7 @@
 	     */
 	    if (USE_HASHTABLE) {
 		ErrorStatus =
-		    xpmHashIntern(hashtable, color->string, HashAtomData(a));
+		    xpmHashIntern(hashtable, color->string, HashAtomData((uintptr_t)a));
 		if (ErrorStatus != XpmSuccess) {
 		    xpmFreeColorTable(colorTable, ncolors);
 		    return (ErrorStatus);
--- openmotif-2.2.4/lib/Xm/XpmI.h.org	2009-08-29 15:56:52.000000000 -0400
+++ openmotif-2.2.4/lib/Xm/XpmI.h	2009-08-29 15:57:29.000000000 -0400
@@ -288,7 +288,7 @@
 FUNC(xpmHashIntern, int, (xpmHashTable *table, char *tag, void *data));
 
 #define HashAtomData(i) ((void *)i)
-#define HashColorIndex(slot) ((unsigned int)((*slot)->data))
+#define HashColorIndex(slot) ((unsigned int)(uintptr_t)((*slot)->data))
 #define USE_HASHTABLE (cpp > 2 && ncolors > 4)
 
 /* I/O utility */
--- openmotif-2.2.4/lib/Xm/IconG.c.org	2009-08-29 16:00:48.000000000 -0400
+++ openmotif-2.2.4/lib/Xm/IconG.c	2009-08-29 16:01:19.000000000 -0400
@@ -279,8 +279,8 @@
 
 /* those are created in ClassInitialize and filled by the
    IconConverter. */
-static XContext 	largeIconContext = (XContext) NULL;
-static XContext		smallIconContext = (XContext) NULL;
+static XContext 	largeIconContext = (XContext)(uintptr_t) NULL;
+static XContext		smallIconContext = (XContext)(uintptr_t) NULL;
 
 static XPointer dummy;
 #define OwnLargeMask(widget) \
--- openmotif-2.2.4/lib/Xm/SlideC.c.org	2009-08-29 16:03:05.000000000 -0400
+++ openmotif-2.2.4/lib/Xm/SlideC.c	2009-08-29 16:04:33.000000000 -0400
@@ -94,14 +94,14 @@
 /* notify that initialize called    XtArgsProc        */ NULL,
 /* NULL                             XtProc            */ NULL,
 /* NULL                             XtPointer         */ NULL,
-/* NULL                             Cardinal          */ (Cardinal)NULL,
+/* NULL                             Cardinal          */ (Cardinal)(uintptr_t)NULL,
 /* resources for subclass fields    XtResourceList    */ resources,
 /* number of entries in resources   Cardinal          */ XtNumber(resources),
 /* resource class quarkified        XrmClass          */ NULLQUARK,
-/* NULL                             Boolean           */ (Boolean)NULL,
-/* NULL                             XtEnum            */ (XtEnum)NULL,
-/* NULL				    Boolean           */ (Boolean)NULL,
-/* NULL                             Boolean           */ (Boolean)NULL,
+/* NULL                             Boolean           */ (Boolean)(uintptr_t)NULL,
+/* NULL                             XtEnum            */ (XtEnum)(uintptr_t)NULL,
+/* NULL				    Boolean           */ (Boolean)(uintptr_t)NULL,
+/* NULL                             Boolean           */ (Boolean)(uintptr_t)NULL,
 /* free data for subclass pointers  XtWidgetProc      */ destroy,
 /* NULL                             XtProc            */ NULL,
 /* NULL			            XtProc            */ NULL,
--- openmotif-2.2.4/lib/Xm/DataF.c.org	2009-08-29 16:05:43.000000000 -0400
+++ openmotif-2.2.4/lib/Xm/DataF.c	2009-08-29 16:07:15.000000000 -0400
@@ -8984,7 +8984,7 @@
       /* CR03685 */
       SGI_hack_XmImRegister((Widget)tf);
 #else
-      XmImRegister((Widget)tf, (unsigned int) NULL);
+      XmImRegister((Widget)tf, (unsigned int)(uintptr_t) NULL);
 #endif
       df_GetXYFromPos(tf, XmTextF_cursor_position(tf), &xmim_point.x, &xmim_point.y);
       n = 0;
@@ -10454,7 +10454,7 @@
            diff_values = True;
            if (XmTextF_wc_value(new_tf) == NULL) {
               XmTextF_wc_value(new_tf) = (wchar_t*) XtMalloc(sizeof(wchar_t));
-              *XmTextF_wc_value(new_tf) = (wchar_t)NULL;
+              *XmTextF_wc_value(new_tf) = (wchar_t)(uintptr_t)NULL;
            }
            df_ValidateString(new_tf, (char*)XmTextF_wc_value(new_tf), True);
         } else if (XmTextF_value(new_tf) != XmTextF_value(old_tf)) {
@@ -11600,7 +11600,7 @@
        /* CR03685 */
        SGI_hack_XmImRegister((Widget)tf);
 #else
-       XmImRegister((Widget)tf, (unsigned int) NULL);
+       XmImRegister((Widget)tf, (unsigned int)(uintptr_t) NULL);
 #endif
        df_GetXYFromPos(tf, XmTextF_cursor_position(tf), &xmim_point.x, 
 		       &xmim_point.y);
--- openmotif-2.2.4/lib/Xm/FontS.c.org	2009-08-29 16:08:47.000000000 -0400
+++ openmotif-2.2.4/lib/Xm/FontS.c	2009-08-29 16:10:59.000000000 -0400
@@ -2653,7 +2653,7 @@
 	XmStringFree(label);
 
 	XtAddCallback(button,
-		      XmNactivateCallback, ChangeEncoding, (XtPointer) i);
+		      XmNactivateCallback, ChangeEncoding, (XtPointer)(uintptr_t) i);
 
 	if (streq(*encodings, ENCODING_STRING(fsw)))
 	{
@@ -2815,7 +2815,7 @@
     fsw = (XmFontSelectorWidget) w;
     cf = XmFontS_font_info(fsw)->current_font;
 
-    if ((int) data == 0)
+    if ((int)(uintptr_t) data == 0)
 	{
 	XtFree(ENCODING_STRING(fsw));
 	ENCODING_STRING(fsw) = XtNewString(ANY_ENCODING);
@@ -2823,7 +2823,7 @@
     else
 	{
 	XtFree(ENCODING_STRING(fsw));
-	ENCODING_STRING(fsw) = XtNewString(ENCODING_LIST(fsw)[(int) data - 1]);
+	ENCODING_STRING(fsw) = XtNewString(ENCODING_LIST(fsw)[(int)(uintptr_t) data - 1]);
 	}
 
     UpdateFamilies(fsw);
@@ -3599,7 +3599,7 @@
 	    num_largs = 0;
 	    XtSetArg(largs[num_largs], XmNmenuHistory, button); num_largs++;
 	    XtSetValues(XmFontS_option_menu(set_fsw), largs, num_largs);
-	    ChangeEncoding((Widget) set_fsw, (XtPointer) current, NULL);
+	    ChangeEncoding((Widget) set_fsw, (XtPointer)(uintptr_t) current, NULL);
 	}
 	else
 	{
--- openmotif-2.2.4/clients/mwm/WmResParse.c.org	2009-08-29 16:13:01.000000000 -0400
+++ openmotif-2.2.4/clients/mwm/WmResParse.c	2009-08-29 16:14:50.000000000 -0400
@@ -188,7 +188,7 @@
     {"mod3",	Mod3Mask},
     {"mod4",	Mod4Mask},
     {"mod5",	Mod5Mask},
-    {NULL,      (unsigned int)NULL},
+    {NULL,      (unsigned int)(uintptr_t)NULL},
 };
 
 #define ALT_INDEX 3
@@ -351,14 +351,14 @@
     {"btn5up",      ButtonRelease,  ParseImmed,    Button5,  FALSE},
     {"btn5click",   ButtonRelease,  ParseImmed,    Button5,  TRUE},
     {"btn5click2",  ButtonPress,    ParseImmed,    Button5,  TRUE},
-    { NULL, (unsigned int)NULL, (Boolean(*)())NULL, (unsigned int)NULL, (Boolean)NULL}
+    { NULL, (unsigned int)(uintptr_t)NULL, (Boolean(*)())NULL, (unsigned int)(uintptr_t)NULL, (Boolean)(uintptr_t)NULL}
 };
 
 
 static EventTableEntry keyEvents[] = {
 
     {"key",         KeyPress,    ParseKeySym,    0,  FALSE},
-    { NULL, (unsigned int)NULL, (Boolean(*)())NULL, (unsigned int)NULL, (Boolean)NULL}
+    { NULL, (unsigned int)(uintptr_t)NULL, (Boolean(*)())NULL, (unsigned int)(uintptr_t)NULL, (Boolean)(uintptr_t)NULL}
 };
 
 #ifdef PANELIST
