/* GCC optimizes memset(s, 0, n) but not bzero(s, n).
The optimization is broken before EGCS 1.1. */
-# if __GNUC_PREREQ (2, 91)
+# if defined __GNUC__ \
+ && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 90))
# define __bzero(s, n) __builtin_memset (s, '\0', n)
# endif
/* Count the number of bytes. */
result += data.__outbuf - buf;
}
- while (status == __GCONV_FULL_OUTPUT);
+ while (status == GCONV_FULL_OUTPUT);
- if (status == __GCONV_OK || status == __GCONV_EMPTY_INPUT)
+ if (status == GCONV_OK || status == GCONV_EMPTY_INPUT)
{
/* There better should be a NUL byte at the end. */
assert (data.__outbuf[-1] == '\0');
/* We have to determine whether the last character converted
is the NUL character. */
- if ((status == __GCONV_OK || status == __GCONV_EMPTY_INPUT
- || status == __GCONV_FULL_OUTPUT)
+ if ((status == GCONV_OK || status == GCONV_EMPTY_INPUT
+ || status == GCONV_FULL_OUTPUT)
&& data.__outbuf[-1] == '\0')
{
assert (data.__outbuf != (unsigned char *) dst);
/* There must not be any problems with the conversion but illegal input
characters. */
- assert (status == __GCONV_OK || status == __GCONV_EMPTY_INPUT
- || status == __GCONV_ILLEGAL_INPUT
- || status == __GCONV_INCOMPLETE_INPUT
- || status == __GCONV_FULL_OUTPUT);
+ assert (status == GCONV_OK || status == GCONV_EMPTY_INPUT
+ || status == GCONV_ILLEGAL_INPUT
+ || status == GCONV_INCOMPLETE_INPUT
+ || status == GCONV_FULL_OUTPUT);
- if (status != __GCONV_OK && status != __GCONV_FULL_OUTPUT
- && status != __GCONV_EMPTY_INPUT)
+ if (status != GCONV_OK && status != GCONV_FULL_OUTPUT
+ && status != GCONV_EMPTY_INPUT)
{
result = (size_t) -1;
__set_errno (EILSEQ);
(const unsigned char *) &inbuf[1],
&dummy, 0);
/* The conversion failed or the output is too long. */
- if ((status != __GCONV_OK && status != __GCONV_FULL_OUTPUT
- && status != __GCONV_EMPTY_INPUT)
+ if ((status != GCONV_OK && status != GCONV_FULL_OUTPUT
+ && status != GCONV_EMPTY_INPUT)
|| data.__outbuf != (unsigned char *) (buf + 1))
return EOF;