URL:
<http://savannah.gnu.org/bugs/?50595>
Summary: libintl.h: declare newlocale when requested by
feature macros only
Project: GNU gettext
Submitted by: haubi
Submitted on: Mon 20 Mar 2017 02:53:15 PM CET
Category: C
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
Cygwin does provide newlocale function, thus @HAVE_NEWLOCALE@ = 1.
But <locale.h> does declare locale_t only if selected by feature macros,
causing this compiler error when using libintl.h with -std=c90:
<code>
$ x86_64-pc-cygwin-gcc -std=c90 -O2 -pipe -O2 -pipe -I./subversion/include
-I./subversion -I/usr/include/apr-1 -I/usr/include/apr-1 -I/usr/include/serf-1
-c subversion/libsvn_delta/compat.c -DDLL_EXPORT -DPIC -o
subversion/libsvn_delta/.libs/compat.o
In file included from ./subversion/svn_private_config.h:255:0,
from subversion/libsvn_delta/compat.c:36:
/usr/include/libintl.h:440:8: error: unknown type name 'locale_t'
extern locale_t newlocale (int, const char *, locale_t);
^
/usr/include/libintl.h:440:47: error: unknown type name 'locale_t'
extern locale_t newlocale (int, const char *, locale_t);
^
</code>
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Mon 20 Mar 2017 02:53:15 PM CET Name:
0001-libintl.h-expose-newlocale-when-requested-only.patch Size: 1kB By:
haubi
<http://savannah.gnu.org/bugs/download.php?file_id=40037>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?50595>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/