A small patch for GTK+ 1.3.0 CVS and AIX 4.3



Two minor nits addressed by the attached patch:

1) The IBM 'xlc' family of compilers doesn't like a trailing comma
after the last member of an 'enum'.  This patch should be OK for other
compilers.

2) AIX 4.3.2 (and probably other releases as well) have XSetIMValues(),
but somebody at IBM forgot to include a prototype for that routine (I've
filed a bug report against that already).  As a result, the compiler assigns
the default return type of 'int', which requires casting via (char *).
I've #ifdef'ed this with _AIX, but am unsure what you want to do for a
permanent fix - IBM will eventually ship a fixed header file, which won't
require a cast, but the cast shouldn't cause problems on other systems,
since NULL should be a 'void *' anyhow (I cast XSetIMValues() to 'char *'
because that's what it seemed to actually return according tot he manpage).

Given those 2 patches, the latest CVS (well, Thursday-ish) builds clean on AIX.
I still need to resolve some Imlib and ORBit issues before I can do any
real testing...

				Valdis Kletnieks
				Computer Systems Senior Engineer
				Virginia Tech

*** gdk/gdktypes.h.dist	Wed Mar 17 18:01:44 1999
--- gdk/gdktypes.h	Wed Sep  1 02:01:27 1999
***************
*** 782,788 ****
  				 * drags */
    GDK_DRAG_PROTO_NONE,		/* Not a valid drag window */
    GDK_DRAG_PROTO_WIN32_DROPFILES, /* The simple WM_DROPFILES dnd */
!   GDK_DRAG_PROTO_OLE2,		/* The complex OLE2 dnd (not implemented) */
  } GdkDragProtocol;
  
  /* The color type.
--- 782,788 ----
  				 * drags */
    GDK_DRAG_PROTO_NONE,		/* Not a valid drag window */
    GDK_DRAG_PROTO_WIN32_DROPFILES, /* The simple WM_DROPFILES dnd */
!   GDK_DRAG_PROTO_OLE2		/* The complex OLE2 dnd (not implemented) */
  } GdkDragProtocol;
  
  /* The color type.
*** gdk/gdkim.c.dist	Wed Feb 24 02:32:59 1999
--- gdk/gdkim.c	Sat Sep  4 02:01:52 1999
***************
*** 386,392 ****
--- 386,396 ----
  
        destroy_cb.callback = gdk_im_destroy_cb;
        destroy_cb.client_data = NULL;
+ #ifndef _AIX
        if (NULL != XSetIMValues (xim_im, XNDestroyCallback, &destroy_cb, NULL))
+ #else
+       if (NULL != (char *) XSetIMValues (xim_im, XNDestroyCallback, &destroy_cb, NULL))
+ #endif
  	GDK_NOTE (XIM, g_warning ("Could not set destroy callback to IM. Be careful to not destroy your input method."));
  #endif
  



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]