From: Gurusamy Sarathy Date: Sun, 9 May 1999 20:39:11 +0000 (+0000) Subject: normalize $^X to full pathname on win32 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b5ce6607ab4b332cfeb9911174599b4208a0bc29;p=p5sagit%2Fp5-mst-13.2.git normalize $^X to full pathname on win32 p4raw-id: //depot/perl@3350 --- diff --git a/win32/runperl.c b/win32/runperl.c index 8cf521d..20423c7 100644 --- a/win32/runperl.c +++ b/win32/runperl.c @@ -41,8 +41,11 @@ main(int argc, char **argv, char **env) * want to free() argv after main() returns. As luck would have it, * Borland's CRT does the right thing to argv[0] already. */ char szModuleName[MAX_PATH]; + char *ptr; GetModuleFileName(NULL, szModuleName, sizeof(szModuleName)); + (void)GetFullPathName(szModuleName, sizeof(szModuleName), + szModuleName, &ptr); argv[0] = szModuleName; #endif @@ -87,7 +90,11 @@ main(int argc, char **argv, char **env) * want to free() argv after main() returns. As luck would have it, * Borland's CRT does the right thing to argv[0] already. */ char szModuleName[MAX_PATH]; + char *ptr; + GetModuleFileName(NULL, szModuleName, sizeof(szModuleName)); + (void)GetFullPathName(szModuleName, sizeof(szModuleName), + szModuleName, &ptr); argv[0] = szModuleName; #endif return RunPerl(argc, argv, env, (void*)0);