Summary: | glibc 2.26 doesn't provide anymore xlocale.h | ||
---|---|---|---|
Product: | Mesa | Reporter: | Laurent carlier <lordheavym> |
Component: | Mesa core | Assignee: | mesa-dev |
Status: | RESOLVED FIXED | QA Contact: | mesa-dev |
Severity: | normal | ||
Priority: | medium | CC: | andyrtr, vedran |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | WIP patch |
Description
Laurent carlier
2017-08-28 13:39:46 UTC
The patch in the bug report isn't quite right (aka remove the header and guards all together). Instead one should add a configure check - AC_LINK_IFELSE() ... which: - includes xlocale.h reusing the HAVE_XLOCALE_H guard - references strtod_l w/o any guard, setting a macro HAVE_FOO Then update the code - swap the __GNU_SOURCE guards through the file with HAVE_FOO - HAVE_XLOCALE_H should guard _only_ the header inclusion Created attachment 133909 [details] [review] WIP patch Work in progress patch The locale_t check does not seem like a good idea. The struct is used by {new,free}locale API, which pulls locale.h. Aka the struct may be available, even when strto{f,d}_l is not. (In reply to Laurent carlier from comment #2) > Created attachment 133909 [details] [review] [review] > WIP patch > > Work in progress patch Your patch checks for `locale_t`, but I don't think this is the thing that might be missing; `strtod_l()` is. I had also started working on this, I just pushed my WIP here: https://github.com/1ace/mesa wip/strtod-fix (quick diff link:) https://github.com/mesa3d/mesa/compare/master...1ace:wip/strtod-fix I'm having a couple issues though, I'm on IRC if you want to work together :) Fixed by: commit 49b428470e28ae6ab22083e43fa41abf622f3b0d Author: Eric Engestrom <eric.engestrom@imgtec.com> Date: Thu Aug 31 16:55:56 2017 +0000 util: improve compiler guard Glibc 2.26 has dropped xlocale.h, but the functions needed (strtod_l() and strdof_l()) can be found in stdlib.h. Improve the detection method to allow newer builds to still make use of the locale-setting. |
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.