This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFC 8/9] Unify windows specifics into common/windows-hdep files
- From: "Pierre Muller" <pierre dot muller at ics-cnrs dot unistra dot fr>
- To: <gdb-patches at sourceware dot org>
- Date: Wed, 30 Mar 2011 14:05:13 +0200
- Subject: [RFC 8/9] Unify windows specifics into common/windows-hdep files
Patch that adapts gdbserver win32-low.c source code
to new windows-hdep code.
Pierre Muller
GDB pascal language maintainer
ChangeLog entry:
2011-03-30 Pierre Muller <muller@ics.u-strasbg.fr>
* remote-fileio.c: Remove Cygwin specific macros, replaced by use of
windows-hdep code.
(windows-hdep.h): New include.
(remote_fileio_func_rename): Adapt to windows-hdep code.
diff --git a/gdb/remote-fileio.c b/gdb/remote-fileio.c
index 68298e7..dd2c5ba 100644
--- a/gdb/remote-fileio.c
+++ b/gdb/remote-fileio.c
@@ -36,16 +36,9 @@
#include <fcntl.h>
#include <sys/time.h>
#ifdef __CYGWIN__
-#include <sys/cygwin.h> /* For
cygwin_conv_to_full_posix_path. */
-#include <cygwin/version.h>
-#if
CYGWIN_VERSION_DLL_MAKE_COMBINED(CYGWIN_VERSION_API_MAJOR,CYGWIN_VERSION_API
_MINOR) < 181
-# define CCP_POSIX_TO_WIN_A 0
-# define CCP_WIN_A_TO_POSIX 2
-# define cygwin_conv_path(op, from, to, size) \
- (op == CCP_WIN_A_TO_POSIX) ? \
- cygwin_conv_to_full_posix_path (from, to) : \
- cygwin_conv_to_win32_path (from, to)
-#endif
+#include <sys/cygwin.h>
+/* For cygwin path conversions. */
+#include "windows-hdep.h"
#endif
#include <signal.h>
@@ -1016,10 +1009,10 @@ remote_fileio_func_rename (char *buf)
char newfullpath[PATH_MAX];
int len;
- cygwin_conv_path (CCP_WIN_A_TO_POSIX, oldpath,
oldfullpath,
- PATH_MAX);
- cygwin_conv_path (CCP_WIN_A_TO_POSIX, newpath,
newfullpath,
- PATH_MAX);
+ windows_conv_path (WINDOWS_NATIVE_A_TO_POSIX, oldpath,
+ oldfullpath, PATH_MAX);
+ windows_conv_path (WINDOWS_NATIVE_A_TO_POSIX, newpath,
+ newfullpath, PATH_MAX);
len = strlen (oldfullpath);
if (IS_DIR_SEPARATOR (newfullpath[len])
&& !filename_ncmp (oldfullpath, newfullpath, len))
--
1.7.4