Perl_croak(aTHX_ "exec? I'm not *that* kind of operating system");
#else
if (sp > mark) {
- char **a;
+ const char **a;
const char *tmps = NULL;
- Newx(PL_Argv, sp - mark + 1, char*);
+ Newx(PL_Argv, sp - mark + 1, const char*);
a = PL_Argv;
while (++mark <= sp) {
if (*mark)
- *a++ = (char*)SvPV_nolen_const(*mark);
+ *a++ = SvPV_nolen_const(*mark);
else
*a++ = "";
}
Perl_do_exec3(pTHX_ const char *incmd, int fd, int do_report)
{
dVAR;
- register char **a;
+ register const char **a;
register char *s;
char *buf;
char *cmd;
}
}
- Newx(PL_Argv, (s - cmd) / 2 + 2, char*);
+ Newx(PL_Argv, (s - cmd) / 2 + 2, const char*);
PL_Cmd = savepvn(cmd, s-cmd);
a = PL_Argv;
for (s = PL_Cmd; *s;) {
*a = NULL;
if (PL_Argv[0]) {
PERL_FPU_PRE_EXEC
- PerlProc_execvp(PL_Argv[0],PL_Argv);
+ PerlProc_execvp(PL_Argv[0],EXEC_ARGV_CAST(PL_Argv));
PERL_FPU_POST_EXEC
if (errno == ENOEXEC) { /* for system V NIH syndrome */
do_execfree();
PERLVAR(Ifilemode, int) /* so nextargv() can preserve mode */
PERLVAR(Ilastfd, int) /* what to preserve mode on */
PERLVAR(Ioldname, char *) /* what to preserve mode on */
-PERLVAR(IArgv, char **) /* stuff to free from do_aexec, vfork safe */
+PERLVAR(IArgv, const char **) /* stuff to free from do_aexec, vfork safe */
PERLVAR(ICmd, char *) /* stuff to free from do_aexec, vfork safe */
/* Elements in this array have ';' appended and are injected as a single line
into the tokeniser. You can't put any (literal) newlines into any program
7
};
-char * const PL_AMG_names[NofAMmeth] = {
+const char * const PL_AMG_names[NofAMmeth] = {
/* Names kept in the symbol table. fallback => "()", the rest has
"(" prepended. The only other place in perl which knows about
this convention is AMG_id2name (used for debugging output and
$lastlen
};
-char * const PL_AMG_names[NofAMmeth] = {
+const char * const PL_AMG_names[NofAMmeth] = {
/* Names kept in the symbol table. fallback => "()", the rest has
"(" prepended. The only other place in perl which knows about
this convention is AMG_id2name (used for debugging output and
#endif
#ifndef EXEC_ARGV_CAST
-#define EXEC_ARGV_CAST(x) x
+#define EXEC_ARGV_CAST(x) (char **)x
#endif
#define IS_NUMBER_IN_UV 0x01 /* number within UV range (maybe not