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

Re: WIN32_RETRY_LOOP on Cygwin

From: Max Bowsher <maxb1_at_ukf.net>
Date: Fri, 02 May 2008 02:36:15 +0100

Karl Fogel wrote:
> Spiro Trikaliotis <news-200803_at_trikaliotis.net> writes:
>> In subversion-1.5.0-rc4/subversion/libsvn_subr/io.c, the
>> WIN32_RETRY_LOOP is defined as loop only if WIN32 is defined.
>> Unfortunately, for Cygwin, this means that this work-aroundy is not
>> performed, as WIN32 is not defined there.
>>
>> Is it possible to change this
>> #ifdef WIN32
>> to
>> #if defined(WIN32) || defined(__CYGWIN__)
>>
>> so Cygwin can profit from this work-around, too?
>
> I've CC'd dev@ on this response.
>
> I don't have enough background knowledge to anticipate all the "gotchas"
> here, but this seems reasonable to me. Cygwin doesn't mask over the
> behavior of other processes in Windows, or low-level filesystem
> behaviors, right? So it makes sense that WIN32_RETRY_LOOP() would be
> necessary in Cygwin too.
>
> However, I'd like to hear comments from other developers with more
> Windows and Cygwin experience...

I guess as former Subversion Cygwin package maintainer, I should pipe up
here. (former, because I resigned yesterday, having completed the
transition to a Microsoft-free computing experience just this week)

People occasionally would suggest using WIN32_RETRY_LOOP on Cygwin. I
never patched it into the Cygwin packages during my tenure, because I
never once experienced any Subversion operation failing in a relevant
way. But then, perhaps that's because I was just lucky, and tended to
run a fairly clean system. *shrug*

>> (Please, compare the thread I started on the Cygwin mailing list here:
>> http://www.cygwin.com/ml/cygwin/2008-04/msg00550.html)

>> Additionally, the current SVN client (1.4.6) always uses LF line endings
>> as "natural" line endings in cygwin, regardless if cygwin has been
>> installed with LF line-endings, or with CR/LF line endings.
>
> Hmmm, how does Subversion determine the "native" end-of-line convention?
> I'd think we just ask APR somehow; if so, the question is, why isn't APR
> getting the right answer on Cygwin?

native == APR_EOL_STR, a preprocessor constant. Which is fine. Except
that on Cygwin, the choice of what the intended on-disk eol style should
be can be configured on *per-directory* basis. I took one look at how
much libsvn_subr assumes that the native eol is a simple compile-time
constant, and punted on trying to change anything here.

Max.

Received on 2008-05-02 03:36:40 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.