From: Jarkko Hietaniemi Date: Sun, 23 Dec 2001 01:47:23 +0000 (+0000) Subject: Integrate perlio: X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d4f0d9286be4daccd582c7bf38e50c3d474f3760;p=p5sagit%2Fp5-mst-13.2.git Integrate perlio: [ 13854] Win32 and makedef.pl fall-out of PerlIO/pTHX stuff [ 13853] Put PerlIO stuff inside EXTERN C [ 13852] Add at least the "important" PerlIO_xxxx functions to embed.pl so that they get implicit pTHX_ and we can avoid slow dTHX. p4raw-link: @13854 on //depot/perlio: 3da9a137807e4f1acaf9cb3024a6cc5fbd119b9f p4raw-link: @13853 on //depot/perlio: 582ed04c91818c6c9bf5b51c84f67b7c565925a7 p4raw-link: @13852 on //depot/perlio: e87a358ade5a3dd9a8b192569e18211d76c93743 p4raw-id: //depot/perl@13862 --- d4f0d9286be4daccd582c7bf38e50c3d474f3760 diff --cc embed.pl index b881828,26758eb..bfd8211 --- a/embed.pl +++ b/embed.pl @@@ -2353,9 -2353,34 +2353,37 @@@ Apd |STRLEN |sv_utf8_upgrade_flags|SV * Apd |char* |sv_pvn_force_flags|SV* sv|STRLEN* lp|I32 flags Apd |char* |sv_2pv_flags |SV* sv|STRLEN* lp|I32 flags Ap |char* |my_atof2 |const char *s|NV* value +#if !defined(HAS_SOCKETPAIR) && defined(HAS_SOCKET) +Ap |int |my_socketpair |int family|int type|int protocol|int fd[2] +#endif + + #if defined(USE_PERLIO) && !defined(USE_SFIO) + Ap |int |PerlIO_close |PerlIO * + Ap |int |PerlIO_fill |PerlIO * + Ap |int |PerlIO_fileno |PerlIO * + Ap |int |PerlIO_eof |PerlIO * + Ap |int |PerlIO_error |PerlIO * + Ap |int |PerlIO_flush |PerlIO * + Ap |void |PerlIO_clearerr |PerlIO * + Ap |void |PerlIO_set_cnt |PerlIO *|int + Ap |void |PerlIO_set_ptrcnt |PerlIO *|STDCHAR *|int + Ap |void |PerlIO_setlinebuf |PerlIO * + Ap |SSize_t|PerlIO_read |PerlIO *|void *|Size_t + Ap |SSize_t|PerlIO_write |PerlIO *|const void *|Size_t + Ap |SSize_t|PerlIO_unread |PerlIO *|const void *|Size_t + Ap |Off_t |PerlIO_tell |PerlIO * + Ap |int |PerlIO_seek |PerlIO *|Off_t|int + + Ap |STDCHAR *|PerlIO_get_base |PerlIO * + Ap |STDCHAR *|PerlIO_get_ptr |PerlIO * + Ap |int |PerlIO_get_bufsiz |PerlIO * + Ap |int |PerlIO_get_cnt |PerlIO * + + Ap |PerlIO *|PerlIO_stdin + Ap |PerlIO *|PerlIO_stdout + Ap |PerlIO *|PerlIO_stderr + #endif /* PERLIO_LAYERS */ + END_EXTERN_C diff --cc proto.h index bb20b20,0706e6c..fee2f9f --- a/proto.h +++ b/proto.h @@@ -1331,9 -1331,34 +1331,37 @@@ PERL_CALLCONV STRLEN Perl_sv_utf8_upgra PERL_CALLCONV char* Perl_sv_pvn_force_flags(pTHX_ SV* sv, STRLEN* lp, I32 flags); PERL_CALLCONV char* Perl_sv_2pv_flags(pTHX_ SV* sv, STRLEN* lp, I32 flags); PERL_CALLCONV char* Perl_my_atof2(pTHX_ const char *s, NV* value); +#if !defined(HAS_SOCKETPAIR) && defined(HAS_SOCKET) +PERL_CALLCONV int Perl_my_socketpair(pTHX_ int family, int type, int protocol, int fd[2]); +#endif + + #if defined(USE_PERLIO) && !defined(USE_SFIO) + PERL_CALLCONV int Perl_PerlIO_close(pTHX_ PerlIO *); + PERL_CALLCONV int Perl_PerlIO_fill(pTHX_ PerlIO *); + PERL_CALLCONV int Perl_PerlIO_fileno(pTHX_ PerlIO *); + PERL_CALLCONV int Perl_PerlIO_eof(pTHX_ PerlIO *); + PERL_CALLCONV int Perl_PerlIO_error(pTHX_ PerlIO *); + PERL_CALLCONV int Perl_PerlIO_flush(pTHX_ PerlIO *); + PERL_CALLCONV void Perl_PerlIO_clearerr(pTHX_ PerlIO *); + PERL_CALLCONV void Perl_PerlIO_set_cnt(pTHX_ PerlIO *, int); + PERL_CALLCONV void Perl_PerlIO_set_ptrcnt(pTHX_ PerlIO *, STDCHAR *, int); + PERL_CALLCONV void Perl_PerlIO_setlinebuf(pTHX_ PerlIO *); + PERL_CALLCONV SSize_t Perl_PerlIO_read(pTHX_ PerlIO *, void *, Size_t); + PERL_CALLCONV SSize_t Perl_PerlIO_write(pTHX_ PerlIO *, const void *, Size_t); + PERL_CALLCONV SSize_t Perl_PerlIO_unread(pTHX_ PerlIO *, const void *, Size_t); + PERL_CALLCONV Off_t Perl_PerlIO_tell(pTHX_ PerlIO *); + PERL_CALLCONV int Perl_PerlIO_seek(pTHX_ PerlIO *, Off_t, int); + + PERL_CALLCONV STDCHAR * Perl_PerlIO_get_base(pTHX_ PerlIO *); + PERL_CALLCONV STDCHAR * Perl_PerlIO_get_ptr(pTHX_ PerlIO *); + PERL_CALLCONV int Perl_PerlIO_get_bufsiz(pTHX_ PerlIO *); + PERL_CALLCONV int Perl_PerlIO_get_cnt(pTHX_ PerlIO *); + + PERL_CALLCONV PerlIO * Perl_PerlIO_stdin(pTHX); + PERL_CALLCONV PerlIO * Perl_PerlIO_stdout(pTHX); + PERL_CALLCONV PerlIO * Perl_PerlIO_stderr(pTHX); + #endif /* PERLIO_LAYERS */ + END_EXTERN_C