After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 674898 - Deal with GLIB_VERSION_MIN_REQUIRED/MAX_ALLOWED being a "future" value
Deal with GLIB_VERSION_MIN_REQUIRED/MAX_ALLOWED being a "future" value
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2012-04-26 18:57 UTC by Dan Winship
Modified: 2012-07-06 16:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Deal with GLIB_VERSION_MIN_REQUIRED/MAX_ALLOWED being a "future" value (1.71 KB, patch)
2012-04-26 18:57 UTC, Dan Winship
committed Details | Review
Clarify the GLIB_VERSION_MIN_REQUIRED/MAX_ALLOWED docs (2.18 KB, patch)
2012-04-26 18:57 UTC, Dan Winship
committed Details | Review

Description Dan Winship 2012-04-26 18:57:40 UTC
Undefined symbols behave as 0 in preprocessor math, so, eg, if you try
to compile against glib 2.32 with
-DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_34, it essentially thinks
you're saying MAX_ALLOWED is 0.0, and complains that that's less than
MIN_REQUIRED.

This fixes both MIN_REQUIRED and MAX_ALLOWED to treat all unrecognized
version symbols as being in the future. I've gone back and forth a few
times on whether it should bail out if it doesn't recognize
MIN_REQUIRED, but eventually decided that that's configure's job...
Comment 1 Dan Winship 2012-04-26 18:57:42 UTC
Created attachment 212903 [details] [review]
Deal with GLIB_VERSION_MIN_REQUIRED/MAX_ALLOWED being a "future" value

If GLIB_VERSION_MIN_REQUIRED or GLIB_VERSION_MAX_ALLOWED was defined
to a future value, we were essentially treating it as
GLIB_VERSION_0_0. Fix to treat it as being in the future instead.
Comment 2 Dan Winship 2012-04-26 18:57:46 UTC
Created attachment 212904 [details] [review]
Clarify the GLIB_VERSION_MIN_REQUIRED/MAX_ALLOWED docs
Comment 3 Matthias Clasen 2012-06-30 05:40:59 UTC
Review of attachment 212903 [details] [review]:

ok
Comment 4 Matthias Clasen 2012-06-30 05:42:41 UTC
Review of attachment 212904 [details] [review]:

ok
Comment 5 Matthias Clasen 2012-07-06 03:25:33 UTC
Patches don't apply cleanly anymore - Dan, can you rebase and push ?
Comment 6 Dan Winship 2012-07-06 16:14:23 UTC
Attachment 212903 [details] pushed as 40f0f66 - Deal with GLIB_VERSION_MIN_REQUIRED/MAX_ALLOWED being a "future" value
Attachment 212904 [details] pushed as ee9aae5 - Clarify the GLIB_VERSION_MIN_REQUIRED/MAX_ALLOWED docs