diff options
-rw-r--r-- | opcode.h | 9 | ||||
-rw-r--r-- | pp_proto.h | 3 | ||||
-rw-r--r-- | pp_sys.c | 53 | ||||
-rwxr-xr-x | regen/opcode.pl | 1 |
4 files changed, 28 insertions, 38 deletions
@@ -121,6 +121,9 @@ #define Perl_pp_gpbynumber Perl_pp_gprotoent #define Perl_pp_gsbyname Perl_pp_gservent #define Perl_pp_gsbyport Perl_pp_gservent +#define Perl_pp_enetent Perl_pp_ehostent +#define Perl_pp_eprotoent Perl_pp_ehostent +#define Perl_pp_eservent Perl_pp_ehostent #define Perl_pp_gpwnam Perl_pp_gpwent #define Perl_pp_gpwuid Perl_pp_gpwent #define Perl_pp_ggrnam Perl_pp_ggrent @@ -1251,9 +1254,9 @@ EXT Perl_ppaddr_t PL_ppaddr[] /* or perlvars.h */ Perl_pp_sprotoent, Perl_pp_sservent, Perl_pp_ehostent, - Perl_pp_enetent, - Perl_pp_eprotoent, - Perl_pp_eservent, + Perl_pp_enetent, /* implemented by Perl_pp_ehostent */ + Perl_pp_eprotoent, /* implemented by Perl_pp_ehostent */ + Perl_pp_eservent, /* implemented by Perl_pp_ehostent */ Perl_pp_gpwnam, /* implemented by Perl_pp_gpwent */ Perl_pp_gpwuid, /* implemented by Perl_pp_gpwent */ Perl_pp_gpwent, diff --git a/pp_proto.h b/pp_proto.h index 41f03e0a4f..05855367c7 100644 --- a/pp_proto.h +++ b/pp_proto.h @@ -52,7 +52,6 @@ PERL_CALLCONV OP *Perl_pp_divide(pTHX); PERL_CALLCONV OP *Perl_pp_each(pTHX); PERL_CALLCONV OP *Perl_pp_egrent(pTHX); PERL_CALLCONV OP *Perl_pp_ehostent(pTHX); -PERL_CALLCONV OP *Perl_pp_enetent(pTHX); PERL_CALLCONV OP *Perl_pp_enter(pTHX); PERL_CALLCONV OP *Perl_pp_entereval(pTHX); PERL_CALLCONV OP *Perl_pp_entergiven(pTHX); @@ -63,10 +62,8 @@ PERL_CALLCONV OP *Perl_pp_entertry(pTHX); PERL_CALLCONV OP *Perl_pp_enterwhen(pTHX); PERL_CALLCONV OP *Perl_pp_enterwrite(pTHX); PERL_CALLCONV OP *Perl_pp_eof(pTHX); -PERL_CALLCONV OP *Perl_pp_eprotoent(pTHX); PERL_CALLCONV OP *Perl_pp_epwent(pTHX); PERL_CALLCONV OP *Perl_pp_eq(pTHX); -PERL_CALLCONV OP *Perl_pp_eservent(pTHX); PERL_CALLCONV OP *Perl_pp_exec(pTHX); PERL_CALLCONV OP *Perl_pp_exists(pTHX); PERL_CALLCONV OP *Perl_pp_exit(pTHX); @@ -5029,50 +5029,39 @@ PP(pp_sservent) PP(pp_ehostent) { -#ifdef HAS_ENDHOSTENT dVAR; dSP; - PerlSock_endhostent(); - EXTEND(SP,1); - RETPUSHYES; + switch(PL_op->op_type) { + case OP_EHOSTENT: +#ifdef HAS_ENDHOSTENT + PerlSock_endhostent(); #else - DIE(aTHX_ PL_no_sock_func, "endhostent"); + DIE(aTHX_ PL_no_sock_func, PL_op_desc[PL_op->op_type]); #endif -} - -PP(pp_enetent) -{ + break; + case OP_ENETENT: #ifdef HAS_ENDNETENT - dVAR; dSP; - PerlSock_endnetent(); - EXTEND(SP,1); - RETPUSHYES; + PerlSock_endnetent(); #else - DIE(aTHX_ PL_no_sock_func, "endnetent"); + DIE(aTHX_ PL_no_sock_func, PL_op_desc[PL_op->op_type]); #endif -} - -PP(pp_eprotoent) -{ + break; + case OP_EPROTOENT: #ifdef HAS_ENDPROTOENT - dVAR; dSP; - PerlSock_endprotoent(); - EXTEND(SP,1); - RETPUSHYES; + PerlSock_endprotoent(); #else - DIE(aTHX_ PL_no_sock_func, "endprotoent"); + DIE(aTHX_ PL_no_sock_func, PL_op_desc[PL_op->op_type]); #endif -} - -PP(pp_eservent) -{ + break; + case OP_ESERVENT: #ifdef HAS_ENDSERVENT - dVAR; dSP; - PerlSock_endservent(); - EXTEND(SP,1); - RETPUSHYES; + PerlSock_endservent(); #else - DIE(aTHX_ PL_no_sock_func, "endservent"); + DIE(aTHX_ PL_no_sock_func, PL_op_desc[PL_op->op_type]); #endif + break; + } + EXTEND(SP,1); + RETPUSHYES; } PP(pp_gpwent) diff --git a/regen/opcode.pl b/regen/opcode.pl index 701ec27bf5..2d584503b9 100755 --- a/regen/opcode.pl +++ b/regen/opcode.pl @@ -117,6 +117,7 @@ my @raw_alias = ( Perl_pp_predec => ['i_predec'], Perl_pp_postinc => ['i_postinc'], Perl_pp_postdec => ['i_postdec'], + Perl_pp_ehostent => [qw(enetent eprotoent eservent)], ); while (my ($func, $names) = splice @raw_alias, 0, 2) { |