This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Bump the perl version in various places for 5.29.9
[perl5.git] / win32 / wince.c
index 271df2b..0758595 100644 (file)
@@ -13,9 +13,7 @@
 
 #define PERLIO_NOT_STDIO 0
 
-#if !defined(PERLIO_IS_STDIO)
 #define PerlIO FILE
-#endif
 
 #define wince_private
 #include "errno.h"
 #define EXECF_SPAWN_NOWAIT 3
 
 #if defined(PERL_IMPLICIT_SYS)
-#  undef win32_get_privlib
-#  define win32_get_privlib g_win32_get_privlib
-#  undef win32_get_sitelib
-#  define win32_get_sitelib g_win32_get_sitelib
-#  undef win32_get_vendorlib
-#  define win32_get_vendorlib g_win32_get_vendorlib
 #  undef do_spawn
 #  define do_spawn g_do_spawn
 #  undef getlogin
@@ -204,8 +196,8 @@ get_emd_part(SV **prev_pathp, STRLEN *const len, char *trailing_path, ...)
        if (!ptr || stricmp(ptr+1, strip) != 0) {
            /* ... but not if component matches m|5\.$patchlevel.*| */
            if (!ptr || !(*strip == '5' && *(ptr+1) == '5'
-                         && strncmp(strip, base, baselen) == 0
-                         && strncmp(ptr+1, base, baselen) == 0))
+                         && strnEQ(strip, base, baselen)
+                         && strnEQ(ptr+1, base, baselen)))
            {
                *optr = '/';
                ptr = optr;
@@ -238,7 +230,7 @@ get_emd_part(SV **prev_pathp, STRLEN *const len, char *trailing_path, ...)
 }
 
 char *
-win32_get_privlib(const char *pl, STRLEN *const len)
+win32_get_privlib(WIN32_NO_REGISTRY_M_(const char *pl) STRLEN *const len)
 {
     dTHX;
     char *stdlib = "lib";
@@ -773,8 +765,8 @@ win32_readdir(DIR *dirp)
                 * new name and its null terminator */
                while (newsize > dirp->size) {
                    long curpos = dirp->curr - dirp->start;
+                   Renew(dirp->start, dirp->size * 2, char);
                    dirp->size *= 2;
-                   Renew(dirp->start, dirp->size, char);
                    dirp->curr = dirp->start + curpos;
                }
                strcpy(dirp->start + endpos, ptr);
@@ -1127,7 +1119,7 @@ do_raise(pTHX_ int sig)
            }
        }
     }
-    /* Tell caller to exit thread/process as approriate */
+    /* Tell caller to exit thread/process as appropriate */
     return 1;
 }
 
@@ -1376,7 +1368,7 @@ win32_str_os_error(void *sv, DWORD dwErr)
 {
   dTHX;
 
-  sv_setpvn((SV*)sv, "Error", 5);
+  sv_setpvs((SV*)sv, "Error");
 }
 
 
@@ -2713,6 +2705,7 @@ Perl_win32_term(void)
     OP_REFCNT_TERM;
     PERLIO_TERM;
     MALLOC_TERM;
+    LOCALE_TERM;
 }
 
 void