wctype-h: fix gettext link error on mingw
authorDaiki Ueno <ueno@gnu.org>
Thu, 25 Apr 2013 20:32:03 +0000 (13:32 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 25 Apr 2013 20:32:20 +0000 (13:32 -0700)
Reported by Josue Andrade Gomes and Takayuki Tsunakawa in
<https://lists.gnu.org/archive/html/bug-gettext/2013-03/msg00086.html>.
* lib/wctype.in.h [__MINGW32__]: Include <ctype.h> before defining
rpl_towupper and rpl_towupper.

ChangeLog
lib/wctype.in.h

index f49e881..fd05966 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2013-04-25  Daiki Ueno  <ueno@gnu.org>
+
+       wctype-h: fix gettext link error on mingw
+       Reported by Josue Andrade Gomes and Takayuki Tsunakawa in
+       <https://lists.gnu.org/archive/html/bug-gettext/2013-03/msg00086.html>.
+       * lib/wctype.in.h [__MINGW32__]: Include <ctype.h> before defining
+       rpl_towupper and rpl_towupper.
+
 2013-04-11  Dmitry V. Levin  <ldv@altlinux.org>
 
        regex-tests, regex: allow glibc re_search behavior
index a465af2..933d622 100644 (file)
 # include <wchar.h>
 #endif
 
+/* mingw has declarations of towupper and towlower in <ctype.h> as
+   well <wctype.h>.  Include <ctype.h> in advance to avoid rpl_ prefix
+   being added to the declarations.  */
+#ifdef __MINGW32__
+# include <ctype.h>
+#endif
+
 /* Include the original <wctype.h> if it exists.
    BeOS 5 has the functions but no <wctype.h>.  */
 /* The include_next requires a split double-inclusion guard.  */