X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2F_PDCLIB%2Fprepread.c;h=cf1c2dfe53b7948d0b68619021fd72a6062b9569;hb=05556502a427911d4499c22b809ca7d366327d7c;hp=d2288c7455d188e552c87c94410d47ca3059dd12;hpb=b41576197133c1211d6ec353faf93f505f573b8a;p=pdclib diff --git a/functions/_PDCLIB/prepread.c b/functions/_PDCLIB/prepread.c index d2288c7..cf1c2df 100644 --- a/functions/_PDCLIB/prepread.c +++ b/functions/_PDCLIB/prepread.c @@ -7,7 +7,9 @@ */ #include +#include +#ifndef REGTEST #include <_PDCLIB_glue.h> int _PDCLIB_prepread( struct _PDCLIB_file_t * stream ) @@ -20,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; } @@ -34,6 +36,7 @@ int _PDCLIB_prepread( struct _PDCLIB_file_t * stream ) return 0; } } +#endif #ifdef TEST #include <_PDCLIB_test.h>