https://github.com/rdboisvert/Win32-LongPath is the repository for this module. I'm almost glad for the opportunity to clone this, as using git was part of the exercises for _Intermediate Perl_, as well as using find statements. The readme says to dmake the product:
C:\Users\Fred\Documents\Win32-LongPath-master\Win32-LongPath-master>di +r Volume in drive C is Windows8_OS Volume Serial Number is 3052-CD20 Directory of C:\Users\Fred\Documents\Win32-LongPath-master\Win32-Long +Path-master 12/20/2016 03:14 PM <DIR> . 12/20/2016 03:14 PM <DIR> .. 12/20/2016 03:14 PM 1,170 Changes 12/20/2016 03:14 PM <DIR> inc 12/20/2016 03:14 PM <DIR> lib 12/20/2016 03:14 PM 1,181 Makefile.PL 12/20/2016 03:14 PM 421 MANIFEST 12/20/2016 03:14 PM 41 MANIFEST.SKIP 12/20/2016 03:14 PM 877 META.yml 12/20/2016 03:14 PM 2,389 README 12/20/2016 03:14 PM <DIR> t 12/20/2016 03:14 PM <DIR> xs 6 File(s) 6,079 bytes 6 Dir(s) 39,420,436,480 bytes free C:\Users\Fred\Documents\Win32-LongPath-master\Win32-LongPath-master>pe +rl Makefile.PL Writing ppport.h Checking if your kit is complete... Looks good Generating a dmake-style Makefile Writing Makefile for Win32::LongPath Writing MYMETA.yml and MYMETA.json C:\Users\Fred\Documents\Win32-LongPath-master\Win32-LongPath-master>dm +ake test Running Mkbootstrap for LongPath () "C:\Strawberry\perl\bin\perl.exe" "-Iinc" -MExtUtils::Command -e chmod + -- 644 "LongPath.bs" "C:\Strawberry\perl\bin\perl.exe" "-Iinc" -MExtUtils::Command::MM -e c +p_nonempty -- LongPath.bs blib\arch\auto\Win32\LongPath\LongPath.bs 6 +44 "C:\Strawberry\perl\bin\perl.exe" "-Iinc" "C:\Strawberry\perl\lib\ExtU +tils\xsubpp" -typemap C:\STRAWB~1\perl\lib\ExtUtils\typemap xs\Long +Path.xs > xs\LongPath.xsc "C:\Strawberry\perl\bin\perl.exe" "-Iinc" -MExtUtils::Command -e mv -- + xs\LongPath.xsc xs\LongPath.c gcc -c "-I." "-I." -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -DPERL_ +TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fwrapv +-fno-strict-aliasing -mms-bitfields -Wall -W -Wno-comment -s -O2 + -DVERSION=\"1.07\" -DXS_VERSION=\"1.07\" -o xs\LongPath.o "-IC: +\STRAWB~1\perl\lib\CORE" -DUSE_PPPORT -DWINVER=0x0a00 -D_WIN32_WINNT +=0x0a00 xs\LongPath.c In file included from C:/STRAWB~1/perl/lib/CORE/hv.h:631, from C:/STRAWB~1/perl/lib/CORE/perl.h:3904, from xs\\LongPath.xs:21: C:/STRAWB~1/perl/lib/CORE/hv_func.h: In function `S_perl_hash_murmur3' +: C:/STRAWB~1/perl/lib/CORE/hv_func.h:403: warning: cast from pointer to + integer of different size xs\\LongPath.xs: In function `MakeSymbolicLink': xs\\LongPath.xs:79: warning: implicit declaration of function `CreateS +ymbolicLinkW' xs\\LongPath.xs:80: error: `SYMBOLIC_LINK_FLAG_DIRECTORY' undeclared ( +first use in this function) xs\\LongPath.xs:80: error: (Each undeclared identifier is reported onl +y once xs\\LongPath.xs:80: error: for each function it appears in.) xs\\LongPath.xs: In function `XS_Win32__LongPath_find_close': xs\\LongPath.xs:179: warning: cast to pointer from integer of differen +t size xs\\LongPath.xs: In function `XS_Win32__LongPath_find_first_file': xs\\LongPath.xs:191: warning: cast from pointer to integer of differen +t size xs\\LongPath.xs: In function `XS_Win32__LongPath_find_next_file': xs\\LongPath.xs:281: warning: cast to pointer from integer of differen +t size dmake.exe: Error code 129, while making 'xs\LongPath.o' C:\Users\Fred\Documents\Win32-LongPath-master\Win32-LongPath-master>
What this shows is the exact same litany of errors I got yesterday with cpan. This will mean something to a prognosticator. Let me first trot out the actual command:
gcc -c "-I." "-I." -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fwrapv -fno-strict-aliasing -mms-bitfields -Wall -W -Wno-comment -s -O2 -DVERSION=\"1.07\" -DXS_VERSION=\"1.07\" -o xs\LongPath.o "-IC:\STRAWB~1\perl\lib\CORE" -DUSE_PPPORT -DWINVER=0x0a00 -D_WIN32_WINNT=0x0a00 xs\LongPath.cI know C well enough to see that this seems syntactic, whilst not really knowing more than half of the flags. (You tell me what -DCONSERVATIVE is, and I'll be impressed.) The first errors cite hv.h, which seems to be how perl defines hashes. I believe this is how perl pre-declares C to achieve that data structure:
/* hv.h * * Copyright (C) 1991, 1992, 1993, 1996, 1997, 1998, 1999, * 2000, 2001, 2002, 2003, 2005, 2006, 2007, 2008, by Larry Wall an +d others * * You may distribute under the terms of either the GNU General Pub +lic * License or the Artistic License, as specified in the README file +. * */ /* These control hash traversal randomization and the environment vari +able PERL_PERTURB_KEYS. * Currently disabling this functionality will break a few tests, but +should otherwise work fine. * See perlrun for more details. */ #if defined(PERL_PERTURB_KEYS_DISABLED) # define PL_HASH_RAND_BITS_ENABLED 0 # define PERL_HASH_ITER_BUCKET(iter) ((iter)->xhv_riter) #else # define PERL_HASH_RANDOMIZE_KEYS 1 # if defined(PERL_PERTURB_KEYS_RANDOM) # define PL_HASH_RAND_BITS_ENABLED 1 # elif defined(PERL_PERTURB_KEYS_DETERMINISTIC) # define PL_HASH_RAND_BITS_ENABLED 2 # else # define USE_PERL_PERTURB_KEYS 1 # define PL_HASH_RAND_BITS_ENABLED PL_hash_rand_bits_enabled # endif # define PERL_HASH_ITER_BUCKET(iter) (((iter)->xhv_riter) ^ ((i +ter)->xhv_rand)) #endif /* entry in hash value chain */ struct he { /* Keep hent_next first in this structure, because sv_free_arenas +take advantage of this to share code between the he arenas and the S +V body arenas */ HE *hent_next; /* next entry in chain */ HEK *hent_hek; /* hash key */ union { SV *hent_val; /* scalar value that was hashed */ Size_t hent_refcount; /* references for this shared hash key + */ } he_valu; }; /* hash key -- defined separately for use as shared pointer */ struct hek { U32 hek_hash; /* hash of key */ I32 hek_len; /* length of hash key */ char hek_key[1]; /* variable-length hash key */ /* the hash-key is \0-terminated */ /* after the \0 there is a byte for flags, such as whether the key is UTF-8 */ }; struct shared_he { struct he shared_he_he; struct hek shared_he_hek; }; /* Subject to change. Don't access this directly. Use the funcs in mro_core.c */
The way I read it, gcc fails in the early phases because we've got the warnings/strictness dialed up pretty darn high. So I'm twice a loser with installing this mod, once with cpan, u takzhe dmaking as per README. So those are my woes that I offer undo the gods of perl. I didn't wash out completely, though and cleared one variety of diagnostic by inclusion of:
return unless (-f $file);But I achieved something else with the part of the script that doesn't depend on cpan. I downloaded the module at pi time, and put it in my local::lib for strawberry perl, which was set to "My Documents". Lo and behold, they are showing up only under 'Documents', so the warning that I can't open the directory "My Documents" doesn't correspond to something that went unsearched. I'd still like to handle the event so my script is clear of warnings.
As a bonus insight, I got to see where the machine model for C stopped. It's close to M = .19 in these data:
C:/Users/Fred/text7.txt text7.txt: M age in days: 0.0024 C:/Users/Fred/text8.txt text8.txt: M age in days: 0.0000 C:/Users/Fred/virus7.pl virus7.pl: M age in days: 0.0003 C:/Users/Fred/Desktop/new 2.txt new 2.txt: M age in days: 0.0087 C:/Users/Fred/new 3.txt new 3.txt: M age in days: 0.1398 C:/Users/Fred/text7.txt text7.txt: M age in days: 0.0138 C:/Users/Fred/text8.txt text8.txt: M age in days: 0.0109 C:/Users/Fred/virus7.pl virus7.pl: M age in days: 0.0009 C:/Users/Fred/Desktop/new 2.txt new 2.txt: M age in days: 0.0201 C:/Users/Fred/Documents/Win32-LongPath-master.zip Win32-LongPath-master.zip: M age in days: 0.1961 C:/Users/Fred/Documents/Win32-LongPath-master/Win32-LongPath-master/Ch +anges Changes: M age in days: 0.1929 C:/Users/Fred/Documents/Win32-LongPath-master/Win32-LongPath-master/Lo +ngPath.bs LongPath.bs: M age in days: 0.1899 C:/Users/Fred/Documents/Win32-LongPath-master/Win32-LongPath-master/Ma +kefile Makefile: M age in days: 0.1908 C:/Users/Fred/Documents/Win32-LongPath-master/Win32-LongPath-master/Ma +kefile.PL Makefile.PL: M age in days: 0.1929 C:/Users/Fred/Documents/Win32-LongPath-master/Win32-LongPath-master/MA +NIFEST MANIFEST: M age in days: 0.1929 C:/Users/Fred/Documents/Win32-LongPath-master/Win32-LongPath-master/MA +NIFEST.SKIP MANIFEST.SKIP: M age in days: 0.1929 C:/Users/Fred/Documents/Win32-LongPath-master/Win32-LongPath-master/ME +TA.yml META.yml: M age in days: 0.1929 C:/Users/Fred/Documents/Win32-LongPath-master/Win32-LongPath-master/MY +META.json MYMETA.json: M age in days: 0.1908 C:/Users/Fred/Documents/Win32-LongPath-master/Win32-LongPath-master/MY +META.yml MYMETA.yml: M age in days: 0.1908 C:/Users/Fred/Documents/Win32-LongPath-master/Win32-LongPath-master/pp +port.h ppport.h: M age in days: 0.1908 C:/Users/Fred/Documents/Win32-LongPath-master/Win32-LongPath-master/RE +ADME README: M age in days: 0.1929 C:/Users/Fred/Documents/Win32-LongPath-master/Win32-LongPath-master/bl +ib/arch/.exists .exists: M age in days: 0.1899 C:/Users/Fred/Documents/Win32-LongPath-master/Win32-LongPath-master/bl +ib/arch/auto/Win32/LongPath/.exists .exists: M age in days: 0.1899 C:/Users/Fred/Documents/Win32-LongPath-master/Win32-LongPath-master/bl +ib/bin/.exists .exists: M age in days: 0.1899 C:/Users/Fred/Documents/Win32-LongPath-master/Win32-LongPath-master/bl +ib/lib/auto/Win32/LongPath/.exists .exists: M age in days: 0.1899 C:/Users/Fred/Documents/Win32-LongPath-master/Win32-LongPath-master/bl +ib/lib/Win32/.exists .exists: M age in days: 0.1899 C:/Users/Fred/Documents/Win32-LongPath-master/Win32-LongPath-master/bl +ib/man1/.exists .exists: M age in days: 0.1899 C:/Users/Fred/Documents/Win32-LongPath-master/Win32-LongPath-master/bl +ib/man3/.exists .exists: M age in days: 0.1899 C:/Users/Fred/Documents/Win32-LongPath-master/Win32-LongPath-master/bl +ib/script/.exists .exists: M age in days: 0.1899 C:/Users/Fred/Documents/Win32-LongPath-master/Win32-LongPath-master/in +c/Module/Install.pm Install.pm: M age in days: 0.1929 C:/Users/Fred/Documents/Win32-LongPath-master/Win32-LongPath-master/in +c/Module/Install/Base.pm Base.pm: M age in days: 0.1929 C:/Users/Fred/Documents/Win32-LongPath-master/Win32-LongPath-master/in +c/Module/Install/Can.pm Can.pm: M age in days: 0.1929 C:/Users/Fred/Documents/Win32-LongPath-master/Win32-LongPath-master/in +c/Module/Install/Fetch.pm Fetch.pm: M age in days: 0.1929 C:/Users/Fred/Documents/Win32-LongPath-master/Win32-LongPath-master/in +c/Module/Install/Makefile.pm Makefile.pm: M age in days: 0.1929 C:/Users/Fred/Documents/Win32-LongPath-master/Win32-LongPath-master/in +c/Module/Install/Metadata.pm Metadata.pm: M age in days: 0.1929 C:/Users/Fred/Documents/Win32-LongPath-master/Win32-LongPath-master/in +c/Module/Install/Win32.pm Win32.pm: M age in days: 0.1929 C:/Users/Fred/Documents/Win32-LongPath-master/Win32-LongPath-master/in +c/Module/Install/With.pm With.pm: M age in days: 0.1929 C:/Users/Fred/Documents/Win32-LongPath-master/Win32-LongPath-master/in +c/Module/Install/WriteAll.pm WriteAll.pm: M age in days: 0.1929 C:/Users/Fred/Documents/Win32-LongPath-master/Win32-LongPath-master/in +c/Module/Install/XSUtil.pm XSUtil.pm: M age in days: 0.1929 C:/Users/Fred/Documents/Win32-LongPath-master/Win32-LongPath-master/li +b/Win32/LongPath.pm LongPath.pm: M age in days: 0.1929 C:/Users/Fred/Documents/Win32-LongPath-master/Win32-LongPath-master/t/ +LongPath.t LongPath.t: M age in days: 0.1929 C:/Users/Fred/Documents/Win32-LongPath-master/Win32-LongPath-master/xs +/LongPath.c LongPath.c: M age in days: 0.1899 C:/Users/Fred/Documents/Win32-LongPath-master/Win32-LongPath-master/xs +/LongPath.xs LongPath.xs: M age in days: 0.1929 C:/Users/Fred/Documents/Win32-LongPath-master/Win32-LongPath-master/xs +/typemap typemap: M age in days: 0.1929
Seek help with LongPath.
In reply to Re^6: how to handle the warnings in a find statement
by Aldebaran
in thread how to handle the warnings in a find statement
by Aldebaran
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |