Rev 4874 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4874 | Rev 4921 | ||
---|---|---|---|
Line 81... | Line 81... | ||
81 | int ch _AND |
81 | int ch _AND |
82 | FILE * file) |
82 | FILE * file) |
83 | { |
83 | { |
84 | int result; |
84 | int result; |
85 | CHECK_INIT(ptr, file); |
85 | CHECK_INIT(ptr, file); |
86 | _flockfile (file); |
86 | _newlib_flockfile_start (file); |
87 | result = _putc_r (ptr, ch, file); |
87 | result = _putc_r (ptr, ch, file); |
88 | _funlockfile (file); |
88 | _newlib_flockfile_end (file); |
89 | return result; |
89 | return result; |
90 | } |
90 | } |
Line 91... | Line 91... | ||
91 | 91 | ||
92 | #ifndef _REENT_ONLY |
92 | #ifndef _REENT_ONLY |
Line 95... | Line 95... | ||
95 | int ch _AND |
95 | int ch _AND |
96 | FILE * file) |
96 | FILE * file) |
97 | { |
97 | { |
98 | #if !defined(__OPTIMIZE_SIZE__) && !defined(PREFER_SIZE_OVER_SPEED) |
98 | #if !defined(__OPTIMIZE_SIZE__) && !defined(PREFER_SIZE_OVER_SPEED) |
99 | int result; |
99 | int result; |
- | 100 | struct _reent *reent = _REENT; |
|
- | 101 | ||
100 | CHECK_INIT(_REENT, file); |
102 | CHECK_INIT(reent, file); |
101 | _flockfile (file); |
103 | _newlib_flockfile_start (file); |
102 | result = _putc_r (_REENT, ch, file); |
104 | result = _putc_r (reent, ch, file); |
103 | _funlockfile (file); |
105 | _newlib_flockfile_end (file); |
104 | return result; |
106 | return result; |
105 | #else |
107 | #else |
106 | return _fputc_r (_REENT, ch, file); |
108 | return _fputc_r (_REENT, ch, file); |
107 | #endif |
109 | #endif |
108 | } |
110 | } |