[前][次][番号順一覧][スレッド一覧]

ruby-changes:39953

From: nobu <ko1@a...>
Date: Mon, 5 Oct 2015 15:30:01 +0900 (JST)
Subject: [ruby-changes:39953] nobu:r52034 (trunk): ruby-runner.c.in: make macros

nobu	2015-10-05 15:29:54 +0900 (Mon, 05 Oct 2015)

  New Revision: 52034

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52034

  Log:
    ruby-runner.c.in: make macros
    
    * template/ruby-runner.c.in (PATH_SEP, RUBY_INSTALL_NAME): move
      configured values as macros.

  Modified files:
    trunk/template/ruby-runner.c.in
Index: template/ruby-runner.c.in
===================================================================
--- template/ruby-runner.c.in	(revision 52033)
+++ template/ruby-runner.c.in	(revision 52034)
@@ -5,6 +5,8 @@ https://github.com/ruby/ruby/blob/trunk/template/ruby-runner.c.in#L5
 
 #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) https://github.com/ruby/ruby/blob/trunk/template/ruby-runner.c.in#L17
 	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) https://github.com/ruby/ruby/blob/trunk/template/ruby-runner.c.in#L25
 	libpath = builddir;
     }
     setenv(LIBPATHENV, libpath, 1);
-    execv(BUILDDIR"/@RUBY_BASE_NAME@", argv);
+    execv(BUILDDIR"/"RUBY_INSTALL_NAME, argv);
     return -1;
 }

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]