]> pd.if.org Git - pdclib/blobdiff - functions/stdio/fclose.c
Import dlmalloc (public domain) as a malloc implementation. Add stub opt/notime
[pdclib] / functions / stdio / fclose.c
index 81b57c49a4b0c281c195596f9cda94fe7f42e326..113845b83211294ff9cfa23d332bdf7bb4ef038a 100644 (file)
@@ -8,6 +8,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <errno.h>
 
 #ifndef REGTEST
 #include <_PDCLIB_glue.h>
@@ -58,10 +59,8 @@ int fclose( struct _PDCLIB_file_t * stream )
         previous = current;
         current = current->next;
     }
-    /* See the comments on implementation-defined errno values in
-       <_PDCLIB_config.h>.
-    */
-    _PDCLIB_errno = _PDCLIB_ERROR;
+
+    errno = EINVAL;
     return -1;
 }