X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=win32%2Fwin32.c;h=26cf26f8db407f4bd8e36ed8fb67497edd00a99c;hb=161b471ac314d8d6343f9f351e5fb9ef816168a8;hp=f31e5a8f7f002c22fe1a2364c91a149bdf980f4b;hpb=bbc8f9de328519d89fa89d8fca21fe808800d6a2;p=p5sagit%2Fp5-mst-13.2.git diff --git a/win32/win32.c b/win32/win32.c index f31e5a8..26cf26f 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -1338,7 +1338,7 @@ sbrk(int need) if (committed && reserved && committed < reserved) { /* Commit last of previous chunk cannot span allocations */ - addr = VirtualAlloc(committed,reserved-committed,MEM_COMMIT,PAGE_READWRITE); + addr = (char *) VirtualAlloc(committed,reserved-committed,MEM_COMMIT,PAGE_READWRITE); if (addr) committed = reserved; } @@ -1347,7 +1347,7 @@ sbrk(int need) * so lets system choose where we start, subsequent calls pass * the old end address so ask for a contiguous block */ - addr = VirtualAlloc(reserved,size,MEM_RESERVE,PAGE_NOACCESS); + addr = (char *) VirtualAlloc(reserved,size,MEM_RESERVE,PAGE_NOACCESS); if (addr) { reserved = addr+size; @@ -1368,7 +1368,7 @@ sbrk(int need) if (brk > committed) { DWORD size = ((brk-committed + pagesize -1)/pagesize) * pagesize; - char *addr = VirtualAlloc(committed,size,MEM_COMMIT,PAGE_READWRITE); + char *addr = (char *) VirtualAlloc(committed,size,MEM_COMMIT,PAGE_READWRITE); if (addr) { committed += size; @@ -1725,6 +1725,33 @@ Perl_win32_init(int *argcp, char ***argvp) #endif } +#ifdef USE_BINMODE_SCRIPTS + +void +win32_strip_return(SV *sv) +{ + char *s = SvPVX(sv); + char *e = s+SvCUR(sv); + char *d = s; + while (s < e) + { + if (*s == '\r' && s[1] == '\n') + { + *d++ = '\n'; + s += 2; + } + else + { + *d++ = *s++; + } + } + SvCUR_set(sv,d-SvPVX(sv)); +} + +#endif + + +