X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=perlsdio.h;h=c4a1179a41aa617e6eb6df96f8203f8455e5a33b;hb=aaa51d5e11b8b0db616a7f939c784733b4cfef87;hp=a539a0a3d9f36c5427334b5ab8f89950bdbb2eae;hpb=17f28c40fa08b585b95d4a2531b1cd975d11e986;p=p5sagit%2Fp5-mst-13.2.git diff --git a/perlsdio.h b/perlsdio.h index a539a0a..c4a1179 100644 --- a/perlsdio.h +++ b/perlsdio.h @@ -55,12 +55,18 @@ #define PerlIO_clearerr(f) clearerr(f) #define PerlIO_flush(f) Fflush(f) #define PerlIO_tell(f) ftell(f) +#if defined(USE_64_BIT_STDIO) && defined(HAS_FTELLO) && !defined(USE_FTELL64) +#define ftell ftello +#endif #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 # define PerlIO_seek(f,o,w) fseek(f,o,w) #endif +#if defined(USE_64_BIT_STDIO) && defined(HAS_FSEEKO) && !defined(USE_FSEEK64) +#define fseek fseeko +#endif #ifdef HAS_FGETPOS #define PerlIO_getpos(f,p) fgetpos(f,p) #endif @@ -207,9 +213,11 @@ #define _flsbuf(c,f) _CANNOT _flsbuf_ #define fdopen(fd,p) _CANNOT _fdopen_ #define fileno(f) _CANNOT _fileno_ +#if SFIO_VERSION < 20000101L #define flockfile(f) _CANNOT _flockfile_ #define ftrylockfile(f) _CANNOT _ftrylockfile_ #define funlockfile(f) _CANNOT _funlockfile_ +#endif #define getc_unlocked(f) _CANNOT _getc_unlocked_ #define putc_unlocked(c,f) _CANNOT _putc_unlocked_ #define popen(c,m) _CANNOT _popen_ @@ -272,8 +280,14 @@ #define fputc(c,f) PerlIO_putc(f,c) #define fputs(s,f) PerlIO_puts(f,s) #define getc(f) PerlIO_getc(f) +#ifdef getc_unlocked +#undef getc_unlocked +#endif #define getc_unlocked(f) PerlIO_getc(f) #define putc(c,f) PerlIO_putc(f,c) +#ifdef putc_unlocked +#undef putc_unlocked +#endif #define putc_unlocked(c,f) PerlIO_putc(c,f) #define ungetc(c,f) PerlIO_ungetc(f,c) #if 0 @@ -303,9 +317,11 @@ #define _flsbuf(c,f) _CANNOT _flsbuf_ #define getw(f) _CANNOT _getw_ #define putw(v,f) _CANNOT _putw_ +#if SFIO_VERSION < 20000101L #define flockfile(f) _CANNOT _flockfile_ #define ftrylockfile(f) _CANNOT _ftrylockfile_ #define funlockfile(f) _CANNOT _funlockfile_ +#endif #define freopen(p,m,f) _CANNOT _freopen_ #define setbuf(f,b) _CANNOT _setbuf_ #define setvbuf(f,b,x,s) _CANNOT _setvbuf_