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 667290 - tools: Include locale.h before any i18n headers.
tools: Include locale.h before any i18n headers.
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other All
: Normal normal
: 0.10.36
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 667291 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-01-04 19:55 UTC by Håvard Graff (hgr)
Modified: 2012-03-21 12:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (674 bytes, patch)
2012-01-04 19:55 UTC, Håvard Graff (hgr)
reviewed Details | Review

Description Håvard Graff (hgr) 2012-01-04 19:55:53 UTC
Created attachment 204608 [details] [review]
patch

.
Comment 1 Tim-Philipp Müller 2012-01-05 00:36:44 UTC
Why not just put it in the header directly then? Which is what I've done now, since we seem to be doing that in -base as well. More generally, your commit message is again rather uninformative. It doesn't say *why* this is required, what breakage does it fix in which environment etc.

commit 1aec7a3d72051ed28911e4732a527b81ecb4939b
Author: Tim-Philipp Müller <tim.muller@collabora.co.uk>
Date:   Thu Jan 5 00:30:30 2012 +0000

    gst: include locale.h before any other i18n headers
    
    This is also how we do it in -base.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=667290
Comment 2 Tim-Philipp Müller 2012-01-05 00:38:44 UTC
*** Bug 667291 has been marked as a duplicate of this bug. ***
Comment 3 Idar Tollefsen 2012-03-21 12:19:11 UTC
Indeed, the commit message should have been better.

The issue was with Solaris. And in fact, it's not locale.h that is the real issues, but macros defined in header files included by locale.h that needs to be in before the other i18n stuff. These are the macros for X/Open level/standard and whether extensions to this is to be used or not. I believe it's stdlib.h that defines these based on compiler flags and defines set on the command line or before header inclusion.

In any event, if stdlib.h isn't in before the other i18n include files, you'll end up with either a error message saying something about incompatible UNIX standards or it won't find prototypes for functions it needs because the chosen standard level is too low and/or extensions aren't used.

Moving the include to the header sounds good though, and should achieve the same thing.