$OpenBSD: patch-unicode_h,v 1.1.1.1 2002/12/19 01:19:52 margarida Exp $ --- unicode.h.orig Mon Dec 16 17:25:34 2002 +++ unicode.h Mon Dec 16 17:25:45 2002 @@ -26,6 +26,15 @@ extern "C" #endif #include /* For size_t */ +#include /* For ssize_t */ + +/* We need the error codes so we can see if EILSEQ exists. */ +#include + +#ifndef EILSEQ +/* On some systems, like SunOS and NetBSD, EILSEQ is not defined. */ +# define EILSEQ -2323 +#endif /* FIXME: assumes 32-bit int. */ typedef unsigned int unicode_char_t; @@ -187,7 +196,7 @@ int unicode_iconv_close (unicode_iconv_t Otherwise returns number of conversions performed; this can be 0. Note that on some systems EILSEQ (a possible error code) is not defined. On such systems we use EBADMSG instead. */ -size_t unicode_iconv (unicode_iconv_t cd, +ssize_t unicode_iconv (unicode_iconv_t cd, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft);