Skip site navigation (1)Skip section navigation (2)
Date:      18 Jul 2003 13:46:46 +0200
From:      Peter Kadau <peter.kadau@tuebingen.mpg.de>
To:        Kris Kennaway <kris@obsecurity.org>
Cc:        current@freebsd.org
Subject:   Re: Fixing gcc 3.3 compile failures
Message-ID:  <1058528806.31379.6.camel@skeeve>
In-Reply-To: <20030718025200.GA36893@rot13.obsecurity.org>
References:  <20030718025200.GA36893@rot13.obsecurity.org>

next in thread | previous in thread | raw e-mail | index | archive | help
OK, here is one for graphics/svgalib:
--- src/vga.c.orig      Fri Jul 18 13:27:40 2003
+++ src/vga.c   Fri Jul 18 13:32:58 2003
@@ -3846,7 +3846,7 @@
  
 #define ML_GETINT(x) \
        ptr = strtok(NULL, " "); if(!ptr) break; \
-       mmt.##x = atoi(ptr);
+       mmt.x = atoi(ptr);
  
            ML_GETINT(HDisplay);
            ML_GETINT(HSyncStart);

Just abused concatenation...

But I'm pretty sure that the following is
what was intended, thusly the better patch:
--- src/vga.c.orig      Fri Jul 18 13:27:40 2003
+++ src/vga.c   Fri Jul 18 13:34:38 2003
@@ -3845,8 +3845,9 @@
            mmt.pixelClock = atof(ptr) * 1000;
  
 #define ML_GETINT(x) \
-       ptr = strtok(NULL, " "); if(!ptr) break; \
-       mmt.##x = atoi(ptr);
+       do { ptr = strtok(NULL, " "); if(!ptr) break; \
+               mmt.x = atoi(ptr); } \
+       while (0)
  
            ML_GETINT(HDisplay);
            ML_GETINT(HSyncStart);
 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1058528806.31379.6.camel>