X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/af2f850fb5b3bd37dab6742ca16cce6aa5482fb9..41b654eb4e6464cf37e5ee236d2800e73948778c:/win32/perlhost.h diff --git a/win32/perlhost.h b/win32/perlhost.h index 9963319..6dd269e 100644 --- a/win32/perlhost.h +++ b/win32/perlhost.h @@ -836,15 +836,15 @@ PerlStdIOFdupopen(struct IPerlStdIO* piPerl, FILE* pf) int fileno = win32_dup(win32_fileno(pf)); /* open the file in the same mode */ - if((pf)->_flag & _IOREAD) { + if (PERLIO_FILE_flag(pf) & PERLIO_FILE_flag_RD) { mode[0] = 'r'; mode[1] = 0; } - else if((pf)->_flag & _IOWRT) { + else if (PERLIO_FILE_flag(pf) & PERLIO_FILE_flag_WR) { mode[0] = 'a'; mode[1] = 0; } - else if((pf)->_flag & _IORW) { + else if (PERLIO_FILE_flag(pf) & PERLIO_FILE_flag_RW) { mode[0] = 'r'; mode[1] = '+'; mode[2] = 0; @@ -1605,7 +1605,7 @@ PerlProcKillpg(struct IPerlProc* piPerl, int pid, int sig) int PerlProcPauseProc(struct IPerlProc* piPerl) { - return win32_sleep((32767L << 16) + 32767); + return win32_pause(); } PerlIO* @@ -2177,17 +2177,11 @@ compare(const void *arg1, const void *arg2) void CPerlHost::Add(LPCSTR lpStr) { - char szBuffer[1024]; LPSTR *lpPtr; - int index, length = strlen(lpStr)+1; - - for(index = 0; lpStr[index] != '\0' && lpStr[index] != '='; ++index) - szBuffer[index] = lpStr[index]; - - szBuffer[index] = '\0'; + STRLEN length = strlen(lpStr)+1; // replacing ? - lpPtr = Lookup(szBuffer); + lpPtr = Lookup(lpStr); if (lpPtr != NULL) { // must allocate things via host memory allocation functions // rather than perl's Renew() et al, as the perl interpreter