Ap |bool |do_close |GV* gv|bool not_implicit
p |bool |do_eof |GV* gv
p |bool |do_exec |char* cmd
+#if defined(WIN32)
+Ap |int |do_aspawn |SV* really|SV** mark|SV** sp
+Ap |int |do_spawn |char* cmd
+Ap |int |do_spawn_nowait|char* cmd
+#endif
#if !defined(WIN32)
p |bool |do_exec3 |char* cmd|int fd|int flag
#endif
#define do_close Perl_do_close
#define do_eof Perl_do_eof
#define do_exec Perl_do_exec
+#if defined(WIN32)
+#define do_aspawn Perl_do_aspawn
+#define do_spawn Perl_do_spawn
+#define do_spawn_nowait Perl_do_spawn_nowait
+#endif
#if !defined(WIN32)
#define do_exec3 Perl_do_exec3
#endif
#define do_close(a,b) Perl_do_close(aTHX_ a,b)
#define do_eof(a) Perl_do_eof(aTHX_ a)
#define do_exec(a) Perl_do_exec(aTHX_ a)
+#if defined(WIN32)
+#define do_aspawn(a,b,c) Perl_do_aspawn(aTHX_ a,b,c)
+#define do_spawn(a) Perl_do_spawn(aTHX_ a)
+#define do_spawn_nowait(a) Perl_do_spawn_nowait(aTHX_ a)
+#endif
#if !defined(WIN32)
#define do_exec3(a,b,c) Perl_do_exec3(aTHX_ a,b,c)
#endif
Perl_dounwind
Perl_do_binmode
Perl_do_close
+Perl_do_aspawn
+Perl_do_spawn
+Perl_do_spawn_nowait
Perl_do_join
Perl_do_open
Perl_do_open9
typedef void* (*LPProcDynaLoader)(struct IPerlProc*, const char*);
typedef void (*LPProcGetOSError)(struct IPerlProc*,
SV* sv, DWORD dwErr);
-typedef void (*LPProcFreeBuf)(struct IPerlProc*, char*);
-typedef BOOL (*LPProcDoCmd)(struct IPerlProc*, char*);
-typedef int (*LPProcSpawn)(struct IPerlProc*, char*);
typedef int (*LPProcSpawnvp)(struct IPerlProc*, int, const char*,
const char*const*);
-typedef int (*LPProcASpawn)(struct IPerlProc*, void*, void**, void**);
#endif
typedef int (*LPProcLastHost)(struct IPerlProc*);
typedef int (*LPProcGetTimeOfDay)(struct IPerlProc*,
#ifdef WIN32
LPProcDynaLoader pDynaLoader;
LPProcGetOSError pGetOSError;
- LPProcDoCmd pDoCmd;
- LPProcSpawn pSpawn;
LPProcSpawnvp pSpawnvp;
- LPProcASpawn pASpawn;
#endif
LPProcLastHost pLastHost;
LPProcPopenList pPopenList;
(*PL_Proc->pDynaLoader)(PL_Proc, (f))
#define PerlProc_GetOSError(s,e) \
(*PL_Proc->pGetOSError)(PL_Proc, (s), (e))
-#define PerlProc_Cmd(s) \
- (*PL_Proc->pDoCmd)(PL_Proc, (s))
-#define do_spawn(s) \
- (*PL_Proc->pSpawn)(PL_Proc, (s))
-#define do_spawnvp(m, c, a) \
+#define PerlProc_spawnvp(m, c, a) \
(*PL_Proc->pSpawnvp)(PL_Proc, (m), (c), (a))
-#define PerlProc_aspawn(m,c,a) \
- (*PL_Proc->pASpawn)(PL_Proc, (m), (c), (a))
#endif
#define PerlProc_lasthost() \
(*PL_Proc->pLastHost)(PL_Proc)
win32_dynaload((f))
#define PerlProc_GetOSError(s,e) \
win32_str_os_error((s), (e))
+#define PerlProc_spawnvp(m, c, a) \
+ win32_spawnvp((m), (c), (a))
#undef PerlProc_signal
#define PerlProc_signal(n, h) win32_signal((n), (h))
#endif
Perl_my_popen
)];
}
-elsif ($PLATFORM eq 'wince') {
+else {
+ skip_symbols [qw(
+ Perl_do_spawn
+ Perl_do_spawn_nowait
+ Perl_do_aspawn
+ )];
+}
+if ($PLATFORM eq 'wince') {
skip_symbols [qw(
PL_statusvalue_vms
PL_archpat_auto
result = 0;
if (PL_op->op_flags & OPf_STACKED) {
SV *really = *++MARK;
+# ifdef WIN32
+ value = (I32)do_aspawn(really, MARK, SP);
+# else
value = (I32)do_aspawn(really, (void **)MARK, (void **)SP);
+# endif
}
- else if (SP - MARK != 1)
+ else if (SP - MARK != 1) {
+# ifdef WIN32
+ value = (I32)do_aspawn(Nullsv, MARK, SP);
+# else
value = (I32)do_aspawn(Nullsv, (void **)MARK, (void **)SP);
+# endif
+ }
else {
value = (I32)do_spawn(SvPVx(sv_mortalcopy(*SP), n_a));
}
PERL_CALLCONV bool Perl_do_close(pTHX_ GV* gv, bool not_implicit);
PERL_CALLCONV bool Perl_do_eof(pTHX_ GV* gv);
PERL_CALLCONV bool Perl_do_exec(pTHX_ char* cmd);
+#if defined(WIN32)
+PERL_CALLCONV int Perl_do_aspawn(pTHX_ SV* really, SV** mark, SV** sp);
+PERL_CALLCONV int Perl_do_spawn(pTHX_ char* cmd);
+PERL_CALLCONV int Perl_do_spawn_nowait(pTHX_ char* cmd);
+#endif
#if !defined(WIN32)
PERL_CALLCONV bool Perl_do_exec3(pTHX_ char* cmd, int fd, int flag);
#endif
extern char * g_win32_get_sitelib(const char *pl);
extern char * g_win32_get_vendorlib(const char *pl);
extern char * g_getlogin(void);
-extern int do_spawn2(char *cmd, int exectype);
END_EXTERN_C
class CPerlHost
win32_str_os_error(sv, dwErr);
}
-BOOL
-PerlProcDoCmd(struct IPerlProc* piPerl, char *cmd)
-{
- do_spawn2(cmd, EXECF_EXEC);
- return FALSE;
-}
-
-int
-PerlProcSpawn(struct IPerlProc* piPerl, char* cmds)
-{
- return do_spawn2(cmds, EXECF_SPAWN);
-}
-
int
PerlProcSpawnvp(struct IPerlProc* piPerl, int mode, const char *cmdname, const char *const *argv)
{
}
int
-PerlProcASpawn(struct IPerlProc* piPerl, void *vreally, void **vmark, void **vsp)
-{
- return do_aspawn(vreally, vmark, vsp);
-}
-
-int
PerlProcLastHost(struct IPerlProc* piPerl)
{
dTHX;
PerlProcGetpid,
PerlProcDynaLoader,
PerlProcGetOSError,
- PerlProcDoCmd,
- PerlProcSpawn,
PerlProcSpawnvp,
- PerlProcASpawn,
PerlProcLastHost,
PerlProcPopenList,
PerlProcGetTimeOfDay
# define win32_get_sitelib g_win32_get_sitelib
# undef win32_get_vendorlib
# define win32_get_vendorlib g_win32_get_vendorlib
-# undef do_spawn
-# define do_spawn g_do_spawn
# undef getlogin
# define getlogin g_getlogin
#endif
static void get_shell(void);
static long tokenize(const char *str, char **dest, char ***destv);
- int do_spawn2(char *cmd, int exectype);
+static int do_spawn2(pTHX_ char *cmd, int exectype);
static BOOL has_shell_metachars(char *ptr);
static long filetime_to_clock(PFILETIME ft);
static BOOL filetime_from_time(PFILETIME ft, time_t t);
}
int
-do_aspawn(void *vreally, void **vmark, void **vsp)
+Perl_do_aspawn(pTHX_ SV *really, SV **mark, SV **sp)
{
- dTHX;
- SV *really = (SV*)vreally;
- SV **mark = (SV**)vmark;
- SV **sp = (SV**)vsp;
char **argv;
char *str;
int status;
return (char*)s;
}
-int
-do_spawn2(char *cmd, int exectype)
+static int
+do_spawn2(pTHX_ char *cmd, int exectype)
{
- dTHX;
char **a;
char *s;
char **argv;
}
int
-do_spawn(char *cmd)
+Perl_do_spawn(pTHX_ char *cmd)
{
- return do_spawn2(cmd, EXECF_SPAWN);
+ return do_spawn2(aTHX_ cmd, EXECF_SPAWN);
}
int
-do_spawn_nowait(char *cmd)
+Perl_do_spawn_nowait(pTHX_ char *cmd)
{
- return do_spawn2(cmd, EXECF_SPAWN_NOWAIT);
+ return do_spawn2(aTHX_ cmd, EXECF_SPAWN_NOWAIT);
}
bool
Perl_do_exec(pTHX_ char *cmd)
{
- do_spawn2(cmd, EXECF_EXEC);
+ do_spawn2(aTHX_ cmd, EXECF_EXEC);
return FALSE;
}
#endif
extern int my_fclose(FILE *);
extern int my_fstat(int fd, Stat_t *sbufptr);
-extern int do_aspawn(void *really, void **mark, void **sp);
-extern int do_spawn(char *cmd);
-extern int do_spawn_nowait(char *cmd);
extern char * win32_get_privlib(const char *pl);
extern char * win32_get_sitelib(const char *pl);
extern char * win32_get_vendorlib(const char *pl);