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

ruby-changes:33515

From: nobu <ko1@a...>
Date: Wed, 16 Apr 2014 11:46:58 +0900 (JST)
Subject: [ruby-changes:33515] nobu:r45596 (trunk): dln_find.c: PATH_SEP

nobu	2014-04-16 11:46:51 +0900 (Wed, 16 Apr 2014)

  New Revision: 45596

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

  Log:
    dln_find.c: PATH_SEP
    
    * dln_find.c (dln_find_exe_r): use PATH_SEP instead of hardcoding
      separators.

  Modified files:
    trunk/dln_find.c
Index: dln_find.c
===================================================================
--- dln_find.c	(revision 45595)
+++ dln_find.c	(revision 45596)
@@ -78,11 +78,12 @@ dln_find_exe_r(const char *fname, const https://github.com/ruby/ruby/blob/trunk/dln_find.c#L78
     }
 
     if (!path) {
-#if defined(_WIN32)
-	path = "/usr/local/bin;/usr/ucb;/usr/bin;/bin;.";
-#else
-	path = "/usr/local/bin:/usr/ucb:/usr/bin:/bin:.";
-#endif
+	path =
+	    "/usr/local/bin" PATH_SEP
+	    "/usr/ucb" PATH_SEP
+	    "/usr/bin" PATH_SEP
+	    "/bin" PATH_SEP
+	    ".";
     }
     buf = dln_find_1(fname, path, buf, size, 1 DLN_FIND_EXTRA_ARG);
     if (envpath) free(envpath);

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

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