X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=perlsdio.h;h=7afda6819198418cab7d11d1d7c8b076a608f166;hb=cb64dba4c7358c2e02c1ac7a571173423f71980f;hp=5a15a719ca76bf1a921c0468f0f233eba4bbdcc3;hpb=324aa91a3e6fd44523a86df7c5575563c5adf45c;p=p5sagit%2Fp5-mst-13.2.git diff --git a/perlsdio.h b/perlsdio.h index 5a15a71..7afda68 100644 --- a/perlsdio.h +++ b/perlsdio.h @@ -55,7 +55,18 @@ #define PerlIO_clearerr(f) clearerr(f) #define PerlIO_flush(f) Fflush(f) #define PerlIO_tell(f) ftell(f) -#define PerlIO_seek(f,o,w) fseek(f,o,w) +#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 @@ -232,7 +243,9 @@ #undef fopen #undef vfprintf #undef fgetc +#undef getc_unlocked #undef fputc +#undef putc_unlocked #undef fputs #undef ungetc #undef fread @@ -265,8 +278,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