You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Justin Erenkrantz <ju...@erenkrantz.com> on 2004/08/01 19:38:13 UTC

Re: apr_file_open: APR_CREATE without APR_WRITE?

--On Saturday, July 31, 2004 11:55 AM +1000 Brian Havard 
<br...@kheldar.apana.org.au> wrote:

> While porting Subversion to OS/2 I came across a failure where it tries to
> open a file using only APR_READ | APR_CREATE. This results in an error on
> OS/2, it doesn't seem to like the idea of creating a new file with
> read-only access.
>
> Is this supposed to work or is it just lucky that happens to work on other
> platforms? IE should I fix APR or Subversion?

I'd fix APR as I think it's reasonable to use that construct to 'touch' an 
empty file - which is what SVN does, IIRC.  Seems like OS/2 should just 
implicitly add write behind the scenes in this corner case...  -- justin

Re: apr_file_open: APR_CREATE without APR_WRITE?

Posted by Brian Havard <br...@kheldar.apana.org.au>.
On Sun, 01 Aug 2004 10:38:13 -0700, Justin Erenkrantz wrote:

>--On Saturday, July 31, 2004 11:55 AM +1000 Brian Havard 
><br...@kheldar.apana.org.au> wrote:
>
>> While porting Subversion to OS/2 I came across a failure where it tries to
>> open a file using only APR_READ | APR_CREATE. This results in an error on
>> OS/2, it doesn't seem to like the idea of creating a new file with
>> read-only access.
>>
>> Is this supposed to work or is it just lucky that happens to work on other
>> platforms? IE should I fix APR or Subversion?
>
>I'd fix APR as I think it's reasonable to use that construct to 'touch' an 
>empty file - which is what SVN does, IIRC.  Seems like OS/2 should just 
>implicitly add write behind the scenes in this corner case...  -- justin

Ok, so creating a file isn't consider writing to it, just writing a
directory entry? I guess I can make the OS/2 implementation work that way
if that's considered the standard.

-- 
 ______________________________________________________________________________
 |  Brian Havard                 |  "He is not the messiah!                   |
 |  brianh@kheldar.apana.org.au  |  He's a very naughty boy!" - Life of Brian |
 ------------------------------------------------------------------------------