diff options
author | Perl 5 Porters <perl5-porters@africa.nicoh.com> | 1996-09-07 03:11:14 +0000 |
---|---|---|
committer | Andy Dougherty <doughera@lafcol.lafayette.edu> | 1996-09-07 03:11:14 +0000 |
commit | c7ae39e52c720f8479971d43d75d9d3689d93064 (patch) | |
tree | f7cffd1a3c8e9c1d3e8dfa885340081d1c1ff4ee /perlsdio.h | |
parent | 8c86a92082b8351484629c697bc26f3f48bf767e (diff) | |
download | perl-c7ae39e52c720f8479971d43d75d9d3689d93064.tar.gz |
perl 5.003_05: perlsdio.h
Don't supply redundant parameters for PerlIO_open and PerlIO_fdopen.
Include PerlIO_reopen and PerlIO_getname.
s/FILE_(CNT|PTR)_LVALUE/STDIO_(CNT|PTR)_LVALUE to fix a typo.
This had prevented SV_FAST_FGETS from working anywhere.
Include PerlIO_canset_cnt. I'm not sure how this is supposed to
differ from STDIO_CNT_LVALUE.
Diffstat (limited to 'perlsdio.h')
-rw-r--r-- | perlsdio.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/perlsdio.h b/perlsdio.h index 082d96d561..ff32cdd8e2 100644 --- a/perlsdio.h +++ b/perlsdio.h @@ -18,14 +18,16 @@ #define PerlIO_vprintf(f,fmt,a) vfprintf(f,fmt,a) #define PerlIO_read(f,buf,count) fread(buf,1,count,f) #define PerlIO_write(f,buf,count) fwrite1(buf,1,count,f) -#define PerlIO_open(path,mode) fopen(path,mode) -#define PerlIO_fdopen(fd,mode) fdopen(fd,mode) +#define PerlIO_open fopen +#define PerlIO_fdopen fdopen +#define PerlIO_reopen freopen #define PerlIO_close(f) fclose(f) #define PerlIO_puts(f,s) fputs(s,f) #define PerlIO_putc(f,c) fputc(c,f) #define PerlIO_ungetc(f,c) ungetc(c,f) #define PerlIO_getc(f) getc(f) #define PerlIO_eof(f) feof(f) +#define PerlIO_getname(f,b) fgetname(f,b) #define PerlIO_error(f) ferror(f) #define PerlIO_fileno(f) fileno(f) #define PerlIO_clearerr(f) clearerr(f) @@ -60,9 +62,9 @@ #define PerlIO_get_ptr(f) FILE_ptr(f) #define PerlIO_get_cnt(f) FILE_cnt(f) -#ifdef FILE_CNT_LVALUE +#ifdef STDIO_CNT_LVALUE #define PerlIO_canset_cnt(f) 1 -#ifdef FILE_PTR_LVALUE +#ifdef STDIO_PTR_LVALUE #define PerlIO_fast_gets(f) 1 #endif #define PerlIO_set_cnt(f,c) (FILE_cnt(f) = (c)) @@ -71,7 +73,7 @@ #define PerlIO_set_cnt(f,c) abort() #endif -#ifdef FILE_PTR_LVALUE +#ifdef STDIO_PTR_LVALUE #define PerlIO_set_ptrcnt(f,p,c) (FILE_ptr(f) = (p), PerlIO_set_cnt(f,c)) #else #define PerlIO_set_ptrcnt(f,p,c) abort() @@ -80,6 +82,7 @@ #else /* USE_STDIO_PTR */ #define PerlIO_has_cntptr(f) 0 +#define PerlIO_canset_cnt(f) 0 #define PerlIO_get_cnt(f) (abort(),0) #define PerlIO_get_ptr(f) (abort(),0) #define PerlIO_set_cnt(f,c) abort() |