}
#undef PerlIO_read
-int
+SSize_t
PerlIO_read(f,buf,count)
PerlIO *f;
void *buf;
-size_t count;
+Size_t count;
{
return fread(buf,1,count,f);
}
#undef PerlIO_write
-int
+SSize_t
PerlIO_write(f,buf,count)
PerlIO *f;
const void *buf;
-size_t count;
+Size_t count;
{
return fwrite1(buf,1,count,f);
}
extern void PerlIO_releaseFILE _((PerlIO *,FILE *));
#endif
#ifndef PerlIO_read
-extern int PerlIO_read _((PerlIO *,void *,size_t));
+extern SSize_t PerlIO_read _((PerlIO *,void *,Size_t));
#endif
#ifndef PerlIO_write
-extern int PerlIO_write _((PerlIO *,const void *,size_t));
+extern SSize_t PerlIO_write _((PerlIO *,const void *,Size_t));
#endif
#ifndef PerlIO_setlinebuf
extern void PerlIO_setlinebuf _((PerlIO *));
* VAXCRTL which causes read from a pipe after EOF has been returned
* once to hang.
*/
-# define PerlIO_getc(f) (feof(f) ? EOF : getc(f))
-# define PerlIO_read(f,buf,count) (feof(f) ? 0 : fread(buf,1,count,f))
+# define PerlIO_getc(f) \
+ (feof(f) ? EOF : getc(f))
+# define PerlIO_read(f,buf,count) \
+ (feof(f) ? 0 : (SSize_t)fread(buf,1,count,f))
#else
# define PerlIO_ungetc(f,c) ungetc(c,f)
# define PerlIO_getc(f) getc(f)
-# define PerlIO_read(f,buf,count) fread(buf,1,count,f)
+# define PerlIO_read(f,buf,count) (SSize_t)fread(buf,1,count,f)
#endif
#define PerlIO_eof(f) feof(f)
#define PerlIO_getname(f,b) fgetname(f,b)