patch-erts_etc_common_escript_c 876 B

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