File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -230,13 +230,28 @@ int putchar(int c)
230230 return _native_write (STDOUT_FILENO , & tmp , sizeof (tmp ));
231231}
232232
233+ int fputc (int c , FILE * fp )
234+ {
235+ char tmp = c ;
236+ return _native_write (fileno (fp ), & tmp , sizeof (tmp ));
237+ }
238+
233239int puts (const char * s )
234240{
235241 int r ;
236- r = _native_write (STDOUT_FILENO , ( char * ) s , strlen (s ));
242+ r = _native_write (STDOUT_FILENO , s , strlen (s ));
237243 putchar ('\n' );
238244 return r ;
239245}
246+ int fputs (const char * s , FILE * fp )
247+ {
248+ return _native_write (fileno (fp ), s , strlen (s ));
249+ }
250+
251+ size_t fwrite (const void * ptr , size_t size , size_t nmemb , FILE * fp )
252+ {
253+ return _native_write (fileno (fp ), ptr , size * nmemb );
254+ }
240255#endif
241256
242257int putc (int c , FILE * fp )
You can’t perform that action at this time.
0 commit comments