about summary refs log tree commit diff
path: root/Src/builtin.c
diff options
context:
space:
mode:
authorPeter Stephenson <p.w.stephenson@ntlworld.com>2013-08-05 19:55:15 +0100
committerPeter Stephenson <p.w.stephenson@ntlworld.com>2013-08-05 19:55:15 +0100
commit9ebf22b34b5e8d4b8bd147a038458d82735d9d2e (patch)
treeea8d86e5d78737f06cbaf924bcc3f01d71cb667f /Src/builtin.c
parent2799e42bdd7fa736bb17ea4ec993a56d14f207b6 (diff)
downloadzsh-9ebf22b34b5e8d4b8bd147a038458d82735d9d2e.tar.gz
zsh-9ebf22b34b5e8d4b8bd147a038458d82735d9d2e.tar.xz
zsh-9ebf22b34b5e8d4b8bd147a038458d82735d9d2e.zip
31631: Use cygwin_conv_path if available.
Prefer it to cygwin_conv_to_posix_path.
Diffstat (limited to 'Src/builtin.c')
-rw-r--r--Src/builtin.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Src/builtin.c b/Src/builtin.c
index ae2e9f676..3159975e3 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -939,11 +939,16 @@ cd_do_chdir(char *cnam, char *dest, int hard)
      * DOS style names with drives in them
      */
     static char buf[PATH_MAX];
+#ifdef HAVE_CYGWIN_CONV_PATH
+    cygwin_conv_path(CCP_WIN_A_TO_POSIX | CCP_RELATIVE, dest, buf,
+		     PATH_MAX);
+#else
 #ifndef _SYS_CYGWIN_H
     void cygwin_conv_to_posix_path(const char *, char *);
 #endif
 
     cygwin_conv_to_posix_path(dest, buf);
+#endif
     dest = buf;
 #endif
     nocdpath = dest[0] == '.' &&