From a50b2858ab9e0dd7cc2898696a5ab119a6b73a14 Mon Sep 17 00:00:00 2001 From: Dave Cottlehuber Date: Fri, 25 Nov 2011 19:17:11 +0100 Subject: 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. --- erts/etc/common/escript.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'erts') 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 -- cgit v1.2.3