Subject: Compile error: 2.3.10

From: [email-masked]
Date: Fri, 17 Dec 1999 11:15:46 -0500 (EST)

Simple error, really:

cd ../.. \
  && CONFIG_FILES=modules/FvwmDragWell/Makefile CONFIG_HEADERS= /bin/sh ./config.status
creating modules/FvwmDragWell/Makefile
cc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I/freeware/include     -O4 -c fvwmDragWell.c
cc: Error: fvwmDragWell.h, line 70: Missing type specifier or type qualifier. (missingtype)
  int xneg,yneg,usposition; /*window size stuff*/;
-------------------------------------------------^

If you look carefully, there are two semicolons on the line; the second one
implying an "empty statement" which is technically not allowed in the middle
of a structure definition.  (Why doesn't GCC notice this???)

Next problem.  In modules/FvwmIconMan/readconfig.c, we have lines like the
following:

  { "quit",        builtin_quit,        0, {} },
 
For some reason, COMPAQ C is choking on the empty bracket declarations.  The
structure used in fvwm 2.2 was:

  { "quit",        builtin_quit,        0 },

(simply ignore the missing arguments).  I've changed the former to the latter
in my distrubtion, and the rest of the compile went well.

I'm not sure who's at fault here.  I'm not sure if the former is valid C (I Am
Not A C Language Lawyer).  If there was some overarching reason for the change
between 2.2 and 2.3.10, then maybe it might be nice to document this within
the source file as a hint to Tru64 Unix users.  Or, maybe, have some code like
this:

#ifdef __DECC
#define	ZERO_ARGS	/* nothing */
#else
#define	ZERO_ARGS	{ }
#endif

(I think that COMPAQ C also allows { 0 } or { NULL } instead of the empty
braces).

If this is fixed in the current CVS, feel free to ignore.

I'll send reports of any other problems I notice

-- 
Larry Gensch                                          [email-masked]

                  "May I have ten thousand marbles, please?"

--
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]

---

From: Dan Espen <[email-masked]>
Date: Fri, 17 Dec 1999 11:25:02 -0500

> If this is fixed in the current CVS, feel free to ignore.

The "{ 0 }" solution looks like the cleanest solution to me.
(I'm not a C lawyer either.)

Could you let us know if that makes COMPAQ C happy?  (It seems obvious
it would, but testing before change is always a good idea.)

--
Dan Espen
444 Hoes Lane  Room RRC 1C-214           E-mail: [email-masked]
Piscataway, NJ 08854                     Phone: (732) 699-5570
--
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]

---

From: [email-masked]
Date: Fri, 17 Dec 1999 11:36:26 -0500 (EST)

> it would, but testing before change is always a good idea.)

It works as well.

Now, I'm having runtime problems.  I'll start a new thread on them.  [smile]