delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/02/17/10:16:25

Message-Id: <m0y4gFl-000S1oC@inti.gov.ar>
Comments: Authenticated sender is <salvador AT natacha DOT inti DOT gov DOT ar>
From: "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT gov DOT ar>
Organization: INTI
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>, djgpp-workers AT delorie DOT com
Date: Tue, 17 Feb 1998 09:20:21 +0000
MIME-Version: 1.0
Subject: Re: open patch for share flags
References: <m0y4OUB-000S2WC AT inti DOT gov DOT ar>
In-reply-to: <Pine.SUN.3.91.980217082930.3136A-100000@is>

Eli wrote:
> 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.

Yes if we want to use the same way that was used for __crt0... flags, no if the 
user assigns the value in main (that's what I make).
What's the better?
 
> > + 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''.

I  put very clear in the mail that these docs MUST be revised/corrected, so you 
can change anything you want there. 

SET
------------------------------------ 0 --------------------------------
Visit my home page: http://set-soft.home.ml.org/
or
http://www.geocities.com/SiliconValley/Vista/6552/
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Alternative e-mail: set-sot AT usa DOT net - ICQ: 2951574
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA
TE: +(541) 759 0013

- Raw text -


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