X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2F_PDCLIB%2Fprepread.c;h=cf1c2dfe53b7948d0b68619021fd72a6062b9569;hb=da7af311e101d691c9e7020495d01948c7611296;hp=9111ff49b9eaf0a7309d932acd216aecc2e781a3;hpb=8cfc7f73e7baec32630b9cf55582febd41b8a684;p=pdclib.old diff --git a/functions/_PDCLIB/prepread.c b/functions/_PDCLIB/prepread.c index 9111ff4..cf1c2df 100644 --- a/functions/_PDCLIB/prepread.c +++ b/functions/_PDCLIB/prepread.c @@ -7,8 +7,9 @@ */ #include +#include -#define _PDCLIB_GLUE_H _PDCLIB_GLUE_H +#ifndef REGTEST #include <_PDCLIB_glue.h> int _PDCLIB_prepread( struct _PDCLIB_file_t * stream ) @@ -21,7 +22,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; } @@ -35,6 +36,7 @@ int _PDCLIB_prepread( struct _PDCLIB_file_t * stream ) return 0; } } +#endif #ifdef TEST #include <_PDCLIB_test.h>