summaryrefslogtreecommitdiff
path: root/gl/wchar.in.h
diff options
context:
space:
mode:
Diffstat (limited to 'gl/wchar.in.h')
-rw-r--r--gl/wchar.in.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/gl/wchar.in.h b/gl/wchar.in.h
index 287204f6f7..dd41d35392 100644
--- a/gl/wchar.in.h
+++ b/gl/wchar.in.h
@@ -82,12 +82,16 @@
/* The definition of _GL_WARN_ON_USE is copied here. */
-/* Define wint_t. (Also done in wctype.in.h.) */
+/* Define wint_t and WEOF. (Also done in wctype.in.h.) */
#if !@HAVE_WINT_T@ && !defined wint_t
# define wint_t int
# ifndef WEOF
# define WEOF -1
# endif
+#else
+# ifndef WEOF
+# define WEOF ((wint_t) -1)
+# endif
#endif