----- Original Message ----- From: "Jan Dubois" <jand@activestate.com> > Could you try the attached patch to see if it normalizes the Perl behavior > regarding $^X and @INC again? > --- perl/5.10/win32/win32.c.~1~ Mon Aug 10 17:47:09 2009 > +++ perl/5.10/win32/win32.c Mon Aug 10 17:47:09 2009 > @@ -231,6 +231,13 @@ > * explicitly by LoadLibrary() with a relative path. */ > GetFullPathNameW(modulename, sizeof(fullname)/sizeof(WCHAR), > fullname, NULL); > > + /* Make sure we start with the long path name of the module > because we > + * later scan for pathname components to match "5.xx" to locate > + * compatible sitelib directories, and the short pathname might > mangle > + * this path segment (e.g. by removing the dot on NTFS to > something > + * like "5xx~1.yy") */ > + GetLongPathNameW(modulename, modulename, > sizeof(modulename)/sizeof(WCHAR)); > + > /* remove \\?\ prefix */ > if (memcmp(fullname, L"\\\\?\\", 4*sizeof(WCHAR)) == 0) > memmove(fullname, fullname+4, > (wcslen(fullname+4)+1)*sizeof(WCHAR)); > End of Patch. No good, I'm afraid. First problem is that we can't make miniperl.exe: ############################################ .\mini\win32.o:win32.c:(.text+0x53b3): undefined reference to `GetLongPathNameW' collect2: ld returned 1 exit status dmake: Error code 129, while making '..\miniperl.exe' ############################################ I've just been told (on mingw-users list) that for this to work, we need to have: #define _WIN32_WINNT 0x0500 I find that works fine if inserted into win32.c before windows.h gets included. MinGW's windef.h has: #ifndef _WIN32_WINNT #define _WIN32_WINNT WINVER /* * There may be the need to define _WIN32_WINNT to a value different from * the value of WINVER. I don't have any example of why you would do that. * However, if you must then define _WIN32_WINNT to the value required before * including windows.h or any other method of including the windef.h header. */ #endif WINVER is 0x0400, btw. But I wonder if my alteration to win32.c is portable. Perhaps it needs to be conditionalised in some way ? This isn't an issue with my VC 7.0 installation as WINVER is there defined to be 0x0500. (Maybe I should be altering the WINVER value in MinGW's windef.h instead of changing anything in win32.c ?) But ... after all that, @INC is still broken anyway (in the same way as before) ! Back to square 1. Cheers, Rob