This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Defer loading main module
[perl5.git] / win32 / perlglob.c
index 6413b37..5625294 100644 (file)
@@ -13,7 +13,7 @@ int
 main(int argc, char *argv[])
 {
     int i;
-    int len;
+    size_t len;
     char root[MAX_PATH];
     char *dummy;
     char volname[MAX_PATH];
@@ -21,9 +21,9 @@ main(int argc, char *argv[])
     BOOL downcase = TRUE;
 
     /* check out the file system characteristics */
-
     if (GetFullPathName(".", MAX_PATH, root, &dummy)) {
-       if (dummy = strchr(root, '\\'))
+        dummy = strchr(root,'\\'); 
+       if (dummy)
            *++dummy = '\0';
        if (GetVolumeInformation(root, volname, MAX_PATH, 
                                 &serial, &maxname, &flags, 0, 0)) {
@@ -31,7 +31,7 @@ main(int argc, char *argv[])
        }
     }
 
-       _setmode(_fileno(stdout), _O_BINARY);
+    setmode(fileno(stdout), O_BINARY);
     for (i = 1; i < argc; i++) {
        len = strlen(argv[i]);
        if (downcase)
@@ -41,3 +41,4 @@ main(int argc, char *argv[])
     }
     return 0;
 }
+