Skip to main content

Patch for 1.5 and 1.6

No replies
dj_lucas
Offline
Joined: 2005-04-23

A longstanding issue in XFree86/Xorg has been fixed in Xorg-7.0 revealing this oversite in the motif code. Just figured I'd drop a line while I'm reviewing my patchsets. This was the other bug report I had not heard back on, hinted in my previous message.

Here is the error:

../../../src/solaris/native/sun/awt/awt_motif21.c:23: error: conflicting types for 'XmImGetXIC'
/usr/src/jdk/jdk-build/control/build/linux-i586/motif-i586/include/Xm/XmIm.h:64: error: previous declaration of 'XmImGetXIC' was here
../../../src/solaris/native/sun/awt/awt_motif21.c: In function 'getTextWidget':
../../../src/solaris/native/sun/awt/awt_motif21.c:50: warning: cast to pointer from integer of different size
../../../src/solaris/native/sun/awt/awt_motif21.c:54: warning: cast to pointer from integer of different size
make[4]: Leaving directory `/usr/src/jdk/jdk-build/j2se/make/sun/motif21'
make[3]: Leaving directory `/usr/src/jdk/jdk-build/j2se/make/sun/motif21'
make[4]: *** [/usr/src/jdk/jdk-build/control/build/linux-i586/tmp/sun/sun.awt/motif21/obj/awt_motif21.o] Error 1
make[3]: *** [optimized] Error 2
make[2]: Leaving directory `/usr/src/jdk/jdk-build/j2se/make/sun'
make[2]: *** [all] Error 1
make[1]: Leaving directory `/usr/src/jdk/jdk-build/j2se/make'
make[1]: *** [all] Error 1

IMO, it should be fixed in both 5.0 and 6.0, but is not explicitly required in 5.0 as the target build platform is still 'broken'. I don't know what the target platform is for 6.0. The thread where the previous Xorg/XFree86 behavior was determined to be 'broken' is here:
http://lists.freedesktop.org/archives/xorg/2004-December/004970.html

The previous definition is in motif/lib/Xm/XmIm.h (line 56) and determined by NeedWidePrototypes defined in include/X11/Xfuncproto.h, now fixed in Xorg but not sure about current XFree86. If the oversite is not immediately obvious after reviewing the code, a patch is below (watch the spacing, it'll get butchered).

Thanks.

-- DJ Lucas

--- jdk-build-orig/j2se/src/solaris/native/sun/awt/awt_motif21.c 2006-02-19 14:11:34.000000000 -0600
+++ jdk-build/j2se/src/solaris/native/sun/awt/awt_motif21.c 2006-02-19 22:07:53.000000000 -0600
@@ -16,11 +16,6 @@
#include "awt_Component.h"

#define XmPER_SHELL 0
-extern XIC XmImGetXIC(
- Widget w,
- uint32_t input_policy,
- ArgList args,
- Cardinal num_args) ;
extern int32_t _XmImGetGeo(
Widget vw) ;