summaryrefslogtreecommitdiffstats
path: root/toolchain/uClibc/patches-0.9.33.2/350-use-fputs_unlocked.patch
blob: 58b03ec7d96578a814701d23842e1cdea6f68855 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
commit 3e3ae40f053b22fbb9bef50067d6edad4c358c4c
Author: Mirko Vogt <dev@nanl.de>
Date:   Tue May 24 14:36:42 2011 +0200

    use 'fputws_unlocked(S,F)' instead of 'fputws(S,F)'
    
    this eliminates a source of reproduceable freezes

--- a/libc/stdio/_vfprintf.c
+++ b/libc/stdio/_vfprintf.c
@@ -1229,7 +1229,7 @@ static size_t _fp_out_narrow(FILE *fp, i
 #define STRLEN  wcslen
 #define _PPFS_init _ppwfs_init
 /* Pulls in fseek: */
-#define OUTPUT(F,S)			fputws(S,F)
+#define OUTPUT(F,S)			fputws_unlocked(S,F)
 /* TODO: #define OUTPUT(F,S)		_wstdio_fwrite((S),wcslen(S),(F)) */
 #define _outnwcs(stream, wstring, len)	_wstdio_fwrite((const wchar_t *)(wstring), len, stream)
 #define FP_OUT _fp_out_wide