1234567891011121314151617181920212223242526 |
- $OpenBSD: patch-erts_etc_common_escript_c,v 1.1 2015/06/25 13:16:08 jasper Exp $
- Let escript handle versioned binaries.
- --- erts/etc/common/escript.c.orig Thu Jan 23 17:47:46 2014
- +++ erts/etc/common/escript.c Thu Jun 25 12:43:06 2015
- @@ -54,7 +54,7 @@ static int eargc; /* Number of arguments in eargv. */
- # define DIRSEPSTR "/"
- # define PATHSEPSTR ":"
- # define PMAX PATH_MAX
- -# define ERL_NAME "erl"
- +# define ERL_NAME "erl${MAJ_V}"
- #endif
-
- #define UNSHIFT(s) eargc++, eargv--; eargv[0] = QUOTE(s)
- @@ -380,7 +380,8 @@ main(int argc, char** argv)
- if ( (_stricmp(basename, "escript.exe") == 0)
- ||(_stricmp(basename, "escript") == 0)) {
- #else
- - if (strcmp(basename, "escript") == 0) {
- + if ( (strcmp(basename, "escript") == 0)
- + ||(strcmp(basename, "escript${MAJ_V}") == 0)) {
- #endif
- /*
- * Locate all options before the script name.
|