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 657083 - The header langinfo.h is not available on all systems
The header langinfo.h is not available on all systems
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
2.29.x
Other Windows
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2011-08-22 15:28 UTC by Fan, Chun-wei
Modified: 2011-08-23 02:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Check for langinfo.h and only include it when available (1.43 KB, patch)
2011-08-22 15:28 UTC, Fan, Chun-wei
none Details | Review

Description Fan, Chun-wei 2011-08-22 15:28:14 UTC
Created attachment 194378 [details] [review]
Check for langinfo.h and only include it when available

Hi,

It appears that recent updates to glib/gdatetime.c includes langinfo.h which is
not available on all systems/compilers, including MinGW (native Windows, I do
not know about the MinGW cross compiler on Linux) and Visual C++.

This attempts to add a check for langinfo.h during ./configure and to update
glib/gdatetime.c to only include langinfo.h if it is found.

p.s.: Please let me know if I could simply use HAVE_LANGINFO_TIME for the check
      macro to include langinfo.h instead, without any changes to configure.ac, 
      as it seems to me that header was used for calls encased by #ifdef 
      HAVE_LANGINFO_TIME.

Thank you, and God bless!
Comment 1 Matthias Clasen 2011-08-22 22:37:37 UTC
Just using HAVE_LANGINFO_TIME would be preferable, I think