[comp.windows.x] XHP widget and toolkit on SUN 4 sparc

thp@westhawk.UUCP ("Timothy H Panton.") (12/22/89)

> Anshuman Razdan <cs.utexas.edu!oakhill!razdan@arpa.ohio-state.edu>
who I can't seem to mail writes:
> However, I recently tried compling the application on a Sun4.
> But when executed the toolkit broke down.
> during the Parsing of the translations.

I think I recognize this, it is an alignment problem in a macro in 
IntrinsicI.h .
try editing it to read (starting at line 38) thus:

extern void bcopy();
#ifdef sparc
#define XtBCopy(src, dst, size)                             \
        bcopy((char *) (src), (char *) (dst), (int) (size));
#else
#define XtBCopy(src, dst, size)                             \
    if (size == sizeof(int) &&                              \
        !((unsigned int) src & 0x3) &&                      \
        !((unsigned int) dst & 0x3))                        \
        *((int *) (dst)) = *((int *) (src));                \
    else if (size == sizeof(char))                          \
        *((char *) (dst)) = *((char *) (src));              \
    else                                                    \
        bcopy((char *) (src), (char *) (dst), (int) (size));
#endif

extern void bzero();
#ifdef sparc
#define XtBZero(dst, size)                                  \
        bzero((char *) (dst), (int) (size));
#else
#define XtBZero(dst, size)                                  \
    if (size == sizeof(int))                                \
        *((int *) (dst)) = 0;                               \
    else                                                    \
        bzero((char *) (dst), (int) (size));
#endif

extern int bcmp();
#ifdef sparc
#define XtBCmp(b1, b2, size)                                \
    bcmp((char *) (b1), (char *) (b2), (int) (size))
#else
#define XtBCmp(b1, b2, size)                                \
    (size == sizeof(int) ?                                  \
        *((int *) (b1)) != *((int *) (b2))                  \
    :   bcmp((char *) (b1), (char *) (b2), (int) (size))    \
    )
#endif

Happy Xmas.
Tim.
+----------------------------------------------------------------------------+
|Tim Panton, Westhawk Ltd.    "We all have our faults, mine's being wicked." |
|Phone: +44 92822574                               -The 13 clocks, Thurber.  |
|uucp : ..!mcvax!ukc!westhawk!thp                                            |
|Paper: Westhawk Ltd. 26 Rydal Grove, Helsby, Cheshire, WA6 OET. UK.         |
+----------------------------------------------------------------------------+



------- End of Unsent Draft

swick@ATHENA.MIT.EDU (Ralph R. Swick) (12/22/89)

> try editing it to read (starting at line 38) thus:

This isn't necessary; just make sure your config files do not
build Xt with -DUNALIGNED for the Sparc.

thp@westhawk.UUCP ("Timothy H Panton.") (12/22/89)

I said:
>> try editing it to read (starting at line 38) thus:

<swick@athena.mit.edu>

> This isn't necessary; just make sure your config files do not
> build Xt with -DUNALIGNED for the Sparc.

You are of course correct, R3 Xt is free from the problem, but the R2 based
intrinsics that come with the HP widgets on the R3 tape do need this fix.

Tim.