X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/cea2e8a9dd23747fd2b66edc86c58c64e9970321..ffb4440d02d1e8964757828cffb3de1e6f18ad0b:/perlsfio.h diff --git a/perlsfio.h b/perlsfio.h index d6731e4..d0f6471 100644 --- a/perlsfio.h +++ b/perlsfio.h @@ -3,6 +3,11 @@ #include #endif +/* sfio 2000 changed _stdopen to _stdfdopen */ +#if SFIO_VERSION >= 20000101L +#define _stdopen _stdfdopen +#endif + extern Sfio_t* _stdopen _ARG_((int, const char*)); extern int _stdprintf _ARG_((const char*, ...)); @@ -18,6 +23,7 @@ extern int _stdprintf _ARG_((const char*, ...)); #define PerlIO_write(f,buf,count) sfwrite(f,buf,count) #define PerlIO_open(path,mode) sfopen(NULL,path,mode) #define PerlIO_fdopen(fd,mode) _stdopen(fd,mode) +#define PerlIO_reopen(path,mode,f) sfopen(f,path,mode) #define PerlIO_close(f) sfclose(f) #define PerlIO_puts(f,s) sfputr(f,s,-1) #define PerlIO_putc(f,c) sfputc(f,c) @@ -48,7 +54,7 @@ extern int _stdprintf _ARG_((const char*, ...)); #define PerlIO_get_cnt(f) ((f)->endr - (f)->next) #define PerlIO_canset_cnt(f) 1 #define PerlIO_fast_gets(f) 1 -#define PerlIO_set_ptrcnt(f,p,c) ((f)->next = (p)) +#define PerlIO_set_ptrcnt(f,p,c) ((f)->next = (unsigned char *)(p)) #define PerlIO_set_cnt(f,c) 1 #define PerlIO_has_base(f) 1