summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-10-30 08:23:29 +0000
committerNicholas Clark <nick@ccl4.org>2005-10-30 08:23:29 +0000
commit9555a685dbd794b0e9f549335341b2a3b1ea3da5 (patch)
tree933cd09924b968254d8106493919ea79a1d15676
parente4dba78629baadf544a977b8105c4c2d93050b21 (diff)
downloadperl-9555a685dbd794b0e9f549335341b2a3b1ea3da5.tar.gz
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
-rw-r--r--doio.c8
-rw-r--r--embed.fnc2
-rw-r--r--embed.h2
-rw-r--r--mathoms.c8
-rw-r--r--perl.h7
-rw-r--r--proto.h4
6 files changed, 19 insertions, 12 deletions
diff --git a/doio.c b/doio.c
index c2867fb977..3a270db332 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 842bb10bcf..429a213e69 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 338fc14f4c..db63763e52 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 eef80f5324..91a170989c 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 a74753902a..7512a7a73d 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 c660355c14..177a8c1887 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)