This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
Re: [patch/rebase] rebase -i and more
On Jun 21 09:48, Charles Wilson wrote:
> On 6/21/2011 9:27 AM, Corinna Vinschen wrote:
> > Boy, what a mess. In that case, have a look into my patch to
> > imagehelper/objectfile.cc, function Win32Path. The #ifdef stuff
> > won't work for MSYS. Not that I care...
>
> Of course. :-)
Wouldn't this one cover all cases?
Index: imagehelper/objectfile.cc
===================================================================
RCS file: /sourceware/projects/cygwin-apps-home/cvsfiles/rebase/imagehelper/objectfile.cc,v
retrieving revision 1.3
diff -u -p -r1.3 objectfile.cc
--- imagehelper/objectfile.cc 21 Jun 2011 09:35:21 -0000 1.3
+++ imagehelper/objectfile.cc 21 Jun 2011 14:05:16 -0000
@@ -39,8 +39,8 @@ Win32Path(const char *s)
if (!s || *s == '\0')
return L"";
-#if defined(__CYGWIN__)
- cygwin_conv_path (CCP_POSIX_TO_WIN_W, s, w32_pbuf, 32768 * sizeof (WCHAR));
+#if !defined (__CYGWIN__)
+ MultiByteToWideChar (CP_OEM, 0, s, -1, w32_pbuf, 32768);
#elif defined(__MSYS__)
{
char buf[MAX_PATH];
@@ -48,7 +48,7 @@ Win32Path(const char *s)
MultiByteToWideChar (CP_OEM, 0, buf, -1, w32_pbuf, 32768);
}
#else
- MultiByteToWideChar (CP_OEM, 0, s, -1, w32_pbuf, 32768);
+ cygwin_conv_path (CCP_POSIX_TO_WIN_W, s, w32_pbuf, 32768 * sizeof (WCHAR));
#endif
return w32_pbuf;
}
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat