* libc/include/sys/reent.h (_REENT_INIT_PTR): New macro for
initializing a struct _reent that has been dynamically allocated.
(_REENT_CHECK_MISC): New macro that checks _misc struct for
_REENT_SMALL and does nothing otherwise.
(_REENT_STRTOK_LAST): New macro for reentrant strtok.
(_REENT_MBLEN_STATE): New macro for reentrant mblen.
(_REENT_MBTOWC_STATE): New macro for reentrant mbtowc.
(_REENT_WCTOMB_STATE): New macro for reentrant wctomb.
[_REENT_SMALL](struct _misc_reent): New structure containing
miscellaneous reentrant areas needed by newlib.
[_REENT_SMALL](struct _reent): Add _misc pointer.
[_REENT_SMALL](_REENT_INIT_MISC): New macro.
* libc/string/strtok (strtok): Change to use _REENT_CHECK_MISC
and _REENT_STRTOK_LAST macros.
* libc/stdlib/mblen (mblen): Change to use _REENT_CHECK_MISC
and _REENT_MBLEN_STATE macros.
* libc/stdlib/mbtowc (mbtowc): Change to use _REENT_CHECK_MISC
and _REENT_MBTOWC_STATE macros.
* libc/stdlib/wctomb (wctomb): Change to use _REENT_CHECK_MISC
and _REENT_WCTOMB_STATE macros.
* libc/include/string.h: Don't include <sys/types.h>,
as it causes really bad namespace pollution. Don't declare
swab(), it is properly declared in unistd.h.
* libc/stdio/stdio.c (__swrite): declare "oldmode" only if it's
used later (ifdef __SCLE)
* libc/stdio/vfscanf.c (__svfscanf): declare "state" only if it's
used later (ifdef MB_CAPABLE)
* libc/string/memset.c (memset): removed unused variables "count"
and "unaligned_addr"
* libc/locale/locale.c (_setlocale_r): declare "lc_ctype" and
"last_lc_ctype" only of they're used later (ifdef MB_CAPABLE)
* libc/unix/getpwent.c (getpwnam): removed unused variables "uid"
and "gid"
* libc/include/string.h: Changed last argument back to ssize_t
to make it compatible with XPG4 definition which is
defined in <unistd.h>. There is a conflict in the SVID 3
and XPG4 definitions and newlib will settle with XPG4.
* libc/string/swab.c: Ditto.