I doesn't matter much, but its better practice to make critical sections
as small as possible.
# else
- MBTOWC_LOCK_;
SETERRNO(0, 0);
+ MBTOWC_LOCK_;
retval = mbtowc(NULL, NULL, 0);
MBTOWC_UNLOCK_;
return retval;
/* Locking prevents races, but locales can be switched out without locking,
* so this isn't a cure all */
- MBTOWC_LOCK_;
SETERRNO(0, 0);
+ MBTOWC_LOCK_;
retval = mbtowc((wchar_t *) pwc, s, len);
MBTOWC_UNLOCK_;