GNOME Bugzilla – Bug 125635
0.7.1 does not compile with older gcc
Last modified: 2004-12-22 21:47:04 UTC
Apparently older gcc's handle macros with variable arguments slightly differently. From this section of the gcc manual for the version I am using, I suspect the offhand comment here has actually been implemented: === It might be better to discard the last preprocessor token instead of the last preceding sequence of non-whitespace characters; in fact, we may someday change this feature to do so. We advise you to write the macro definition so that the preceding sequence of non-whitespace characters is just a single token, so that the meaning will not change if we change the definition of this feature. === Anyway, for macros with variable arguments I had to change the last ``foo, ##stuff'' to ``foo , ##stuff''. That is, put a space before the comma. The following is a demonstration: diff -ru gst-plugins-0.7.1.orig/ext/ffmpeg/gstffmpegcodecmap.c gst-plugins-0.7.1/ext/ffmpeg/gstffmpegcodecmap.c --- gst-plugins-0.7.1.orig/ext/ffmpeg/gstffmpegcodecmap.c 2003-07-07 14:29:16.000000000 -0700 +++ gst-plugins-0.7.1/ext/ffmpeg/gstffmpegcodecmap.c 2003-10-27 13:42:35.000000000 -0800 @@ -44,7 +44,7 @@ "height", GST_PROPS_INT (context->height),\ "framerate", GST_PROPS_FLOAT ( \ 1.*context->frame_rate/ \ - context->frame_rate_base), \ + context->frame_rate_base) , \ ##props) \ : \ GST_CAPS_NEW (name, \ @@ -52,7 +52,7 @@ "width", GST_PROPS_INT_RANGE (16, 4096), \ "height", GST_PROPS_INT_RANGE (16, 4096), \ "framerate", GST_PROPS_FLOAT_RANGE (0, \ - G_MAXFLOAT), \ + G_MAXFLOAT) , \ ##props) /* same for audio - now with channels/sample rate I've not finished building, so not sure if that patch is sufficient, yet. But if I don't post this bug now, I'll probably forget about it. Oh yeah, gcc version 2.95.4 20020723 (prerelease)
This is odd. I don't understand why we don't trigger this in other places. Anyway, I applied the patch, as it can't hurt anything. Let us know if you notice any other 2.95 problems, as we don't generally check.