summaryrefslogtreecommitdiff
path: root/template
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-05 06:29:54 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-05 06:29:54 +0000
commit24e4a93edc1708f73accd7de477adc3a8e807aaf (patch)
treebe7cd1d5f5ba7a283cec67918b2024282dabd777 /template
parent12c367ca505f3aa829dba6770dc575b5432d3caa (diff)
ruby-runner.c.in: make macros
* template/ruby-runner.c.in (PATH_SEP, RUBY_INSTALL_NAME): move configured values as macros. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'template')
-rw-r--r--template/ruby-runner.c.in6
1 files changed, 4 insertions, 2 deletions
diff --git a/template/ruby-runner.c.in b/template/ruby-runner.c.in
index 95cb1e3ef1..c72a56bbbf 100644
--- a/template/ruby-runner.c.in
+++ b/template/ruby-runner.c.in
@@ -5,6 +5,8 @@
#define BUILDDIR "@abs_top_builddir@"
#define LIBPATHENV "@LIBPATHENV@"
+#define PATH_SEP '@PATH_SEPARATOR@'
+#define RUBY_INSTALL_NAME "@RUBY_BASE_NAME@"
int
main(int argc, char **argv)
@@ -15,7 +17,7 @@ main(int argc, char **argv)
size_t n = strlen(libpath);
char *e = malloc(sizeof(builddir)+n+1);
memcpy(e, builddir, sizeof(builddir)-1);
- e[sizeof(builddir)-1] = '@PATH_SEPARATOR@';
+ e[sizeof(builddir)-1] = PATH_SEP;
memcpy(e+sizeof(builddir), libpath, n+1);
libpath = e;
}
@@ -23,6 +25,6 @@ main(int argc, char **argv)
libpath = builddir;
}
setenv(LIBPATHENV, libpath, 1);
- execv(BUILDDIR"/@RUBY_BASE_NAME@", argv);
+ execv(BUILDDIR"/"RUBY_INSTALL_NAME, argv);
return -1;
}