Age | Commit message (Collapse) | Author |
|
The putc macro is specified as returning an int, but our
type conversion rules turned it into a uint. Put in the
appropriate cast to make the type what we want.
|
|
Masking with _IO_CHMASK after the assignment causes a warning.
We're better off masking before, but casting the assignment to
prevent sign extension.
|
|
When calling putc, we need to return either EOF
or the character returned. To distinguish the
two, we need to avoid sign extending 0xff. The
code attempted to do this, but the order of
operations was wrong, so we ended up masking,
setting a character, and then sign extending
the character.
This fixes things so we mask after assignment.
|
|
It's been 20 years since c99 came out. By now, if code
hasn't been fixed, it's not going to be. Requiring this
define just confuses porters.
|
|
moving _IO_CHMASK masking on the right hand side fixes it.
|
|
|
|
|