[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [Patch] - Fix compilation of direct_uri-test.c on OS/2

From: Eric Zeitler <eric.zeitler_at_gmail.com>
Date: Thu, 22 Jul 2010 21:50:10 +0000 (UTC)

Matthew Bentham <mjb67 <at> artvps.com> writes:

>
> On 28/06/2010 10:29, Bert Huijben wrote:
> >
> >
> >> -----Original Message-----
> >> From: Julian Foad [mailto:julian.foad <at> wandisco.com]
> >> Sent: maandag 28 juni 2010 10:48
> >> To: Paul Smedley
> >> Cc: dev <at> subversion.apache.org
> >> Subject: Re: [Patch] - Fix compilation of direct_uri-test.c on OS/2
> >>
> >> On Sun, 2010-06-27, Paul Smedley wrote:
> >>> [[[
> >>> Fix compilation of direct_uri-test.c on OS/2
> >>>
> >>> * subversion/tests/libsvn_subr/dirent_uri-test.c : add define of getdcwd
> >>> as _getdcwd for __OS2__ as well as _MSC_VER
> >>> ]]]
> >>
> >> Hi Paul. To see if there were other similar places, I searched for
> >> _MSC_VER and found two more. Can you confirm whether the following is a
> >> good patch?
> >
> > _MSC_VER is a check for the Microsoft compiler (and it's compiler specific
include files; we check for
> Windows in a different way), __OS2__ checks for a platform.
> >
> > Maybe we should just try to move this to platform specific checks.
> >
> > The only problem is that I have no way to confirm if this function is
available under the less common
> cygwin/mingw environments. Borland C++ is most likely compatible with the
Microsoft compilers.
> >
> > Bert
> >
>
> _getdcwd does not exist on the cygwin platform (which is a Unix
> platform), but _getdcwd and _wgetdcwd are available under mingw32 (which
> is a Windows platform) through direct.h.
>
> Matthew
>
>

I have created a patch to fix this very issue for Cygwin.

Index: subversion/libsvn_subr/dirent_uri.c
===================================================================
--- subversion/libsvn_subr/dirent_uri.c (revision 966858)
+++ subversion/libsvn_subr/dirent_uri.c (working copy)
@@ -51,7 +51,7 @@
 #define SVN_PATH_IS_PLATFORM_EMPTY(s,n) ((n) == 1 && (s)[0] == '.')

 /* This check must match the check on top of dirent_uri-tests.c */
-#if defined(WIN32) || defined(__CYGWIN__) || defined(__OS2__)
+#if defined(WIN32) || defined(__OS2__)
 #define SVN_USE_DOS_PATHS
 #endif

Index: subversion/tests/libsvn_subr/dirent_uri-test.c
===================================================================
--- subversion/tests/libsvn_subr/dirent_uri-test.c (revision 966858)
+++ subversion/tests/libsvn_subr/dirent_uri-test.c (working copy)
@@ -42,7 +42,7 @@
 #define SVN_EMPTY_PATH ""

 /* This check must match the check on top of dirent_uri.c */
-#if defined(WIN32) || defined(__CYGWIN__) || defined(__OS2__)
+#if defined(WIN32) || defined(__OS2__)
 #define SVN_USE_DOS_PATHS
 #endif
Received on 2010-07-22 23:55:47 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.