This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Upgrade experimental from version 0.015 to 0.016
[perl5.git]
/
perlio.h
diff --git
a/perlio.h
b/perlio.h
index
9398529
..
1a3d480
100644
(file)
--- a/
perlio.h
+++ b/
perlio.h
@@
-13,41
+13,23
@@
/*
Interface for perl to IO functions.
There is a hierarchy of Configure determined #define controls:
/*
Interface for perl to IO functions.
There is a hierarchy of Configure determined #define controls:
- USE_STDIO - forces PerlIO_xxx() to be #define-d onto stdio functions.
- This is used for conservative
- builds - "just like perl5.00X used to be".
- This dominates over the others.
+ USE_STDIO - No longer available via Configure. Formerly forced
+ PerlIO_xxx() to be #define-d onto stdio functions.
+ Now generates compile-time error.
USE_PERLIO - The primary Configure variable that enables PerlIO.
USE_PERLIO - The primary Configure variable that enables PerlIO.
- If USE_PERLIO is _NOT_ set
- then USE_STDIO above will be set to be conservative.
PerlIO_xxx() are real functions
defined in perlio.c which implement extra functionality
required for utf8 support.
PerlIO_xxx() are real functions
defined in perlio.c which implement extra functionality
required for utf8 support.
- One further note - the table-of-functions scheme controlled
- by PERL_IMPLICIT_SYS turns on USE_PERLIO so that iperlsys.h can
- #define PerlIO_xxx() to go via the function table, without having
- to #undef them from (say) stdio forms.
-
*/
*/
-#if defined(PERL_IMPLICIT_SYS)
-#ifndef USE_PERLIO
-#ifndef NETWARE
-/* # define USE_PERLIO */
-#endif
-#endif
-#endif
-
#ifndef USE_PERLIO
# define USE_STDIO
#endif
#ifdef USE_STDIO
#ifndef USE_PERLIO
# define USE_STDIO
#endif
#ifdef USE_STDIO
-# ifndef PERLIO_IS_STDIO
-# define PERLIO_IS_STDIO
-# endif
+# error "stdio is no longer supported as the default base layer -- use perlio."
#endif
/* -------------------- End of Configure controls ---------------------------- */
#endif
/* -------------------- End of Configure controls ---------------------------- */
@@
-71,11
+53,6
@@
#undef O_BINARY
#endif
#undef O_BINARY
#endif
-#ifdef PERLIO_IS_STDIO
-/* #define PerlIO_xxxx() as equivalent stdio function */
-#include "perlsdio.h"
-#endif /* PERLIO_IS_STDIO */
-
#ifndef PerlIO
/* ----------- PerlIO implementation ---------- */
/* PerlIO not #define-d to something else - define the implementation */
#ifndef PerlIO
/* ----------- PerlIO implementation ---------- */
/* PerlIO not #define-d to something else - define the implementation */
@@
-96,42
+73,39
@@
typedef PerlIOl *PerlIO;
#define PERLIO_FUNCS_CAST(funcs) (funcs)
#endif
#define PERLIO_FUNCS_CAST(funcs) (funcs)
#endif
-PERL_
EXPORT_C
void PerlIO_define_layer(pTHX_ PerlIO_funcs *tab);
-PERL_
EXPORT_C
PerlIO_funcs *PerlIO_find_layer(pTHX_ const char *name,
+PERL_
CALLCONV
void PerlIO_define_layer(pTHX_ PerlIO_funcs *tab);
+PERL_
CALLCONV
PerlIO_funcs *PerlIO_find_layer(pTHX_ const char *name,
STRLEN len,
int load);
STRLEN len,
int load);
-PERL_
EXPORT_C
PerlIO *PerlIO_push(pTHX_ PerlIO *f, PERLIO_FUNCS_DECL(*tab),
+PERL_
CALLCONV
PerlIO *PerlIO_push(pTHX_ PerlIO *f, PERLIO_FUNCS_DECL(*tab),
const char *mode, SV *arg);
const char *mode, SV *arg);
-PERL_
EXPORT_C
void PerlIO_pop(pTHX_ PerlIO *f);
-PERL_
EXPORT_C
AV* PerlIO_get_layers(pTHX_ PerlIO *f);
-PERL_
EXPORT_C
void PerlIO_clone(pTHX_ PerlInterpreter *proto,
+PERL_
CALLCONV
void PerlIO_pop(pTHX_ PerlIO *f);
+PERL_
CALLCONV
AV* PerlIO_get_layers(pTHX_ PerlIO *f);
+PERL_
CALLCONV
void PerlIO_clone(pTHX_ PerlInterpreter *proto,
CLONE_PARAMS *param);
#endif /* PerlIO */
/* ----------- End of implementation choices ---------- */
CLONE_PARAMS *param);
#endif /* PerlIO */
/* ----------- End of implementation choices ---------- */
-#ifndef PERLIO_IS_STDIO
-/* Not using stdio _directly_ as PerlIO */
-
/* We now need to determine what happens if source trys to use stdio.
* There are three cases based on PERLIO_NOT_STDIO which XS code
* can set how it wants.
*/
/* We now need to determine what happens if source trys to use stdio.
* There are three cases based on PERLIO_NOT_STDIO which XS code
* can set how it wants.
*/
-#
ifdef PERL_CORE
+#ifdef PERL_CORE
/* Make a choice for perl core code
- currently this is set to try and catch lingering raw stdio calls.
This is a known issue with some non UNIX ports which still use
"native" stdio features.
*/
/* Make a choice for perl core code
- currently this is set to try and catch lingering raw stdio calls.
This is a known issue with some non UNIX ports which still use
"native" stdio features.
*/
-#
ifndef PERLIO_NOT_STDIO
-#
define PERLIO_NOT_STDIO 1
-#
endif
-
#else
-#
ifndef PERLIO_NOT_STDIO
-#
define PERLIO_NOT_STDIO 0
-#
endif
+# ifndef PERLIO_NOT_STDIO
+# define PERLIO_NOT_STDIO 1
+# endif
+#else
+# ifndef PERLIO_NOT_STDIO
+# define PERLIO_NOT_STDIO 0
+# endif
#endif
#ifdef PERLIO_NOT_STDIO
#endif
#ifdef PERLIO_NOT_STDIO
@@
-154,7
+128,6
@@
PERL_EXPORT_C void PerlIO_clone(pTHX_ PerlInterpreter *proto,
*/
#include "fakesdio.h"
#endif /* ifndef PERLIO_NOT_STDIO */
*/
#include "fakesdio.h"
#endif /* ifndef PERLIO_NOT_STDIO */
-#endif /* PERLIO_IS_STDIO */
/* ----------- fill in things that have not got #define'd ---------- */
/* ----------- fill in things that have not got #define'd ---------- */
@@
-202,176
+175,169
@@
START_EXTERN_C
# endif
#endif
#ifndef PerlIO_init
# endif
#endif
#ifndef PerlIO_init
-PERL_
EXPORT_C
void PerlIO_init(pTHX);
+PERL_
CALLCONV
void PerlIO_init(pTHX);
#endif
#ifndef PerlIO_stdoutf
#endif
#ifndef PerlIO_stdoutf
-PERL_
EXPORT_C
int PerlIO_stdoutf(const char *, ...)
+PERL_
CALLCONV
int PerlIO_stdoutf(const char *, ...)
__attribute__format__(__printf__, 1, 2);
#endif
#ifndef PerlIO_puts
__attribute__format__(__printf__, 1, 2);
#endif
#ifndef PerlIO_puts
-PERL_
EXPORT_C
int PerlIO_puts(PerlIO *, const char *);
+PERL_
CALLCONV
int PerlIO_puts(PerlIO *, const char *);
#endif
#ifndef PerlIO_open
#endif
#ifndef PerlIO_open
-PERL_
EXPORT_C
PerlIO *PerlIO_open(const char *, const char *);
+PERL_
CALLCONV
PerlIO *PerlIO_open(const char *, const char *);
#endif
#ifndef PerlIO_openn
#endif
#ifndef PerlIO_openn
-PERL_
EXPORT_C
PerlIO *PerlIO_openn(pTHX_ const char *layers, const char *mode,
+PERL_
CALLCONV
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_eof
int fd, int imode, int perm, PerlIO *old,
int narg, SV **arg);
#endif
#ifndef PerlIO_eof
-PERL_
EXPORT_C
int PerlIO_eof(PerlIO *);
+PERL_
CALLCONV
int PerlIO_eof(PerlIO *);
#endif
#ifndef PerlIO_error
#endif
#ifndef PerlIO_error
-PERL_
EXPORT_C
int PerlIO_error(PerlIO *);
+PERL_
CALLCONV
int PerlIO_error(PerlIO *);
#endif
#ifndef PerlIO_clearerr
#endif
#ifndef PerlIO_clearerr
-PERL_
EXPORT_C
void PerlIO_clearerr(PerlIO *);
+PERL_
CALLCONV
void PerlIO_clearerr(PerlIO *);
#endif
#ifndef PerlIO_getc
#endif
#ifndef PerlIO_getc
-PERL_
EXPORT_C
int PerlIO_getc(PerlIO *);
+PERL_
CALLCONV
int PerlIO_getc(PerlIO *);
#endif
#ifndef PerlIO_putc
#endif
#ifndef PerlIO_putc
-PERL_
EXPORT_C
int PerlIO_putc(PerlIO *, int);
+PERL_
CALLCONV
int PerlIO_putc(PerlIO *, int);
#endif
#ifndef PerlIO_ungetc
#endif
#ifndef PerlIO_ungetc
-PERL_
EXPORT_C
int PerlIO_ungetc(PerlIO *, int);
+PERL_
CALLCONV
int PerlIO_ungetc(PerlIO *, int);
#endif
#ifndef PerlIO_fdopen
#endif
#ifndef PerlIO_fdopen
-PERL_
EXPORT_C
PerlIO *PerlIO_fdopen(int, const char *);
+PERL_
CALLCONV
PerlIO *PerlIO_fdopen(int, const char *);
#endif
#ifndef PerlIO_importFILE
#endif
#ifndef PerlIO_importFILE
-PERL_
EXPORT_C
PerlIO *PerlIO_importFILE(FILE *, const char *);
+PERL_
CALLCONV
PerlIO *PerlIO_importFILE(FILE *, const char *);
#endif
#ifndef PerlIO_exportFILE
#endif
#ifndef PerlIO_exportFILE
-PERL_
EXPORT_C
FILE *PerlIO_exportFILE(PerlIO *, const char *);
+PERL_
CALLCONV
FILE *PerlIO_exportFILE(PerlIO *, const char *);
#endif
#ifndef PerlIO_findFILE
#endif
#ifndef PerlIO_findFILE
-PERL_
EXPORT_C
FILE *PerlIO_findFILE(PerlIO *);
+PERL_
CALLCONV
FILE *PerlIO_findFILE(PerlIO *);
#endif
#ifndef PerlIO_releaseFILE
#endif
#ifndef PerlIO_releaseFILE
-PERL_
EXPORT_C
void PerlIO_releaseFILE(PerlIO *, FILE *);
+PERL_
CALLCONV
void PerlIO_releaseFILE(PerlIO *, FILE *);
#endif
#ifndef PerlIO_read
#endif
#ifndef PerlIO_read
-PERL_
EXPORT_C
SSize_t PerlIO_read(PerlIO *, void *, Size_t);
+PERL_
CALLCONV
SSize_t PerlIO_read(PerlIO *, void *, Size_t);
#endif
#ifndef PerlIO_unread
#endif
#ifndef PerlIO_unread
-PERL_
EXPORT_C
SSize_t PerlIO_unread(PerlIO *, const void *, Size_t);
+PERL_
CALLCONV
SSize_t PerlIO_unread(PerlIO *, const void *, Size_t);
#endif
#ifndef PerlIO_write
#endif
#ifndef PerlIO_write
-PERL_
EXPORT_C
SSize_t PerlIO_write(PerlIO *, const void *, Size_t);
+PERL_
CALLCONV
SSize_t PerlIO_write(PerlIO *, const void *, Size_t);
#endif
#ifndef PerlIO_setlinebuf
#endif
#ifndef PerlIO_setlinebuf
-PERL_
EXPORT_C
void PerlIO_setlinebuf(PerlIO *);
+PERL_
CALLCONV
void PerlIO_setlinebuf(PerlIO *);
#endif
#ifndef PerlIO_printf
#endif
#ifndef PerlIO_printf
-PERL_
EXPORT_C
int PerlIO_printf(PerlIO *, const char *, ...)
+PERL_
CALLCONV
int PerlIO_printf(PerlIO *, const char *, ...)
__attribute__format__(__printf__, 2, 3);
#endif
#ifndef PerlIO_vprintf
__attribute__format__(__printf__, 2, 3);
#endif
#ifndef PerlIO_vprintf
-PERL_
EXPORT_C
int PerlIO_vprintf(PerlIO *, const char *, va_list);
+PERL_
CALLCONV
int PerlIO_vprintf(PerlIO *, const char *, va_list);
#endif
#ifndef PerlIO_tell
#endif
#ifndef PerlIO_tell
-PERL_
EXPORT_C
Off_t PerlIO_tell(PerlIO *);
+PERL_
CALLCONV
Off_t PerlIO_tell(PerlIO *);
#endif
#ifndef PerlIO_seek
#endif
#ifndef PerlIO_seek
-PERL_
EXPORT_C
int PerlIO_seek(PerlIO *, Off_t, int);
+PERL_
CALLCONV
int PerlIO_seek(PerlIO *, Off_t, int);
#endif
#ifndef PerlIO_rewind
#endif
#ifndef PerlIO_rewind
-PERL_
EXPORT_C
void PerlIO_rewind(PerlIO *);
+PERL_
CALLCONV
void PerlIO_rewind(PerlIO *);
#endif
#ifndef PerlIO_has_base
#endif
#ifndef PerlIO_has_base
-PERL_
EXPORT_C
int PerlIO_has_base(PerlIO *);
+PERL_
CALLCONV
int PerlIO_has_base(PerlIO *);
#endif
#ifndef PerlIO_has_cntptr
#endif
#ifndef PerlIO_has_cntptr
-PERL_
EXPORT_C
int PerlIO_has_cntptr(PerlIO *);
+PERL_
CALLCONV
int PerlIO_has_cntptr(PerlIO *);
#endif
#ifndef PerlIO_fast_gets
#endif
#ifndef PerlIO_fast_gets
-PERL_
EXPORT_C
int PerlIO_fast_gets(PerlIO *);
+PERL_
CALLCONV
int PerlIO_fast_gets(PerlIO *);
#endif
#ifndef PerlIO_canset_cnt
#endif
#ifndef PerlIO_canset_cnt
-PERL_
EXPORT_C
int PerlIO_canset_cnt(PerlIO *);
+PERL_
CALLCONV
int PerlIO_canset_cnt(PerlIO *);
#endif
#ifndef PerlIO_get_ptr
#endif
#ifndef PerlIO_get_ptr
-PERL_
EXPORT_C
STDCHAR *PerlIO_get_ptr(PerlIO *);
+PERL_
CALLCONV
STDCHAR *PerlIO_get_ptr(PerlIO *);
#endif
#ifndef PerlIO_get_cnt
#endif
#ifndef PerlIO_get_cnt
-PERL_
EXPORT_C
SSize_t PerlIO_get_cnt(PerlIO *);
+PERL_
CALLCONV
SSize_t PerlIO_get_cnt(PerlIO *);
#endif
#ifndef PerlIO_set_cnt
#endif
#ifndef PerlIO_set_cnt
-PERL_
EXPORT_C
void PerlIO_set_cnt(PerlIO *, SSize_t);
+PERL_
CALLCONV
void PerlIO_set_cnt(PerlIO *, SSize_t);
#endif
#ifndef PerlIO_set_ptrcnt
#endif
#ifndef PerlIO_set_ptrcnt
-PERL_
EXPORT_C
void PerlIO_set_ptrcnt(PerlIO *, STDCHAR *, SSize_t);
+PERL_
CALLCONV
void PerlIO_set_ptrcnt(PerlIO *, STDCHAR *, SSize_t);
#endif
#ifndef PerlIO_get_base
#endif
#ifndef PerlIO_get_base
-PERL_
EXPORT_C
STDCHAR *PerlIO_get_base(PerlIO *);
+PERL_
CALLCONV
STDCHAR *PerlIO_get_base(PerlIO *);
#endif
#ifndef PerlIO_get_bufsiz
#endif
#ifndef PerlIO_get_bufsiz
-PERL_
EXPORT_C
SSize_t PerlIO_get_bufsiz(PerlIO *);
+PERL_
CALLCONV
SSize_t PerlIO_get_bufsiz(PerlIO *);
#endif
#ifndef PerlIO_tmpfile
#endif
#ifndef PerlIO_tmpfile
-PERL_
EXPORT_C
PerlIO *PerlIO_tmpfile(void);
+PERL_
CALLCONV
PerlIO *PerlIO_tmpfile(void);
#endif
#ifndef PerlIO_stdin
#endif
#ifndef PerlIO_stdin
-PERL_
EXPORT_C
PerlIO *PerlIO_stdin(void);
+PERL_
CALLCONV
PerlIO *PerlIO_stdin(void);
#endif
#ifndef PerlIO_stdout
#endif
#ifndef PerlIO_stdout
-PERL_
EXPORT_C
PerlIO *PerlIO_stdout(void);
+PERL_
CALLCONV
PerlIO *PerlIO_stdout(void);
#endif
#ifndef PerlIO_stderr
#endif
#ifndef PerlIO_stderr
-PERL_
EXPORT_C
PerlIO *PerlIO_stderr(void);
+PERL_
CALLCONV
PerlIO *PerlIO_stderr(void);
#endif
#ifndef PerlIO_getpos
#endif
#ifndef PerlIO_getpos
-PERL_
EXPORT_C
int PerlIO_getpos(PerlIO *, SV *);
+PERL_
CALLCONV
int PerlIO_getpos(PerlIO *, SV *);
#endif
#ifndef PerlIO_setpos
#endif
#ifndef PerlIO_setpos
-PERL_
EXPORT_C
int PerlIO_setpos(PerlIO *, SV *);
+PERL_
CALLCONV
int PerlIO_setpos(PerlIO *, SV *);
#endif
#ifndef PerlIO_fdupopen
#endif
#ifndef PerlIO_fdupopen
-PERL_
EXPORT_C
PerlIO *PerlIO_fdupopen(pTHX_ PerlIO *, CLONE_PARAMS *, int);
+PERL_
CALLCONV
PerlIO *PerlIO_fdupopen(pTHX_ PerlIO *, CLONE_PARAMS *, int);
#endif
#endif
-#if !defined(PerlIO_modestr)
&& !defined(PERLIO_IS_STDIO)
-PERL_
EXPORT_C
char *PerlIO_modestr(PerlIO *, char *buf);
+#if !defined(PerlIO_modestr)
+PERL_
CALLCONV
char *PerlIO_modestr(PerlIO *, char *buf);
#endif
#ifndef PerlIO_isutf8
#endif
#ifndef PerlIO_isutf8
-PERL_
EXPORT_C
int PerlIO_isutf8(PerlIO *);
+PERL_
CALLCONV
int PerlIO_isutf8(PerlIO *);
#endif
#ifndef PerlIO_apply_layers
#endif
#ifndef PerlIO_apply_layers
-PERL_
EXPORT_C
int PerlIO_apply_layers(pTHX_ PerlIO *f, const char *mode,
+PERL_
CALLCONV
int PerlIO_apply_layers(pTHX_ PerlIO *f, const char *mode,
const char *names);
#endif
#ifndef PerlIO_binmode
const char *names);
#endif
#ifndef PerlIO_binmode
-PERL_
EXPORT_C
int PerlIO_binmode(pTHX_ PerlIO *f, int iotype, int omode,
+PERL_
CALLCONV
int PerlIO_binmode(pTHX_ PerlIO *f, int iotype, int omode,
const char *names);
#endif
#ifndef PerlIO_getname
const char *names);
#endif
#ifndef PerlIO_getname
-PERL_
EXPORT_C
char *PerlIO_getname(PerlIO *, char *);
+PERL_
CALLCONV
char *PerlIO_getname(PerlIO *, char *);
#endif
#endif
-PERL_
EXPORT_C
void PerlIO_destruct(pTHX);
+PERL_
CALLCONV
void PerlIO_destruct(pTHX);
-PERL_
EXPORT_C
int PerlIO_intmode2str(int rawmode, char *mode, int *writing);
+PERL_
CALLCONV
int PerlIO_intmode2str(int rawmode, char *mode, int *writing);
#ifdef PERLIO_LAYERS
#ifdef PERLIO_LAYERS
-PERL_
EXPORT_C
void PerlIO_cleanup(pTHX);
+PERL_
CALLCONV
void PerlIO_cleanup(pTHX);
-PERL_
EXPORT_C
void PerlIO_debug(const char *fmt, ...)
+PERL_
CALLCONV
void PerlIO_debug(const char *fmt, ...)
__attribute__format__(__printf__, 1, 2);
typedef struct PerlIO_list_s PerlIO_list_t;
__attribute__format__(__printf__, 1, 2);
typedef struct PerlIO_list_s PerlIO_list_t;
-
#endif
END_EXTERN_C
#endif /* _PERLIO_H */
/*
#endif
END_EXTERN_C
#endif /* _PERLIO_H */
/*
- * Local variables:
- * c-indentation-style: bsd
- * c-basic-offset: 4
- * indent-tabs-mode: nil
- * End:
- *
* ex: set ts=8 sts=4 sw=4 et:
*/
* ex: set ts=8 sts=4 sw=4 et:
*/