Subject: [Falk Hueffner <[email-masked]>] Bug#188337: mwm hints parsing broken on 64 bit architectures

From: Alexander Kotelnikov <[email-masked]>
Date: Wed, 09 Apr 2003 11:24:58 -0400

Hi.

I've received this bug report along with a patch.

Subject: Bug#188337: mwm hints parsing broken on 64 bit architectures
From: Falk Hueffner <[email-masked]>
To: Debian Bug Tracking System <[email-masked]>
Date: Wed, 09 Apr 2003 14:40:31 +0200

Package: fvwm
Version: 2.4.15-2
Severity: normal
Tags: patch

Hi,

fvwm contains the same bug as qvwm (#97326), which makes for example
mozilla's window borders not show up. Here's a patch.

--- fvwm/decorations.c~	2003-02-08 14:09:43.000000000 +0100
+++ fvwm/decorations.c	2003-04-09 14:07:49.000000000 +0200
@@ -73,10 +73,10 @@
 /* Motif  window hints */
 typedef struct
 {
-  CARD32      flags;
-  CARD32      functions;
-  CARD32      decorations;
-  INT32       inputMode;
+  ulong      flags;
+  ulong      functions;
+  ulong      decorations;
+  long       inputMode;
 } PropMotifWmHints;
 
 typedef PropMotifWmHints        PropMwmHints;

	Falk

-- System Information:
Debian Release: testing/unstable
Architecture: alpha
Kernel: Linux juist 2.5.59 #4 Sat Jan 18 12:46:41 CET 2003 alpha
Locale: LANG=C, LC_CTYPE=de_DE@euro

Versions of packages fvwm depends on:
ii  libc6.1                   2.3.1-16       GNU C Library: Shared libraries an
ii  libglib1.2                1.2.10-8       The GLib library of C routines
ii  libgtk1.2                 1.2.10-14      The GIMP Toolkit set of widgets fo
ii  libncurses5               5.3.20021109-2 Shared libraries for terminal hand
ii  libreadline4              4.3-4          GNU readline and history libraries
ii  libstroke0                0.5.1-2        support for mouse strokes like tho
ii  xlibs                     4.2.1-5.0.1    X Window System client libraries

-- no debconf information

-- 
Alexander Kotelnikov
Saint-Petersburg, Russia

---

From: Dan Espen <[email-masked]>
Date: Wed, 09 Apr 2003 18:57:26 -0400

Alexander Kotelnikov <[email-masked]> writes:
> --=-=-=
> --=-=-=
> Reply-To: Falk Hueffner <[email-masked]>, [email-masked]
> Resent-To: [email-masked]
> Resent-CC: Alexander Kotelnikov <[email-masked]>,
>  [email-masked]

OK, this is the way that structure is defined on my Solaris 8 system:

/usr/dt/share/include/Xm/MwmUtil.h:

typedef struct
{
    /* These correspond to XmRInt resources. (VendorSE.c) */
    int          flags;
    int          functions;
    int          decorations;
    int          input_mode;
    int          status;
} MotifWmHints;

Its the same on HPUX.11.  On AIX 5.1 the one in
/usr/include/Motif2.1/Xm/MwmUtil.h
is the same, but they have the old Motif 1.2 where it was:

/usr/include/Motif1.2/Xm/MwmUtil.h:

typedef struct
{
#ifndef OSF_v1_2_4
    long        flags;
    long        functions;
    long        decorations;
#else /* OSF_v1_2_4 */
    /* These correspond to XmRInt resources. (VendorSE.c) */
    int          flags;
    int          functions;
    int          decorations;
#endif /* OSF_v1_2_4 */
    int         input_mode;
#ifndef OSF_v1_2_4
    long        status;
#else /* OSF_v1_2_4 */
    int          status;
#endif /* OSF_v1_2_4 */
} MotifWmHints;

So it looks like "int" is the way to go.  What is the "ulong"
solution based on?

-- 
Dan Espen                           E-mail: [email-masked]
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]