]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Fix compilation error in <libintl.h> on Cygwin.
authorBruno Haible <bruno@clisp.org>
Mon, 20 Mar 2017 21:36:36 +0000 (22:36 +0100)
committerBruno Haible <bruno@clisp.org>
Mon, 20 Mar 2017 21:36:36 +0000 (22:36 +0100)
Reported by Michael Haubenwallner at https://savannah.gnu.org/bugs/?50595 .

* gettext-runtime/intl/libgnuintl.in.h (newlocale): Hide declaration if
  locale_t type is not visible on Cygwin.

gettext-runtime/intl/libgnuintl.in.h

index dc1947f8f2bba1a8186f904acfb00df93b35ceb1..95dcc16cacc98ecbe8bb7e062b290e7e5e39df75 100644 (file)
@@ -439,7 +439,10 @@ extern char *setlocale (int, const char *);
 
 #undef newlocale
 #define newlocale libintl_newlocale
+/* Declare newlocale() only if the system headers define the 'locale_t' type. */
+#if !(defined __CYGWIN__ && !defined LC_ALL_MASK)
 extern locale_t newlocale (int, const char *, locale_t);
+#endif
 
 #endif