Mercurial > hg > octave-lojdl > gnulib-hg
changeset 2641:0fd2ca768e87
Include <wctype.h> after <wchar.h>,
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).
author | Jim Meyering <jim@meyering.net> |
---|---|
date | Fri, 23 Jun 2000 21:05:50 +0000 |
parents | aba343809715 |
children | ee0131b3f042 |
files | lib/quotearg.c |
diffstat | 1 files changed, 13 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/quotearg.c +++ b/lib/quotearg.c @@ -58,17 +58,23 @@ # include <string.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 mbrtowc(pwc, s, n, ps) 1 +# define mbsinit(ps) 1 +# define mbstate_t int +#endif + #if HAVE_WCTYPE_H # include <wctype.h> #endif - -#if HAVE_MBRTOWC && HAVE_WCHAR_H -# include <wchar.h> -#else +#if !defined iswprint && !HAVE_ISWPRINT # define iswprint(wc) 1 -# define mbrtowc(pwc, s, n, ps) 1 -# define mbsinit(ps) 1 -# define mbstate_t int #endif #define INT_BITS (sizeof (int) * CHAR_BIT)