From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
To: <gdb-patches@sourceware.org>
Subject: [RFA] Fix remote-fileio.c compilation for Cygwin 1.5 API
Date: Mon, 08 Mar 2010 16:13:00 -0000 [thread overview]
Message-ID: <000901cabeda$3cd7bd00$b6873700$@muller@ics-cnrs.unistra.fr> (raw)
http://sourceware.org/ml/gdb-patches/2010-03/msg00101.html
In order to complete the fix for 1.5 Cygwin API,
we need to fix the compilation failure in
remote-fileio.c source.
Christopher said in a previous email that he
didn't have an opinion about that part.
http://sourceware.org/ml/gdb-patches/2010-03/msg00260.html
I do not really know if there is a specific maintainer for this
file... Could someone (a global maintainr?)
please review this patch?
Pierre
2010-03-04 Pierre Muller <muller@ics.u-strasbg.fr>
* remote-fileio.c:
(__USE_OLD_CYGWIN_API_): New macro, set for
older cygwin API that does not have cygwin_conv_path.
(cygwin_conv_path): New static function emulating
new cygwin API.
Index: remote-fileio.c
===================================================================
RCS file: /cvs/src/src/gdb/remote-fileio.c,v
retrieving revision 1.34
diff -u -p -r1.34 remote-fileio.c
--- remote-fileio.c 1 Mar 2010 09:09:24 -0000 1.34
+++ remote-fileio.c 4 Mar 2010 15:06:28 -0000
@@ -35,9 +35,45 @@
#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 __USE_OLD_CYGWIN_API_
+#endif
+
#endif
#include <signal.h>
+#ifdef __USE_OLD_CYGWIN_API_
+/* Possible 'what' values in calls to cygwin_conv_path/cygwin_create_path.
*/
+enum
+{
+ CCP_POSIX_TO_WIN_A = 0, /* from is char*, to is char* */
+ CCP_POSIX_TO_WIN_W, /* from is char*, to is wchar_t* */
+ CCP_WIN_A_TO_POSIX, /* from is char*, to is char* */
+ CCP_WIN_W_TO_POSIX, /* from is wchar_t*, to is char* */
+
+ /* Or these values to the above as needed. */
+ CCP_ABSOLUTE = 0, /* Request absolute path (default). */
+ CCP_RELATIVE = 0x100 /* Request to keep path relative. */
+};
+typedef unsigned int cygwin_conv_path_t;
+
+static ssize_t
+cygwin_conv_path (cygwin_conv_path_t what, const void *from,
+ void *to, size_t size)
+{
+ if (size < PATH_MAX)
+ internal_error (__FILE__,__LINE__,
+ "string buffer too short in cygwin_conv_path");
+
+ if (what == CCP_WIN_A_TO_POSIX)
+ return cygwin_conv_to_full_posix_path (from, to);
+ else
+ internal_error (__FILE__,__LINE__,"Error in cygwin_conv_path");
+}
+#endif /* __USE_OLD_CYGWIN_API_ */
+
+
static struct {
int *fd_map;
int fd_map_size;
next reply other threads:[~2010-03-08 16:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-08 16:13 Pierre Muller [this message]
2010-03-08 20:09 ` Daniel Jacobowitz
2010-03-08 21:49 ` Christopher Faylor
2010-03-08 21:55 ` Daniel Jacobowitz
2010-03-08 23:21 ` Pierre Muller
2010-03-09 19:15 ` Christopher Faylor
2010-03-09 23:50 ` Pierre Muller
2010-03-10 15:57 ` Christopher Faylor
2010-03-10 16:42 ` Pierre Muller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='000901cabeda$3cd7bd00$b6873700$@muller@ics-cnrs.unistra.fr' \
--to=pierre.muller@ics-cnrs.unistra.fr \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox