diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-11-11 12:24:41 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-11-11 12:24:41 +0000 |
commit | 41cae1744fcc9d7dd0c6d332ab3b94eaf954d1dd (patch) | |
tree | ed0cecfdf5bc010c59666daa9ca8df84f74489bf /ruby.c | |
parent | fe9f1e8cf8a1d49c7d4d6baff2f1797ff89e7956 (diff) |
* file.c (file_expand_path): use cygwin_conv_path on cygwin 1.7 or
later.
* ruby.c (push_include_cygwin): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.c')
-rw-r--r-- | ruby.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -255,7 +255,14 @@ push_include_cygwin(const char *path, VALUE (*filter)(VALUE)) p = strncpy(RSTRING_PTR(buf), p, len); } } - if (cygwin_conv_to_posix_path(p, rubylib) == 0) +#ifdef HAVE_CYGWIN_CONV_PATH +#define CONV_TO_POSIX_PATH(p, lib) \ + cygwin_conv_path(CCP_WIN_A_TO_POSIX|CCP_RELATIVE, p, lib, sizeof(lib)) +#else +#define CONV_TO_POSIX_PATH(p, lib) \ + cygwin_conv_to_posix_path(p, lib) +#endif + if (CONV_TO_POSIX_PATH(p, rubylib) == 0) p = rubylib; push_include(p, filter); if (!*s) break; @@ -343,7 +350,7 @@ ruby_init_loadpath_safe(int safe_level) extern const char ruby_initial_load_paths[]; const char *paths = ruby_initial_load_paths; #if defined LOAD_RELATIVE -# if defined HAVE_DLADDR || (defined __CYGWIN__ && defined CCP_WIN_A_TO_POSIX) +# if defined HAVE_DLADDR || defined HAVE_CYGWIN_CONV_PATH # define VARIABLE_LIBPATH 1 # else # define VARIABLE_LIBPATH 0 |