aboutsummaryrefslogtreecommitdiffstats
path: root/erts/etc
diff options
context:
space:
mode:
authorDave Cottlehuber <[email protected]>2011-11-25 19:17:11 +0100
committerDave Cottlehuber <[email protected]>2011-11-25 19:17:11 +0100
commita50b2858ab9e0dd7cc2898696a5ab119a6b73a14 (patch)
tree161d1eb14da2fb3eca6c6c89b67a9527a314ae96 /erts/etc
parent7292c3d9f5285592aa4de996f6f106cd365d7895 (diff)
downloadotp-a50b2858ab9e0dd7cc2898696a5ab119a6b73a14.tar.gz
otp-a50b2858ab9e0dd7cc2898696a5ab119a6b73a14.tar.bz2
otp-a50b2858ab9e0dd7cc2898696a5ab119a6b73a14.zip
add escript win32 alternative invocation (thanks Pierre Rouleau)
On Windows, escript may be passed different arvg[0] values depending on how it was started up. This patch allows for escript to be started as "escript.exe" (current behaviour) and also "escript" which is more likely when called from the default Windows cmd.exe shell.
Diffstat (limited to 'erts/etc')
-rw-r--r--erts/etc/common/escript.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/erts/etc/common/escript.c b/erts/etc/common/escript.c
index 6ed79c91e3..e70c95b67c 100644
--- a/erts/etc/common/escript.c
+++ b/erts/etc/common/escript.c
@@ -377,7 +377,8 @@ main(int argc, char** argv)
last_opt = argv;
#ifdef __WIN32__
- if (_stricmp(basename, "escript.exe") == 0) {
+ if ( (_stricmp(basename, "escript.exe") == 0)
+ ||(_stricmp(basename, "escript") == 0)) {
#else
if (strcmp(basename, "escript") == 0) {
#endif