X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=lib%2Funicodeio.c;h=a1db6e282dd8828f5f79b8355dbb39abd7d1291f;hb=fb1c65e512181db1c43c19c708a8e1c795cbd31c;hp=35bb68075ccdf69c8896157f2138bea7977305e9;hpb=1ad624bbbc38cb07899152df9eafb7f5adde71b5;p=chaz%2Ftar diff --git a/lib/unicodeio.c b/lib/unicodeio.c index 35bb680..a1db6e2 100644 --- a/lib/unicodeio.c +++ b/lib/unicodeio.c @@ -38,22 +38,13 @@ extern int errno; #endif -/* Define EILSEQ and ENOTSUP as portably as possible. Some - nonstandard systems, like SunOS 4, don't have EILSEQ. Others, like - BSD/OS 4.1, define it in . Callers that use EILSEQ and/or - ENOTSUP and that want to be portable to these nonstandard systems - should mimic the following includes and defines. */ - -/* BSD/OS 4.1 wchar.h defines EILSEQ, but it requires FILE (defined in - , included above) and struct tm (defined in ) to - be declared. */ -#if HAVE_WCHAR_H && ! defined EILSEQ -# include -# include +#if HAVE_ICONV +# include #endif -/* Do not define EILSEQ to be EINVAL, since callers may want to - distinguish EINVAL and EILSEQ. */ +/* Some systems, like SunOS 4, don't have EILSEQ. On these systems, + define EILSEQ to some value other than EINVAL, because our invokers + may want to distinguish EINVAL from EILSEQ. */ #ifndef EILSEQ # define EILSEQ ENOENT #endif @@ -61,10 +52,6 @@ extern int errno; # define ENOTSUP EINVAL #endif -#if HAVE_ICONV -# include -#endif - #if HAVE_LANGINFO_CODESET && ! USE_INCLUDED_LIBINTL # include #endif