This should clear up 'Perl_do_exec' undefined; warnings on win32
Nicholas Clark [Tue, 1 Nov 2005 16:38:31 +0000 (16:38 +0000)]
p4raw-id: //depot/perl@25946

embed.fnc
embed.h
proto.h

index a3746fe..2ee9e07 100644 (file)
--- a/embed.fnc
+++ b/embed.fnc
@@ -183,7 +183,13 @@ 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
+
+#ifdef PERL_DEFAULT_DO_EXEC3_IMPLEMENTATION
 pmb    |bool   |do_exec        |NN const char* cmd
+#else
+p      |bool   |do_exec        |NN const char* cmd
+#endif
+
 #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 1309bc8..9105aea 100644 (file)
--- a/embed.h
+++ b/embed.h
 #ifdef PERL_CORE
 #define do_eof                 Perl_do_eof
 #endif
+#ifdef PERL_DEFAULT_DO_EXEC3_IMPLEMENTATION
+#else
+#ifdef PERL_CORE
+#define do_exec                        Perl_do_exec
+#endif
+#endif
 #if defined(WIN32) || defined(__SYMBIAN32__)
 #define do_aspawn              Perl_do_aspawn
 #define do_spawn               Perl_do_spawn
 #ifdef PERL_CORE
 #define do_eof(a)              Perl_do_eof(aTHX_ a)
 #endif
+#ifdef PERL_DEFAULT_DO_EXEC3_IMPLEMENTATION
+#ifdef PERL_CORE
+#endif
+#else
+#ifdef PERL_CORE
+#define do_exec(a)             Perl_do_exec(aTHX_ a)
+#endif
+#endif
 #if defined(WIN32) || defined(__SYMBIAN32__)
 #define do_aspawn(a,b,c)       Perl_do_aspawn(aTHX_ a,b,c)
 #define do_spawn(a)            Perl_do_spawn(aTHX_ a)
diff --git a/proto.h b/proto.h
index 294d62b..2050389 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -386,9 +386,17 @@ 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);
 
+
+#ifdef PERL_DEFAULT_DO_EXEC3_IMPLEMENTATION
 /* PERL_CALLCONV bool  Perl_do_exec(pTHX_ const char* cmd)
                        __attribute__nonnull__(pTHX_1); */
 
+#else
+PERL_CALLCONV bool     Perl_do_exec(pTHX_ const char* cmd)
+                       __attribute__nonnull__(pTHX_1);
+
+#endif
+
 #if defined(WIN32) || defined(__SYMBIAN32__)
 PERL_CALLCONV int      Perl_do_aspawn(pTHX_ SV* really, SV** mark, SV** sp)
                        __attribute__nonnull__(pTHX_1)