GNOME Bugzilla – Bug 442065
floatcast.h includes config.h and might break other apps
Last modified: 2007-09-25 11:56:17 UTC
/usr/include/gstreamer-0.10/gst/floatcast/floatcast.h:# include "config.h"
Severity is high since this can break other apps.
Created attachment 89114 [details] [review]
I'm proposing we just remove the use of config.h
It means that any users (there aren't any, but anyway) of floatcast.h will end up taking the non-lrint option, but anything that's included config.h before floatcast.h like they should will get the same code they expect.
I'm not planning to put this in 0.10.13, btw - it's already in the 0.10.12 release and installed and we haven't had any complaints of broken apps, so I don't consider it a blocker.
We can fix it for 0.10.14, which is supposed to be out before Gnome 2.20.
I am not sure what is meanth by "If optimisation is enabled" in the floatcast.h comment (but thats a different story).
What about applying the change now?
We could also generate the header by configure in theory... but I guess this is too ugly and we should just take the proposed patch. Anybody opposed to committing the patch?
Wouldn't it work if the application that uses floatcast.h includes config.h and in the macro docs we tell that the application that use those should check for the availability of lrint,lrintf ?
> Wouldn't it work if the application that uses floatcast.h includes config.h and
> in the macro docs we tell that the application that use those should check for
> the availability of lrint,lrintf ?
Yes, I think it's the best we can do for now:
2007-09-25 Tim-Philipp Müller <tim at centricular dot net>
Don't include config.h in an installed public header, this
might break compilation of applications that don't have such
a header and doesn't necessarily do what it's supposed to do
anyway (ie. check for the lrint/lrintf defines) (#442065).
Add docs for the various macros and document how this header
has to be used (link against libm, etc.); add a few FIXMEs;
include math.h for non-c99 code path. Based on patch by
Not that anything actually seems to use those gst_cast_*() macros ...