Include <wctype.h> after <wchar.h>,
authorJim Meyering <jim@meyering.net>
Fri, 23 Jun 2000 21:05:50 +0000 (21:05 +0000)
committerJim Meyering <jim@meyering.net>
Fri, 23 Jun 2000 21:05:50 +0000 (21:05 +0000)
for Solaris 2.5.
(mbrtowc, mbstate_t): Define substitutes if
HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
(iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).

lib/quotearg.c

index 6e7ac8a..7fa5278 100644 (file)
 # include <string.h>
 #endif
 
-#if HAVE_WCTYPE_H
-# include <wctype.h>
-#endif
-
 #if HAVE_MBRTOWC && HAVE_WCHAR_H
 # include <wchar.h>
+# if !HAVE_MBSTATE_T_OBJECT
+#  define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0)
+#  define mbstate_t int
+# endif
 #else
-# define iswprint(wc) 1
 # define mbrtowc(pwc, s, n, ps) 1
 # define mbsinit(ps) 1
 # define mbstate_t int
 #endif
 
+#if HAVE_WCTYPE_H
+# include <wctype.h>
+#endif
+#if !defined iswprint && !HAVE_ISWPRINT
+# define iswprint(wc) 1
+#endif
+
 #define INT_BITS (sizeof (int) * CHAR_BIT)
 
 #if defined (STDC_HEADERS) || (!defined (isascii) && !defined (HAVE_ISASCII))