]> pd.if.org Git - pdclib/blobdiff - functions/_PDCLIB/prepwrite.c
Import dlmalloc (public domain) as a malloc implementation. Add stub opt/notime
[pdclib] / functions / _PDCLIB / prepwrite.c
index 148e1c144c0bcec02e88220e136210ecc73f02cb..0b31529d5d74693e40c97010d8d946acb549cbf8 100644 (file)
@@ -7,6 +7,7 @@
 */
 
 #include <stdio.h>
+#include <errno.h>
 
 int _PDCLIB_prepwrite( struct _PDCLIB_file_t * stream )
 {
@@ -18,7 +19,7 @@ int _PDCLIB_prepwrite( struct _PDCLIB_file_t * stream )
            See the comments on implementation-defined errno values in
            <_PDCLIB_config.h>.
         */
-        _PDCLIB_errno = _PDCLIB_ERROR;
+        errno = EINVAL;
         stream->status |= _PDCLIB_ERRORFLAG;
         return EOF;
     }