summaryrefslogtreecommitdiff
path: root/perlsdio.h
diff options
context:
space:
mode:
authorChip Salzenberg <chip@perl.com>1997-04-04 00:00:00 +0000
committerChip Salzenberg <chip@atlantic.net>1997-04-04 00:00:00 +0000
commit5b54f415353cb889898fb25391f5dff73990f3f2 (patch)
tree2b6fbc8bff228306078eb9f0fdd003a1ba244170 /perlsdio.h
parente43cfa93c2ef6ac50be4121f06de5f795aa3fa62 (diff)
downloadperl-5b54f415353cb889898fb25391f5dff73990f3f2.tar.gz
Use SSize_t for values of PerlIO_{read,write}
Diffstat (limited to 'perlsdio.h')
-rw-r--r--perlsdio.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/perlsdio.h b/perlsdio.h
index 97add0f991..8bb50515bd 100644
--- a/perlsdio.h
+++ b/perlsdio.h
@@ -39,12 +39,14 @@
* 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)