]> 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 9111ff49b9eaf0a7309d932acd216aecc2e781a3..6ce38d90d2779659b62b1700fe30a7dae4436cc9 100644 (file)
@@ -7,8 +7,8 @@
 */
 
 #include <stdio.h>
+#include <errno.h>
 
-#define _PDCLIB_GLUE_H _PDCLIB_GLUE_H
 #include <_PDCLIB_glue.h>
 
 int _PDCLIB_prepread( struct _PDCLIB_file_t * stream )
@@ -21,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;
     }