Subject: CVS domivogt: * Applied FScreen.c patch again. It didn't appear in CVS for me.

From: FVWM CVS <[email-masked]>
Date: Mon, 30 Aug 2004 03:14:50 -0500

CVSROOT:	/home/cvs/fvwm
Module name:	fvwm
Changes by:	domivogt	04/08/30 03:14:49

Modified files:
	.              : AUTHORS ChangeLog NEWS 
	libs           : FScreen.c 
	modules        : ChangeLog 
	modules/FvwmTaskBar: Goodies.c 

Log message:
* Applied FScreen.c patch again.  It didn't appear in CVS for me.
* Applied FvwmTaskBar MailDir patch.

--
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: Chris Ross <[email-masked]>
Date: Mon, 30 Aug 2004 11:42:28 -0400

Thanks Dominik.

   One additional minor problem in FScreen.c.  Now that you're
always compiling solaris_XineramaQueryScreens(), and later calling
the correct function based on a compiled constant, if you're
building on a Solaris (or likely any non-Xinerama system),
it will complain about the lack of prototype (and conversion
from int to pointer) of the XineramaQueryScreens() call in
FXineramaQueryScreens.

   Is this something we should fix by adding a prototype,
even though we know the function will never be called?
Is it a bug in gcc that it even looks for the prototype,
since really the optimizer should be able to tell that
that's a constant comparison, and it should be able to
simply not call that function ever?

   Thanks...

                       - Chris

---

From: Dominik Vogt <[email-masked]>
Date: Tue, 31 Aug 2004 12:32:10 +0200

> even though we know the function will never be called?

Yes, of course.  I'll commit a patch in a minute.

> simply not call that function ever?

The whole idea of not #ifdef'ing code is to have the compiler
syntax checks even if a feature is not enabled.  The optimizer
kicks in only after the syntax checks have been done.  This is
important to simplify maintenance.  We once had around 12 to 14
features that could be switched via configure/ifdef.  Just
building with all combinations of #define's would have taken days.
The new way to handle this is to catch feature tests as early as
possible and provide dummy interfaces if the feature is not
defined.  The optimizer then takes care of removing the useless
code.

Ciao

Dominik ^_^  ^_^

 --
Dominik Vogt, [email-masked]
Reply-To: [email-masked]