delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/02/17/01:30:27

Date: Tue, 17 Feb 1998 08:29:54 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT gov DOT ar>
cc: djgpp-workers AT delorie DOT com
Subject: Re: open patch for share flags
In-Reply-To: <m0y4OUB-000S2WC@inti.gov.ar>
Message-ID: <Pine.SUN.3.91.980217082930.3136A-100000@is>
MIME-Version: 1.0

On Mon, 16 Feb 1998, Salvador Eduardo Tropea (SET) wrote:

> + @example
> + #include <fcntl.h>
> + 
> + int __djgpp_share_flags = ...;
> + @end example

I may be missing something here, but won't this kind of usage cause
linker error (since the library already defines __djgpp_share_flags)?

If I'm right, then it might be better to put the library definition on
a separate source file, so it gets linked in only if users don't
define it in their sources.

> + If you assign any value different than 0 to this variable libc will
                            ^^^^^^^^^^^^^^
I think either ``different from'' or ``other than'' is better.

> + merge this value with the flags passed to @code{open}. But if you specify
    ^^^^^
``Merge'' is IMHO misleading.  The code (quite correctly) uses
`__djgpp_share_flags' only if no sharing flags were passed by the
caller.  So I would suggest to say something like this:

  If you assign any value ... libc will use that value as the sharing
  bits when it calls DOS to open the file.

> + and by default is 0 ensuring maximun compatibility with older versions of
                                       ^
A typo.

> + allow to share or protect a file when it's opened more than ones by the
                                                                ^^^^
This should be ``once''.

> + case. One interesting thing is that when the file is openen by two tasks
                                                         ^^^^^^
This should be ``opened''.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019