projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
*** empty log message ***
[gnulib.git]
/
lib
/
quotearg.c
diff --git
a/lib/quotearg.c
b/lib/quotearg.c
index
6e7ac8a
..
902192e
100644
(file)
--- a/
lib/quotearg.c
+++ b/
lib/quotearg.c
@@
-58,17
+58,24
@@
# include <string.h>
#endif
# include <string.h>
#endif
-#if HAVE_WCTYPE_H
-# include <wctype.h>
-#endif
-
#if HAVE_MBRTOWC && HAVE_WCHAR_H
# include <wchar.h>
#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)
+# endif
#else
#else
-# define iswprint(wc) 1
-# define mbrtowc(pwc, s, n, ps) 1
+# define mbrtowc(pwc, s, n, ps) ((*(pwc) = *(s)) != 0)
# define mbsinit(ps) 1
# define mbsinit(ps) 1
-# define mbstate_t int
+# define iswprint(wc) ISPRINT ((unsigned char) (wc))
+#endif
+
+#ifndef iswprint
+# if HAVE_WCTYPE_H
+# include <wctype.h>
+# endif
+# if !defined iswprint && !HAVE_ISWPRINT
+# define iswprint(wc) 1
+# endif
#endif
#define INT_BITS (sizeof (int) * CHAR_BIT)
#endif
#define INT_BITS (sizeof (int) * CHAR_BIT)