Subject: #244554: FVWM fails to compile on mips/mipsel machines

From: Manoj Srivastava <[email-masked]>
Date: Mon, 19 Apr 2004 04:23:19 -0500

Package: fvwm
Version: 2.5.10-3
Severity: serious
Tags: sid

Hi,

       The error message is at follows:
======================================================================
mips-linux-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../libs
               -I/usr/include -I/usr/include/freetype2
               -I/usr/X11R6/include
               -DFVWM_MODULEDIR=\"/usr/lib/fvwm/2.5.10\"
               -DFVWM_DATADIR=\"/usr/share/fvwm\"
               -DFVWM_CONFDIR=\"/usr/etc\" -DFVWM_COLORSET_PRIVATE=1
               -DLOCALEDIR=\"/usr/share/locale\" -g -O2 -Wall
               -Wno-implicit-int -c `test -f 'menus.c' ||
                echo './'`menus.c 
In file included from menus.h:37,
                 from move_resize.h:6,
                 from menus.c:55:
menuitem.h:128: error: parse error before numeric constant
----------------------------------------------------------------------

        That was surprising, since the line looks innocuous:
----------------------------------------------------------------------
void menuitem_get_size(
  MenuItem *mi, MenuItemPartSizesT *mips, FlocaleFont *font,
  Bool do_reverse_icon_order);
----------------------------------------------------------------------

        Innocuous, that is, until you realize that mips is #defined
 away on a mips/mispel box. Hmm. I note that the changelog says:
----------------------------------------------------------------------
2003-02-03  Dominik Vogt  <[email-masked]>

        * fvwm/menuitem.h:
        * fvwm/menuitem.c (menuitem_get_size):
        * fvwm/menus.c (calculate_item_sizes):
        renamed "mips" to mipst

        * fvwm/menuitem.c (menuitem_get_item_size):
        * fvwm/menus.c (_calculate_item_sizes):
        backed out patch from 30-Jan-2003
----------------------------------------------------------------------
        However, that change is not complete; Observe:
----------------------------------------------------------------------
__> rgrep -n '\bmips\b' fvwm
fvwm/menuitem.h:128:    MenuItem *mi, MenuItemPartSizesT *mips, FlocaleFont *font,
fvwm/menus.c:1611:      MenuItemPartSizesT mips;
fvwm/menus.c:1621:                      mi, &mips, MST_PSTDFONT(msp->menu),
fvwm/menus.c:1624:              if (msp->max.i.triangle_width < mips.triangle_width)
fvwm/menus.c:1626:                      msp->max.i.triangle_width = mips.triangle_width;
fvwm/menus.c:1628:              if (msp->max.i.title_width < mips.title_width)
fvwm/menus.c:1630:                      msp->max.i.title_width = mips.title_width;
fvwm/menus.c:1634:                      if (msp->max.i.label_width[i] < mips.label_width[i])
fvwm/menus.c:1636:                              msp->max.i.label_width[i] = mips.label_width[i];
fvwm/menus.c:1639:              if (msp->max.i.picture_width < mips.picture_width)
fvwm/menus.c:1641:                      msp->max.i.picture_width = mips.picture_width;
fvwm/menus.c:1645:                      if (msp->max.i.icon_width[i] < mips.icon_width[i])
fvwm/menus.c:1647:                              msp->max.i.icon_width[i] = mips.icon_width[i];
----------------------------------------------------------------------

* added directories

    {arch}/fvwm/fvwm--mips-fix
    {arch}/fvwm/fvwm--mips-fix/fvwm--mips-fix--2.5
    {arch}/fvwm/fvwm--mips-fix/fvwm--mips-fix--2.5/[email-masked]
    {arch}/fvwm/fvwm--mips-fix/fvwm--mips-fix--2.5/[email-masked]/patch-log

* added files

    {arch}/fvwm/fvwm--mips-fix/fvwm--mips-fix--2.5/[email-masked]/patch-log/base-0
    {arch}/fvwm/fvwm--mips-fix/fvwm--mips-fix--2.5/[email-masked]/patch-log/patch-1

* modified files

--- orig/fvwm/menuitem.h
+++ mod/fvwm/menuitem.h
@@ -125,7 +125,7 @@
 MenuItem *menuitem_create(void);
 void menuitem_free(MenuItem *mi);
 void menuitem_get_size(
-	MenuItem *mi, MenuItemPartSizesT *mips, FlocaleFont *font,
+	MenuItem *mi, MenuItemPartSizesT *mipst, FlocaleFont *font,
 	Bool do_reverse_icon_order);
 void menuitem_paint(
 	MenuItem *mi, MenuPaintItemParameters *mpip);

--- orig/fvwm/menus.c
+++ mod/fvwm/menus.c
@@ -1608,7 +1608,7 @@
 static void calculate_item_sizes(MenuSizingParameters *msp)
 {
 	MenuItem *mi;
-	MenuItemPartSizesT mips;
+	MenuItemPartSizesT mipst;
 	int i;
 	Bool do_reverse_icon_order =
 		(MST_USE_LEFT_SUBMENUS(msp->menu)) ? True : False;
@@ -1618,33 +1618,33 @@
 	for (mi = MR_FIRST_ITEM(msp->menu); mi != NULL; mi = MI_NEXT_ITEM(mi))
 	{
 		menuitem_get_size(
-			mi, &mips, MST_PSTDFONT(msp->menu),
+			mi, &mipst, MST_PSTDFONT(msp->menu),
 			do_reverse_icon_order);
 		/* adjust maximums */
-		if (msp->max.i.triangle_width < mips.triangle_width)
+		if (msp->max.i.triangle_width < mipst.triangle_width)
 		{
-			msp->max.i.triangle_width = mips.triangle_width;
+			msp->max.i.triangle_width = mipst.triangle_width;
 		}
-		if (msp->max.i.title_width < mips.title_width)
+		if (msp->max.i.title_width < mipst.title_width)
 		{
-			msp->max.i.title_width = mips.title_width;
+			msp->max.i.title_width = mipst.title_width;
 		}
 		for (i = 0; i < MAX_MENU_ITEM_LABELS; i++)
 		{
-			if (msp->max.i.label_width[i] < mips.label_width[i])
+			if (msp->max.i.label_width[i] < mipst.label_width[i])
 			{
-				msp->max.i.label_width[i] = mips.label_width[i];
+				msp->max.i.label_width[i] = mipst.label_width[i];
 			}
 		}
-		if (msp->max.i.picture_width < mips.picture_width)
+		if (msp->max.i.picture_width < mipst.picture_width)
 		{
-			msp->max.i.picture_width = mips.picture_width;
+			msp->max.i.picture_width = mipst.picture_width;
 		}
 		for (i = 0; i < MAX_MENU_ITEM_MINI_ICONS; i++)
 		{
-			if (msp->max.i.icon_width[i] < mips.icon_width[i])
+			if (msp->max.i.icon_width[i] < mipst.icon_width[i])
 			{
-				msp->max.i.icon_width[i] = mips.icon_width[i];
+				msp->max.i.icon_width[i] = mipst.icon_width[i];
 			}
 		}
 	}

        manoj

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.5
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (ignored: LC_ALL set to en_US.UTF-8)

Versions of packages fvwm depends on:
ii  libc6                       2.3.2.ds1-11 GNU C Library: Shared libraries an
ii  libfontconfig1              2.2.2-2      generic font configuration library
ii  libfreetype6                2.1.7-2      FreeType 2 font engine, shared lib
ii  libfribidi0                 0.10.4-1.1   Free Implementation of the Unicode
ii  libice6                     4.3.0-7      Inter-Client Exchange library
ii  libpng12-0                  1.2.5.0-5    PNG library - runtime
ii  libsm6                      4.3.0-7      X Window System Session Management
ii  libstroke0                  0.5.1-4      support for mouse strokes like tho
ii  libx11-6                    4.3.0-7      X Window System protocol client li
ii  libxext6                    4.3.0-7      X Window System miscellaneous exte
ii  libxft2                     2.1.2-6      FreeType-based font drawing librar
ii  libxpm4                     4.3.0-7      X pixmap library
ii  libxrender1                 0.8.3-7      X Rendering Extension client libra
ii  xlibs                       4.3.0-7      X Window System client libraries m
ii  zlib1g                      1:1.2.1-5    compression library - runtime

-- debconf information:
  fvwm/upgrade/pre_2.5.8: false
  fvwm/upgrade/pre_5.8.0: false

-- 
The sight of death frightens them [Earthers]. Kras the Klingon,
"Friday's Child", stardate 3497.2
Manoj Srivastava   <[email-masked]>  <http://www.datasync.com/%7Esrivasta/>
1024R/C7261095 print CB D9 F4 12 68 07 E4 05  CC 2D 27 12 1D F5 E8 6E
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C

---

From: [email-masked]
Date: Wed, 21 Apr 2004 12:44:59 +0200

>        The error message is at follows:
...

Fixed.

Ciao

Dominik ^_^  ^_^

 --
Dominik Vogt, [email-masked]
Reply-To: [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]