diff options
author | Nick Ing-Simmons <nik@tiuk.ti.com> | 2000-12-04 00:24:33 +0000 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 2000-12-04 00:24:33 +0000 |
commit | b4748376b6239962bd75b743e5a7b14788a2970c (patch) | |
tree | 907a40434ab371b6576e819e50959e6322d63845 | |
parent | adb71456d0ff53391c88789f315f1e66b14373d5 (diff) | |
download | perl-b4748376b6239962bd75b743e5a7b14788a2970c.tar.gz |
Quieten some noise in Win32 builds:
- win32.h is included after <sys/socket.h>, so need to
set Win32SCK_IS_STDSCK earlier to avoid re-defined noise in XSUB.h
- GCC (& MSVC?) have execv(...,const char *const *) so need a cast from char **.
p4raw-id: //depot/perlio@7971
-rw-r--r-- | doio.c | 4 | ||||
-rw-r--r-- | perl.h | 8 | ||||
-rw-r--r-- | toke.c | 2 | ||||
-rw-r--r-- | win32/win32.h | 2 |
4 files changed, 13 insertions, 3 deletions
@@ -1300,9 +1300,9 @@ Perl_do_aexec5(pTHX_ SV *really, register SV **mark, register SV **sp, if (*PL_Argv[0] != '/') /* will execvp use PATH? */ TAINT_ENV(); /* testing IFS here is overkill, probably */ if (really && *(tmps = SvPV(really, n_a))) - PerlProc_execvp(tmps,PL_Argv); + PerlProc_execvp(tmps,EXEC_ARGV_CAST(PL_Argv)); else - PerlProc_execvp(PL_Argv[0],PL_Argv); + PerlProc_execvp(PL_Argv[0],EXEC_ARGV_CAST(PL_Argv)); if (ckWARN(WARN_EXEC)) Perl_warner(aTHX_ WARN_EXEC, "Can't exec \"%s\": %s", PL_Argv[0], Strerror(errno)); @@ -714,6 +714,10 @@ typedef struct perl_mstats perl_mstats_t; #include <errno.h> +#if defined(WIN32) && (defined(PERL_OBJECT) || defined(PERL_IMPLICIT_SYS) || defined(PERL_CAPI)) +# define WIN32SCK_IS_STDSCK /* don't pull in custom wsock layer */ +#endif + #if defined(HAS_SOCKET) && !defined(VMS) /* VMS handles sockets via vmsish.h */ # include <sys/socket.h> # if defined(USE_SOCKS) && defined(I_SOCKS) @@ -3442,6 +3446,10 @@ typedef struct am_table_short AMTS; # include <libutil.h> /* setproctitle() in some FreeBSDs */ #endif +#ifndef EXEC_ARGV_CAST +#define EXEC_ARGV_CAST(x) x +#endif + /* and finally... */ #define PERL_PATCHLEVEL_H_IMPLICIT #include "patchlevel.h" @@ -2718,7 +2718,7 @@ Perl_yylex(pTHX) else newargv = PL_origargv; newargv[0] = ipath; - PerlProc_execv(ipath, newargv); + PerlProc_execv(ipath, EXEC_ARGV_CAST(newargv)); Perl_croak(aTHX_ "Can't exec %s", ipath); } #endif diff --git a/win32/win32.h b/win32/win32.h index c75566f0a3..1640564a65 100644 --- a/win32/win32.h +++ b/win32/win32.h @@ -554,5 +554,7 @@ EXTERN_C _CRTIMP ioinfo* __pioinfo[]; */ #include "win32iop.h" +#define EXEC_ARGV_CAST(x) ((const char *const *) x) + #endif /* _INC_WIN32_PERL5 */ |