X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=win32%2Fwin32.c;h=3740e7054d86c6eed1a87af895f4d80eb2c3690a;hb=25ca88e0cbd385e70d7ea2ee4f8a34a9ff7bcc17;hp=86bf44ec4049c157904bc11cccfa3d1d31dcab88;hpb=a02a5408b2f199007c4dcb74559cc79066307ada;p=p5sagit%2Fp5-mst-13.2.git diff --git a/win32/win32.c b/win32/win32.c index 86bf44e..3740e70 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -92,8 +92,8 @@ int _fcloseall(); static void get_shell(void); static long tokenize(const char *str, char **dest, char ***destv); -static int do_spawn2(pTHX_ char *cmd, int exectype); -static BOOL has_shell_metachars(char *ptr); +static int do_spawn2(pTHX_ const char *cmd, int exectype); +static BOOL has_shell_metachars(const char *ptr); static long filetime_to_clock(PFILETIME ft); static BOOL filetime_from_time(PFILETIME ft, time_t t); static char * get_emd_part(SV **leading, char *trailing, ...); @@ -349,7 +349,7 @@ win32_get_vendorlib(const char *pl) } static BOOL -has_shell_metachars(char *ptr) +has_shell_metachars(const char *ptr) { int inquote = 0; char quote = '\0'; @@ -394,7 +394,7 @@ has_shell_metachars(char *ptr) * the library functions will get the correct environment */ PerlIO * -Perl_my_popen(pTHX_ char *cmd, char *mode) +Perl_my_popen(pTHX_ const char *cmd, const char *mode) { #ifdef FIXCMD #define fixcmd(x) { \ @@ -618,7 +618,7 @@ find_next_space(const char *s) } static int -do_spawn2(pTHX_ char *cmd, int exectype) +do_spawn2(pTHX_ const char *cmd, int exectype) { char **a; char *s; @@ -671,7 +671,7 @@ do_spawn2(pTHX_ char *cmd, int exectype) Newx(argv, w32_perlshell_items + 2, char*); while (++i < w32_perlshell_items) argv[i] = w32_perlshell_vec[i]; - argv[i++] = cmd; + argv[i++] = (char *)cmd; argv[i] = Nullch; switch (exectype) { case EXECF_SPAWN: @@ -721,7 +721,7 @@ Perl_do_spawn_nowait(pTHX_ char *cmd) } bool -Perl_do_exec(pTHX_ char *cmd) +Perl_do_exec(pTHX_ const char *cmd) { do_spawn2(aTHX_ cmd, EXECF_EXEC); return FALSE; @@ -2642,7 +2642,7 @@ win32_fseek(FILE *pf, Off_t offset,int origin) return fsetpos(pf, &offset); #endif #else - return fseek(pf, offset, origin); + return fseek(pf, (long)offset, origin); #endif } @@ -3192,7 +3192,7 @@ finish: win32_lseek(fd, cur, SEEK_SET); return retval; #else - return chsize(fd, size); + return chsize(fd, (long)size); #endif } @@ -3218,7 +3218,7 @@ win32_lseek(int fd, Off_t offset, int origin) return _lseeki64(fd, offset, origin); #endif #else - return lseek(fd, offset, origin); + return lseek(fd, (long)offset, origin); #endif }