-
Bug
-
Resolution: Fixed
-
P4
-
1.1.6
-
1.1.8
-
generic
-
generic
-
Not verified
Name: mf23781 Date: 04/29/98
DEV: c89 under OpenEdition rejects event handler syntax
In 114, src/unix/sun/awt_Frame.c contains an event handler defined with four
parameters thus:
static void
Frame_event_handler(Widget w, XtPointer data, XEvent *event, Boolean *cont)
This is in good accordance with the spec for XtEventHandler in the X Toolkit
documentation. In 116 there are instead two event handlers each defined
with three parameters:
static void
innerCanvasEH(Widget canvasW, caddr_t client_data, XEvent *event)
static void
shellEH(Widget w, XtPointer data, XEvent *event)
In addition the type of the client_data parameter in the first of these is
caddr_t whereas it should be XtPointer.
On AIX these deviations are tolerated by the compiler. On OS/390 however the
c89 compiler blows up:
ERROR CBC3280 ./../../../../src/unix/sun/awt_Frame.c:891 Function argument
assignment between types "void(*)(struct _WidgetRec*,void*,union _XEvent*,
int*)" and "void(*)(struct _WidgetRec*,void*,union _XEvent*)" is not allowed.
We have found it necessary to go ahead and do the workaround of ifdeffing
the function definitions in another defect.
======================================================================