350-use-fputs_unlocked.patch 709 B

12345678910111213141516171819
  1. commit 3e3ae40f053b22fbb9bef50067d6edad4c358c4c
  2. Author: Mirko Vogt <dev@nanl.de>
  3. Date: Tue May 24 14:36:42 2011 +0200
  4. use 'fputws_unlocked(S,F)' instead of 'fputws(S,F)'
  5. this eliminates a source of reproduceable freezes
  6. --- a/libc/stdio/_vfprintf.c
  7. +++ b/libc/stdio/_vfprintf.c
  8. @@ -1229,7 +1229,7 @@ static size_t _fp_out_narrow(FILE *fp, i
  9. #define STRLEN wcslen
  10. #define _PPFS_init _ppwfs_init
  11. /* Pulls in fseek: */
  12. -#define OUTPUT(F,S) fputws(S,F)
  13. +#define OUTPUT(F,S) fputws_unlocked(S,F)
  14. /* TODO: #define OUTPUT(F,S) _wstdio_fwrite((S),wcslen(S),(F)) */
  15. #define _outnwcs(stream, wstring, len) _wstdio_fwrite((const wchar_t *)(wstring), len, stream)
  16. #define FP_OUT _fp_out_wide