summaryrefslogtreecommitdiff
path: root/gdb/remote-fileio.c
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2010-03-01 09:09:23 +0000
committerCorinna Vinschen <corinna@vinschen.de>2010-03-01 09:09:23 +0000
commit90d7b35b968bd2f73ac1f139b3dd0a237fc61277 (patch)
tree85f73fa6e5165c81c72ee986d12912214add5092 /gdb/remote-fileio.c
parent240930a7119a7bfc505ef72ef9581f0d0085a8f5 (diff)
downloadgdb-90d7b35b968bd2f73ac1f139b3dd0a237fc61277.tar.gz
* remote-fileio.c (remote_fileio_func_rename): Use Cygwin 1.7
cygwin_conv_path API rather than the deprecated cygwin_conv_to_full_posix_path. * windows-nat.c: (GetModuleFileNameExA): Undefine for Cygwin. (GetModuleFileNameExW): Define for Cygwin. (get_module_name): Change size of pathbuf to PATH_MAX for Cygwin. Call GetModuleFileNameExW and convert path to POSIX using cygwin_conv_path. (windows_make_so): Always define p. Drop unused variable m. Don't use Win32 functions to check file existance, rather use access on Cygwin. Fetch system directory using GetSystemDirectoryW. Use canonicalize_file_name to get full path. (get_image_name): Use wcstombs, rather than WideCharToMultiByte to convert Unicode pathname to multibyte on Cygwin. Otherwise, use correct target buffer size in call to WideCharToMultiByte. (handle_load_dll): Change size of dll_buf to PATH_MAX for Cygwin. (windows_pid_to_exec_file): Change size of path to PATH_MAX for Cygwin. (windows_create_inferior): Convert all paths and arguments to wchar_t and use CreateProcessW on Cygwin. (_initialize_windows_nat): Disable DOS-style path warning on Cygwin. (bad_GetModuleFileNameExA): Undefine for Cygwin. (bad_GetModuleFileNameExW): Define for Cygwin. (_initialize_loadable): Load GetModuleFileNameExW into dyn_GetModuleFileNameExW on Cygwin. Don't load ANSI function on Cygwin.
Diffstat (limited to 'gdb/remote-fileio.c')
-rw-r--r--gdb/remote-fileio.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gdb/remote-fileio.c b/gdb/remote-fileio.c
index d7215fe605b..4f775ada972 100644
--- a/gdb/remote-fileio.c
+++ b/gdb/remote-fileio.c
@@ -1021,12 +1021,14 @@ remote_fileio_func_rename (char *buf)
errno = EISDIR;
else
{
- char oldfullpath[PATH_MAX + 1];
- char newfullpath[PATH_MAX + 1];
+ char oldfullpath[PATH_MAX];
+ char newfullpath[PATH_MAX];
int len;
- cygwin_conv_to_full_posix_path (oldpath, oldfullpath);
- cygwin_conv_to_full_posix_path (newpath, newfullpath);
+ cygwin_conv_path (CCP_WIN_A_TO_POSIX, oldpath, oldfullpath,
+ PATH_MAX);
+ cygwin_conv_path (CCP_WIN_A_TO_POSIX, newpath, newfullpath,
+ PATH_MAX);
len = strlen (oldfullpath);
if (newfullpath[len] == '/'
&& !strncmp (oldfullpath, newfullpath, len))