Change 31347 by [EMAIL PROTECTED] on 2007/06/07 11:48:47

        Stop VC++ from warning "all references to 'SHELL32.dll' discarded
        by /OPT:REF" by removing the only reference to a SHELL32.dll function
        (namely, CommandLineToArgvW(), called from win32_argv2utf8(), which
        isn't actually used anywhere so delete it).
        
        That then caused the warning "/DELAYLOAD:shell32.dll ignored; no
        imports found from shell32.dll", so remove that /DELAYLOAD option too.

Affected files ...

... //depot/perl/win32/Makefile#337 edit
... //depot/perl/win32/makefile.mk#375 edit
... //depot/perl/win32/win32.c#288 edit
... //depot/perl/win32/win32.h#128 edit
... //depot/perl/win32/wince.c#5 edit

Differences ...

==== //depot/perl/win32/Makefile#337 (text) ====
Index: perl/win32/Makefile
--- perl/win32/Makefile#336~31344~      2007-06-06 09:48:46.000000000 -0700
+++ perl/win32/Makefile 2007-06-07 04:48:47.000000000 -0700
@@ -364,7 +364,7 @@
 # version of 8.x can.)
 !IF "$(CCTYPE)" == "MSVC60" || "$(CCTYPE)" == "MSVC70" || \
     "$(CCTYPE)" == "MSVC80" || "$(CCTYPE)" == "MSVC80FREE"
-DELAYLOAD      = -DELAYLOAD:ws2_32.dll -DELAYLOAD:shell32.dll delayimp.lib
+DELAYLOAD      = -DELAYLOAD:ws2_32.dll delayimp.lib
 !ENDIF
 
 # Visual C++ 2005 (VC++ 8.x) creates manifest files for EXEs and DLLs. These

==== //depot/perl/win32/makefile.mk#375 (text) ====
Index: perl/win32/makefile.mk
--- perl/win32/makefile.mk#374~31344~   2007-06-06 09:48:46.000000000 -0700
+++ perl/win32/makefile.mk      2007-06-07 04:48:47.000000000 -0700
@@ -363,7 +363,7 @@
 # version of 8.x can.)
 .IF "$(CCTYPE)" == "MSVC60" || "$(CCTYPE)" == "MSVC70" \
     "$(CCTYPE)" == "MSVC80" || "$(CCTYPE)" == "MSVC80FREE"
-DELAYLOAD      *= -DELAYLOAD:ws2_32.dll -DELAYLOAD:shell32.dll delayimp.lib
+DELAYLOAD      *= -DELAYLOAD:ws2_32.dll delayimp.lib
 .ENDIF
 
 # Visual C++ 2005 (VC++ 8.x) creates manifest files for EXEs and DLLs. These

==== //depot/perl/win32/win32.c#288 (text) ====
Index: perl/win32/win32.c
--- perl/win32/win32.c#287~31211~       2007-05-13 09:35:02.000000000 -0700
+++ perl/win32/win32.c  2007-06-07 04:48:47.000000000 -0700
@@ -60,13 +60,6 @@
 #include "EXTERN.h"
 #include "perl.h"
 
-/* GCC-2.95.2/Mingw32-1.1 forgot the WINAPI on CommandLineToArgvW() */
-#if defined(__MINGW32__) && (__MINGW32_MAJOR_VERSION==1)
-#  include <shellapi.h>
-#else
-EXTERN_C LPWSTR* WINAPI CommandLineToArgvW(LPCWSTR lpCommandLine, int * 
pNumArgs);
-#endif
-
 #define NO_XSLOCKS
 #define PERL_NO_GET_CONTEXT
 #include "XSUB.h"
@@ -4986,22 +4979,3 @@
        *argv++ = Nullch;
     }
 }
-
-void
-win32_argv2utf8(int argc, char** argv)
-{
-    dTHX;
-    char* psz;
-    int length, wargc;
-    LPWSTR* lpwStr = CommandLineToArgvW(GetCommandLineW(), &wargc);
-    if (lpwStr && argc) {
-       while (argc--) {
-           length = WideCharToMultiByte(CP_UTF8, 0, lpwStr[--wargc], -1, NULL, 
0, NULL, NULL);
-           Newxz(psz, length, char);
-           WideCharToMultiByte(CP_UTF8, 0, lpwStr[wargc], -1, psz, length, 
NULL, NULL);
-           argv[argc] = psz;
-       }
-       call_atexit(win32_free_argvw, argv);
-    }
-    GlobalFree((HGLOBAL)lpwStr);
-}

==== //depot/perl/win32/win32.h#128 (text) ====
Index: perl/win32/win32.h
--- perl/win32/win32.h#127~31271~       2007-05-25 02:18:45.000000000 -0700
+++ perl/win32/win32.h  2007-06-07 04:48:47.000000000 -0700
@@ -342,7 +342,6 @@
 extern char *          win32_get_vendorlib(const char *pl);
 extern int             IsWin95(void);
 extern int             IsWinNT(void);
-extern void            win32_argv2utf8(int argc, char** argv);
 
 #ifdef PERL_IMPLICIT_SYS
 extern void            win32_delete_internal_host(void *h);

==== //depot/perl/win32/wince.c#5 (text) ====
Index: perl/win32/wince.c
--- perl/win32/wince.c#4~29465~ 2006-12-05 01:41:44.000000000 -0800
+++ perl/win32/wince.c  2007-06-07 04:48:47.000000000 -0700
@@ -2844,14 +2844,6 @@
     }
 }
 
-void
-win32_argv2utf8(int argc, char** argv)
-{
-  /* do nothing, since we're not aware of command line arguments
-   * currently ...
-   */
-}
-
 #if 0
 void
 Perl_sys_intern_clear(pTHX)
End of Patch.

Reply via email to