summaryrefslogtreecommitdiff
path: root/win32/win32.c
diff options
context:
space:
mode:
authorSteve Hay <SteveHay@planit.com>2007-06-07 11:48:47 +0000
committerSteve Hay <SteveHay@planit.com>2007-06-07 11:48:47 +0000
commitd1a8253e39cd846de74220a6e911461d2a431d3a (patch)
treef680e6bce0a16af19c92a50d9616e1c97dc8b98f /win32/win32.c
parentc6f8b1d0e0749fa67e4e8a0807f0aae773f2ecf8 (diff)
downloadperl-d1a8253e39cd846de74220a6e911461d2a431d3a.tar.gz
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. p4raw-id: //depot/perl@31347
Diffstat (limited to 'win32/win32.c')
-rw-r--r--win32/win32.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/win32/win32.c b/win32/win32.c
index 21be48c032..1c6c17e4c8 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -60,13 +60,6 @@ typedef struct {
#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 @@ win32_free_argvw(pTHX_ void *ptr)
*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);
-}