X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=perlio.h;h=3105b5879723766b22259b8710f783429367e154;hb=413c4af61642c148a716a68d14bb8cc3c5573f63;hp=4b7ec88752b2c9f6751a65ae360c39cbf382f017;hpb=14a5cf38cb6bde23aa6e81a63d9807561599a360;p=p5sagit%2Fp5-mst-13.2.git diff --git a/perlio.h b/perlio.h index 4b7ec88..3105b58 100644 --- a/perlio.h +++ b/perlio.h @@ -1,3 +1,12 @@ +/* perlio.h + * + * Copyright (c) 1997-2002, Larry Wall + * + * You may distribute under the terms of either the GNU General Public + * License or the Artistic License, as specified in the README file. + * + */ + #ifndef _PERLIO_H #define _PERLIO_H /* @@ -54,6 +63,11 @@ */ #include +#ifdef __BEOS__ +int fseeko(FILE *stream, off_t offset, int whence); +off_t ftello(FILE *stream); +#endif + #if defined(USE_64_BIT_STDIO) && defined(HAS_FTELLO) && !defined(USE_FTELL64) #define ftell ftello #endif @@ -93,6 +107,7 @@ extern PerlIO_funcs *PerlIO_find_layer(pTHX_ const char *name, STRLEN len, extern PerlIO *PerlIO_push(pTHX_ PerlIO *f, PerlIO_funcs *tab, const char *mode, SV *arg); extern void PerlIO_pop(pTHX_ PerlIO *f); +extern void PerlIO_clone(pTHX_ PerlInterpreter *proto, CLONE_PARAMS *param); #endif /* PerlIO */ @@ -143,7 +158,7 @@ extern void PerlIO_pop(pTHX_ PerlIO *f); #endif /* ifndef PERLIO_NOT_STDIO */ #endif /* PERLIO_IS_STDIO */ -#define specialCopIO(sv) ((sv) != Nullsv) +#define specialCopIO(sv) ((sv) == Nullsv) /* ----------- fill in things that have not got #define'd ---------- */ @@ -172,6 +187,9 @@ extern void PerlIO_pop(pTHX_ PerlIO *f); #define SEEK_END 2 #endif +#define PERLIO_DUP_CLONE 1 +#define PERLIO_DUP_FD 2 + /* --------------------- Now prototypes for functions --------------- */ START_EXTERN_C @@ -184,7 +202,7 @@ START_EXTERN_C #endif #endif #ifndef PerlIO_init -extern void PerlIO_init(void); +extern void PerlIO_init(pTHX); #endif #ifndef PerlIO_stdoutf extern int PerlIO_stdoutf(const char *, ...) @@ -201,9 +219,6 @@ extern PerlIO *PerlIO_openn(pTHX_ const char *layers, const char *mode, int fd, int imode, int perm, PerlIO *old, int narg, SV **arg); #endif -#ifndef PerlIO_close -extern int PerlIO_close(PerlIO *); -#endif #ifndef PerlIO_eof extern int PerlIO_eof(PerlIO *); #endif @@ -219,15 +234,9 @@ extern int PerlIO_getc(PerlIO *); #ifndef PerlIO_putc extern int PerlIO_putc(PerlIO *, int); #endif -#ifndef PerlIO_flush -extern int PerlIO_flush(PerlIO *); -#endif #ifndef PerlIO_ungetc extern int PerlIO_ungetc(PerlIO *, int); #endif -#ifndef PerlIO_fileno -extern int PerlIO_fileno(PerlIO *); -#endif #ifndef PerlIO_fdopen extern PerlIO *PerlIO_fdopen(int, const char *); #endif @@ -324,7 +333,7 @@ extern int PerlIO_getpos(PerlIO *, SV *); extern int PerlIO_setpos(PerlIO *, SV *); #endif #ifndef PerlIO_fdupopen -extern PerlIO *PerlIO_fdupopen(pTHX_ PerlIO *); +extern PerlIO *PerlIO_fdupopen(pTHX_ PerlIO *, CLONE_PARAMS *, int); #endif #if !defined(PerlIO_modestr) && !defined(PERLIO_IS_STDIO) extern char *PerlIO_modestr(PerlIO *, char *buf); @@ -346,11 +355,14 @@ extern char *PerlIO_getname(PerlIO *, char *); extern void PerlIO_destruct(pTHX); -#ifndef PERLIO_IS_STDIO +extern int PerlIO_intmode2str(int rawmode, char *mode, int *writing); -extern void PerlIO_cleanup(void); +#ifdef PERLIO_LAYERS +extern void PerlIO_cleanup(pTHX); extern void PerlIO_debug(const char *fmt, ...); +typedef struct PerlIO_list_s PerlIO_list_t; + #endif