Mercurial > hg > xemacs-beta
comparison src/realpath.c @ 4834:b3ea9c582280
Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Tue, 12 Jan 2010 01:38:04 -0600 |
parents | 19d70297d866 |
children | 19a72041c5ed |
comparison
equal
deleted
inserted
replaced
4833:4dd2389173fc | 4834:b3ea9c582280 |
---|---|
138 #else /* !REALPATH_CORRECTS_CASE */ | 138 #else /* !REALPATH_CORRECTS_CASE */ |
139 return qxe_readlink (name, buf, (size_t) size); | 139 return qxe_readlink (name, buf, (size_t) size); |
140 #endif /* REALPATH_CORRECTS_CASE */ | 140 #endif /* REALPATH_CORRECTS_CASE */ |
141 #else /* defined (WIN32_ANY) */ | 141 #else /* defined (WIN32_ANY) */ |
142 # ifdef CYGWIN | 142 # ifdef CYGWIN |
143 Ibyte *tmp; | |
144 int n = qxe_readlink (name, buf, (size_t) size); | 143 int n = qxe_readlink (name, buf, (size_t) size); |
145 if (n >= 0 || errno != EINVAL) | 144 if (n >= 0 || errno != EINVAL) |
146 return n; | 145 return n; |
147 | 146 |
148 /* The file may exist, but isn't a symlink. Try to find the | 147 /* The file may exist, but isn't a symlink. Try to find the |
149 right name. */ | 148 right name. */ |
150 tmp = | 149 LOCAL_FILE_FORMAT_TO_INTERNAL_MSWIN (name, name); |
151 alloca_ibytes (cygwin_posix_to_win32_path_list_buf_size ((char *) name)); | |
152 cygwin_posix_to_win32_path_list ((char *) name, (char *) tmp); | |
153 name = tmp; | |
154 # else | 150 # else |
155 if (mswindows_shortcuts_are_symlinks) | 151 if (mswindows_shortcuts_are_symlinks) |
156 { | 152 { |
157 Ibyte *tmp = mswindows_read_link (name); | 153 Ibyte *tmp = mswindows_read_link (name); |
158 | 154 |