[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
Title: | "OSF/Motif" is a trademark |
Notice: | MOTIF kit note in 7.* |
Moderator: | GOOEY::GRASS |
|
Created: | Mon Aug 07 1989 |
Last Modified: | Thu Jun 05 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 5973 |
Total number of notes: | 24620 |
I have a question that came in from a customer today concerning
their Motif application running on Digital Unix. A macro is
defined improperly. Can anyone give a synopsis on this, and whether
or not it is fixed? The customer is able to get by with a workaround.
Problem description follows.
Thanks,
Gerrit Saylor
Software Partner Engineering
The symptom can be seen by creating a new widget
class derived from a Motif class (Primitive, for instance), then setting
up an offset table for it by calling XmResolveAllPartOffsets(). If you
then look at the offsets that are placed in the table in a debugger,
they do not synch with where the compiler has placed the structures in
memory. This is because Motif was not compiled to use ALIGN_SUBPARTS,
as I describe.
The API in question is XmResolveAllPartOffsets(). This builds a table
at runtime of byte offsets into the widget instance structure of each
subpart. That is, for a hypothetical widget whose record struct looks
like:
typedef struct _MyWidget {
CorePart core;
XmPrimitivePart primitive;
MyPart me;
} MyWidgetRec;
XmResolveAllPartOffsets would build a table of where in the structure
primitive and me begin. Then all access into the structure will be done
using this table, and the widget will remain binary compatible with
future versions of the motif library (e.g. CDE) which might change the
size of the XmPrimitivePart structure.
Unfortunately, on 64 bit processors, this becomes more complex. Because
the structure subparts are aligned on 64 bit boundaries, the offset (for
instance) of the XmPrimitivePart is _not_ simply sizeof(CorePart) bytes
into the structure, but the next 8-byte boundary _higher_ than that.
The Motif 1.2.4 source contains a provision for making the alignment
issues work, but this requires that Primitive.c be compiled with
ALIGN_SUBCLASS_PARTS #defined. It appears that the libXm libraries
provided with DEC Unix 3.2 and 4.0 (Motif 1.2.4 and CDE Motif,
respectively) were not compiled with this macro defined, and are
therefore generating incorrect offsets in the offset tables and resource
structures.
[Posted by WWW Notes gateway]
T.R | Title | User | Personal Name | Date | Lines
|
---|