diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-05-09 20:39:11 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-05-09 20:39:11 +0000 |
commit | b5ce6607ab4b332cfeb9911174599b4208a0bc29 (patch) | |
tree | 5e8ba9e220cb2d9200968bdb7816921f94b44cf1 /win32 | |
parent | 8efb3254a3038b56a803e45ffac89f07da99a3a7 (diff) | |
download | perl-b5ce6607ab4b332cfeb9911174599b4208a0bc29.tar.gz |
normalize $^X to full pathname on win32
p4raw-id: //depot/perl@3350
Diffstat (limited to 'win32')
-rw-r--r-- | win32/runperl.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/win32/runperl.c b/win32/runperl.c index 8cf521d4ea..20423c7660 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); |