]> pd.if.org Git - pdclib/blobdiff - functions/_PDCLIB/prepread.c
Import dlmalloc (public domain) as a malloc implementation. Add stub opt/notime
[pdclib] / functions / _PDCLIB / prepread.c
index d2288c7455d188e552c87c94410d47ca3059dd12..6ce38d90d2779659b62b1700fe30a7dae4436cc9 100644 (file)
@@ -7,6 +7,7 @@
 */
 
 #include <stdio.h>
+#include <errno.h>
 
 #include <_PDCLIB_glue.h>
 
@@ -20,7 +21,7 @@ int _PDCLIB_prepread( struct _PDCLIB_file_t * stream )
            See comments on implementation-defined errno values in
            <_PDCLIB_config.h>.
         */
-        _PDCLIB_errno = _PDCLIB_ERROR;
+        errno = EINVAL;
         stream->status |= _PDCLIB_ERRORFLAG;
         return EOF;
     }