Fixing gcc 3.3 compile failures
Peter Kadau
peter.kadau at tuebingen.mpg.de
Fri Jul 18 04:46:53 PDT 2003
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);
More information about the freebsd-ports
mailing list