From: Nicholas Clark Date: Sun, 30 Oct 2005 08:23:29 +0000 (+0000) Subject: Replace do_exec() with a macro to call do_exec3() with the extra two X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9555a685dbd794b0e9f549335341b2a3b1ea3da5;p=p5sagit%2Fp5-mst-13.2.git Replace do_exec() with a macro to call do_exec3() with the extra two 0 arguments. Move the old body to mathoms.c p4raw-id: //depot/perl@25890 --- diff --git a/doio.c b/doio.c index c2867fb..3a270db 100644 --- a/doio.c +++ b/doio.c @@ -1473,13 +1473,7 @@ Perl_do_execfree(pTHX) PL_Cmd = Nullch; } -#if !defined(OS2) && !defined(WIN32) && !defined(DJGPP) && !defined(EPOC) && !defined(__SYMBIAN32__) && !defined(MACOS_TRADITIONAL) - -bool -Perl_do_exec(pTHX_ const char *cmd) -{ - return do_exec3(cmd,0,0); -} +#ifdef PERL_DEFAULT_DO_EXEC3_IMPLEMENTATION bool Perl_do_exec3(pTHX_ const char *incmd, int fd, int do_report) diff --git a/embed.fnc b/embed.fnc index 842bb10..429a213 100644 --- a/embed.fnc +++ b/embed.fnc @@ -183,7 +183,7 @@ Ap |int |do_binmode |NN PerlIO *fp|int iotype|int mode p |void |do_chop |NN SV* asv|NN SV* sv Ap |bool |do_close |NN GV* gv|bool not_implicit p |bool |do_eof |NN GV* gv -p |bool |do_exec |NN const char* cmd +pmb |bool |do_exec |NN const char* cmd #if defined(WIN32) || defined(__SYMBIAN32__) Ap |int |do_aspawn |NN SV* really|NN SV** mark|NN SV** sp Ap |int |do_spawn |NN char* cmd diff --git a/embed.h b/embed.h index 338fc14..db63763 100644 --- a/embed.h +++ b/embed.h @@ -165,7 +165,6 @@ #define do_close Perl_do_close #ifdef PERL_CORE #define do_eof Perl_do_eof -#define do_exec Perl_do_exec #endif #if defined(WIN32) || defined(__SYMBIAN32__) #define do_aspawn Perl_do_aspawn @@ -2159,7 +2158,6 @@ #define do_close(a,b) Perl_do_close(aTHX_ a,b) #ifdef PERL_CORE #define do_eof(a) Perl_do_eof(aTHX_ a) -#define do_exec(a) Perl_do_exec(aTHX_ a) #endif #if defined(WIN32) || defined(__SYMBIAN32__) #define do_aspawn(a,b,c) Perl_do_aspawn(aTHX_ a,b,c) diff --git a/mathoms.c b/mathoms.c index eef80f5..91a1709 100644 --- a/mathoms.c +++ b/mathoms.c @@ -636,6 +636,14 @@ Perl_do_binmode(pTHX_ PerlIO *fp, int iotype, int mode) return PerlIO_binmode(aTHX_ fp, iotype, mode, name); } +#ifdef PERL_DEFAULT_DO_EXEC3_IMPLEMENTATION +bool +Perl_do_exec(pTHX_ const char *cmd) +{ + return do_exec3(cmd,0,0); +} +#endif + /* * Local variables: * c-indentation-style: bsd diff --git a/perl.h b/perl.h index a747539..7512a7a 100644 --- a/perl.h +++ b/perl.h @@ -5390,8 +5390,15 @@ extern void moncontrol(int); #pragma message disable (mainparm) /* Perl uses the envp in main(). */ #endif +#if !defined(OS2) && !defined(WIN32) && !defined(DJGPP) && !defined(EPOC) && !defined(__SYMBIAN32__) && !defined(MACOS_TRADITIONAL) +#define PERL_DEFAULT_DO_EXEC3_IMPLEMENTATION +#endif + #define do_open(g, n, l, a, rm, rp, sf) \ do_openn(g, n, l, a, rm, rp, sf, (SV **) NULL, 0) +#ifdef PERL_DEFAULT_DO_EXEC3_IMPLEMENTATION +#define do_exec(cmd) do_exec3(cmd,0,0) +#endif /* and finally... */ #define PERL_PATCHLEVEL_H_IMPLICIT diff --git a/proto.h b/proto.h index c660355..177a8c1 100644 --- a/proto.h +++ b/proto.h @@ -386,8 +386,8 @@ PERL_CALLCONV bool Perl_do_close(pTHX_ GV* gv, bool not_implicit) PERL_CALLCONV bool Perl_do_eof(pTHX_ GV* gv) __attribute__nonnull__(pTHX_1); -PERL_CALLCONV bool Perl_do_exec(pTHX_ const char* cmd) - __attribute__nonnull__(pTHX_1); +/* PERL_CALLCONV bool Perl_do_exec(pTHX_ const char* cmd) + __attribute__nonnull__(pTHX_1); */ #if defined(WIN32) || defined(__SYMBIAN32__) PERL_CALLCONV int Perl_do_aspawn(pTHX_ SV* really, SV** mark, SV** sp)