FVWM: Re: Compiling fvwm2 on SCO 5.0.2 - cpp problems

From: Andrew Veliath <veliaa_at_ny.frontiercomm.net>
Date: Thu, 1 May 1997 16:11:19 -0400

    Bela> Here's the problem. Those token-paste operators ("##") are
    Bela> wrong. ANSI C requires that in a ## b, all three of "a",
    Bela> "b", and the resulting pasted token, be valid preprocessor
    Bela> tokens. "->TitleHeight" is not a valid token (it's *two*
    Bela> valid tokens). Token pasting is not wanted here. The
    Bela> macros should read:

    Bela> #ifdef USEDECOR /* THIS IS WHAT i WANT TO USE */ #define
    Bela> GetDecor(window,part) ((window)->fl->part) #else #define
    Bela> GetDecor(window,part) (Scr.DefaultDecor.part) #endif

    Bela> The AT&T/USL/SCO compiler differs from gcc in this matter.
    Bela> It is not wrong. gcc is interpreting the ANSI standard more
    Bela> loosely than SCO cc.

Bela: thanks for this solution. Sorry, this was my blunder.

Chuck: please make sure this change below gets into the next release.

Regards,
Andrew

--- screen.h.orig Thu May 1 16:03:09 1997
+++ screen.h Thu May 1 16:03:34 1997
_at_@ -329,9 +329,9 @@
    the UseDecor mechanism.
  */
 #ifdef USEDECOR
-#define GetDecor(window,part) ((window)->fl->##part)
+#define GetDecor(window,part) ((window)->fl->part)
 #else
-#define GetDecor(window,part) (Scr.DefaultDecor.##part)
+#define GetDecor(window,part) (Scr.DefaultDecor.part)
 #endif
 
 /* some protos for the decoration structures */
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_hpc.uh.edu.
To report problems, send mail to fvwm-owner_at_hpc.uh.edu.
Received on Thu May 01 1997 - 15:11:34 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:38:00 BST