Usermode/libc - Fixes and additions from curl
[tpg/acess2.git] / Usermode / Libraries / libc.so_src / stdio.c
index 1bb90cd..7969f4c 100644 (file)
@@ -374,22 +374,23 @@ int _fflush_int(FILE *fp)
        return ret;\r
 }\r
 \r
-EXPORT void fflush(FILE *fp)\r
+EXPORT int fflush(FILE *fp)\r
 {\r
        if( !fp || fp->FD == FD_NOTOPEN )\r
-               return ;\r
+               return EBADF;\r
        \r
        // Nothing to do for memory files\r
        if( fp->FD == FD_MEMFILE )\r
-               return ;\r
+               return 0;\r
        // Memory streams, update pointers\r
        if( fp->FD == FD_MEMSTREAM ) {\r
                *fp->BufPtr = fp->Buffer;\r
                *fp->LenPtr = fp->BufferPos;\r
-               return ;\r
+               return 0;\r
        }\r
        \r
        _fflush_int(fp);\r
+       return 0;\r
 }\r
 \r
 EXPORT void clearerr(FILE *fp)\r

UCC git Repository :: git.ucc.asn.au