mlibc: GNU Gcc support: ferror.
* lib/libc-mes+tcc.c (ferror): New function. * include/stdio.h (ferror): Declare it.
This commit is contained in:
parent
7ab279bf7b
commit
83f2a55c2c
|
@ -101,6 +101,7 @@ int fclose (FILE *stream);
|
|||
FILE *fdopen (int fd, char const *mode);
|
||||
int fflush (FILE *stream);
|
||||
FILE *fopen (char const *pathname, char const *mode);
|
||||
int ferror (FILE *stream);
|
||||
int fprintf (FILE *stream, char const *format, ...);
|
||||
int fdputc (int c, int fd);
|
||||
int fputc (int c, int fd);
|
||||
|
|
|
@ -108,6 +108,14 @@ fdopen (int fd, char const *mode)
|
|||
return (FILE*)fd;
|
||||
}
|
||||
|
||||
int
|
||||
ferror (FILE *stream)
|
||||
{
|
||||
int fd = (int)stream;
|
||||
if (fd == -1) return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
fflush (FILE *stream)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue