Bug 94521 - Use __UCLIBC__ to select for uClibc only features
Summary: Use __UCLIBC__ to select for uClibc only features
Status: RESOLVED FIXED
Alias: None
Product: GeoClue
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: medium normal
Assignee: Geoclue Bugs
QA Contact: Geoclue Bugs
URL: https://bugzilla.gnome.org/show_bug.c...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-13 12:26 UTC by Anthony G. Basile
Modified: 2016-04-05 12:58 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
use __UCLIBC__ to check for uClibc only (1.37 KB, text/plain)
2016-03-13 12:26 UTC, Anthony G. Basile
Details

Description Anthony G. Basile 2016-03-13 12:26:29 UTC
Created attachment 122264 [details]
use __UCLIBC__ to check for uClibc only

Commit f0f85d8d from the geocode-glib codebase uses __GLIBC__ to check for glibc only features [1].  However this is not sufficient for uClibc because it shares code with glibc.  To properly select for uClibc only features, one needs defined(__GLIBC__) && !defined(__UCLIBC__).  We note parenthatically that this is not required for musl which avoids all such ugly marcos.

I understadn that geoclue imports code from geocode-glib, but since I don't know the relationship between the two code bases (is it imported verbatim?) I'm submitting the patch against geoclue.  The same issue applies equally to geocode-glib.

This was hit on Gentoo with uClibc.  See the downstream bug report. [2]



References:

[1] https://git.gnome.org/browse/geocode-glib/commit/?id=f0f85d8d01c64c61dfef3d00af5b9e629e336213

[2] https://bugs.gentoo.org/show_bug.cgi?id=577290
Comment 1 Anthony G. Basile 2016-03-13 12:28:53 UTC
Hmm ... rereading my commit message, that might better read "to select for features in glibc but not uClibc, we need defined(__GLIBC__) && !defined(__UCLIBC__)".  Sorry the code is right but the English is misleading.
Comment 2 Zeeshan Ali 2016-03-21 18:16:46 UTC
(In reply to Anthony G. Basile from comment #1)
> Hmm ... rereading my commit message, that might better read "to select for
> features in glibc but not uClibc, we need defined(__GLIBC__) &&
> !defined(__UCLIBC__)".  Sorry the code is right but the English is
> misleading.

No worries but you gotta re-attach the corrected patch. :)
Comment 3 Zeeshan Ali 2016-03-21 18:18:45 UTC
(In reply to Zeeshan Ali from comment #2)
> (In reply to Anthony G. Basile from comment #1)
> > Hmm ... rereading my commit message, that might better read "to select for
> > features in glibc but not uClibc, we need defined(__GLIBC__) &&
> > !defined(__UCLIBC__)".  Sorry the code is right but the English is
> > misleading.
> 
> No worries but you gotta re-attach the corrected patch. :)

Actually, I just realized that patch is for geocode-glib. It is a separate project that we import verbatim from it's git repository. You want to file your patch(es) here:

https://bugzilla.gnome.org/enter_bug.cgi?product=geocode-glib

Once your patch is merged in geocode-glib, please comment in here and I'll update our copy of geocode-glib.
Comment 4 Anthony G. Basile 2016-03-22 10:02:04 UTC
(In reply to Zeeshan Ali from comment #3)
> (In reply to Zeeshan Ali from comment #2)
> > (In reply to Anthony G. Basile from comment #1)
> > > Hmm ... rereading my commit message, that might better read "to select for
> > > features in glibc but not uClibc, we need defined(__GLIBC__) &&
> > > !defined(__UCLIBC__)".  Sorry the code is right but the English is
> > > misleading.
> > 
> > No worries but you gotta re-attach the corrected patch. :)
> 
> Actually, I just realized that patch is for geocode-glib. It is a separate
> project that we import verbatim from it's git repository. You want to file
> your patch(es) here:
> 
> https://bugzilla.gnome.org/enter_bug.cgi?product=geocode-glib
> 
> Once your patch is merged in geocode-glib, please comment in here and I'll
> update our copy of geocode-glib.

Submitted to https://bugzilla.gnome.org/show_bug.cgi?id=764021
Comment 5 Anthony G. Basile 2016-03-30 21:16:26 UTC
(In reply to Anthony G. Basile from comment #4)
> (In reply to Zeeshan Ali from comment #3)
> > 
> > Once your patch is merged in geocode-glib, please comment in here and I'll
> > update our copy of geocode-glib.
> 
> Submitted to https://bugzilla.gnome.org/show_bug.cgi?id=764021

merged into geocode-glib

https://git.gnome.org/browse/geocode-glib/commit/?id=3ce317a218c255b8a8025f8f2a6010ce500dc0ee
Comment 6 Zeeshan Ali 2016-04-05 12:58:01 UTC
commit: 9d90e62214ca4cee4bfe845e37f3b1f50f882107

    location: Update from geocode-glib


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.