Bug 33447 - Code uses _GNU_SOURCE to determine locale facilities are available
Summary: Code uses _GNU_SOURCE to determine locale facilities are available
Status: RESOLVED MOVED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Other (show other bugs)
Version: 7.9
Hardware: Other Linux (All)
: medium normal
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-24 18:57 UTC by Bryan Henderson
Modified: 2019-09-18 20:16 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Patch to use the proper feature test / feature request macros (2.11 KB, patch)
2011-01-27 19:18 UTC, Bryan Henderson
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Bryan Henderson 2011-01-24 18:57:19 UTC
In two places, the code use #if defined(_GNU_SOURCE) to determine whether certain locale facilities are present in the environment.

I suspect the code wants to test whether the C library is the GNU C library, which is __GLIBC__.  _GNU_SOURCE is something the source file sets to tell the GNU C Library header files that the code is designed for GNU extensions in that library.

Incidentally, just having GNU C Library isn't enough to know these facilities are available.  It takes a recent version of it.  For example, I found GNU C Library Version 2.2.2 does not have them.

The two places are:

  src/glsl/strtod.c
  src/mesa/main/imports.c
Comment 1 Bryan Henderson 2011-01-24 19:08:23 UTC
Additional advice: The value of __GLIBC__ is the major release number.  __GLIBC_MINOR__ is the minor release number.  So GNU C Library version 2.7 as __GLIBC__ = 2, __GLIBC_MINOR__ = 7.
Comment 2 Brian Paul 2011-01-24 20:08:26 UTC
Feel free to provide a patch to fix these issues.  Thanks.
Comment 3 Bryan Henderson 2011-01-27 19:18:44 UTC
Created attachment 42625 [details] [review]
Patch to use the proper feature test / feature request macros
Comment 4 Matt Turner 2012-08-24 23:33:35 UTC
I pushed a patch that stops detecting dlopen presence based on _GNU_SOURCE, but more _GNU_SOURCE usage still remains.
Comment 5 GitLab Migration User 2019-09-18 20:16:50 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/894.


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.