(mbtowc): New static state variable. Use it instead of
__no_r_state.
* stdlib/wctomb.c (__no_r_state): Remove extern decl.
(__wctomb_state): New hidden variable.
(wctomb): Use __wctomb_state instead of __no_r_state.
* debug/wctomb_chk.c (__no_r_state): Remove extern decl.
(__wctomb_state): New extern decl.
(__wctomb_chk): Use __wctomb_state instead of __no_r_state.
2008-04-07 Jakub Jelinek <jakub@redhat.com>
* stdlib/mbtowc.c (__no_r_state): Remove.
(mbtowc): New static state variable. Use it instead of
__no_r_state.
* stdlib/wctomb.c (__no_r_state): Remove extern decl.
(__wctomb_state): New hidden variable.
(wctomb): Use __wctomb_state instead of __no_r_state.
* debug/wctomb_chk.c (__no_r_state): Remove extern decl.
(__wctomb_state): New extern decl.
(__wctomb_chk): Use __wctomb_state instead of __no_r_state.
* stdlib/stdlib.h: Include <bits/stdlib.h> if fortification is
requested.
* Makefile (headers): Add bits/stdlib.h.
* include/bits/stdlib.h: New file.
* debug/Depend: New file.
* debug/ptsname_r_chk.c: New file.
* debug/realpath_chk.c: New file.
* debug/wctomb_chk.c: New file.
* debug/Makefile (routines): Add ptsname_r_chk, realpath_chk, and
wctomb_chk.
* debug/Versions: Export __ptsname_r_chk, __realpath_chk, and
__wctomb_chk.
* debug/tst-chk1.c: Add tests for __ptsname_r_chk, __realpath_chk, and
__wctomb_chk.