summaryrefslogtreecommitdiff
path: root/perlsdio.h
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-11-21 17:01:16 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-11-21 17:01:16 +0000
commitb12708f2300ffdfbb96353c6fa9299115f37f659 (patch)
treee9437eadb587a5acdf4c3963eb128d2dc2fdc970 /perlsdio.h
parentca3a88231d4355080a1a1843b6728024ff9c3888 (diff)
downloadperl-b12708f2300ffdfbb96353c6fa9299115f37f659.tar.gz
Export the SOCKS workaround symbols only if necessary.
p4raw-id: //depot/perl@7791
Diffstat (limited to 'perlsdio.h')
-rw-r--r--perlsdio.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/perlsdio.h b/perlsdio.h
index 9e668f6184..1eb10d3abc 100644
--- a/perlsdio.h
+++ b/perlsdio.h
@@ -48,12 +48,14 @@
#else
# ifdef SOCKS_64BIT_BUG
# define PerlIO_getc(f) Perl_do_s64_getc(f)
-# define PerlIO_ungetc(f,c) Perl_do_s64_ungetc(c,f)
+# define PerlIO_ungetc(f,c) Perl_do_s64_ungetc(c,f)
# define PerlIO_read(f,buf,count) Perl_do_s64_fread(buf,count,f)
+# define PerlIO_tell(f) Perl_do_s64_tell(f)
# else
# define PerlIO_getc(f) getc(f)
# define PerlIO_ungetc(f,c) ungetc(c,f)
# define PerlIO_read(f,buf,count) (SSize_t)fread(buf,1,count,f)
+# define PerlIO_tell(f) ftell(f)
# endif /* SOCKS_64BIT_BUG */
#endif
#define PerlIO_eof(f) feof(f)
@@ -63,16 +65,11 @@
#define PerlIO_clearerr(f) clearerr(f)
#define PerlIO_flush(f) Fflush(f)
#ifdef SOCKS_64BIT_BUG
-# define PerlIO_tell(f) Perl_do_s64_tell(f)
+# define PerlIO_seek(f,o,w) Perl_do_s64_seek(f,o,w)
#else
-# define PerlIO_tell(f) ftell(f)
-#endif
-#if defined(VMS) && !defined(__DECC)
+# if defined(VMS) && !defined(__DECC)
/* Old VAXC RTL doesn't reset EOF on seek; Perl folk seem to expect this */
# define PerlIO_seek(f,o,w) (((f) && (*f) && ((*f)->_flag &= ~_IOEOF)),fseek(f,o,w))
-#else
-# ifdef SOCKS_64BIT_BUG
-# define PerlIO_seek(f,o,w) Perl_do_s64_seek(f,o,w)
# else
# define PerlIO_seek(f,o,w) fseek(f,o,w)
# endif