From: "Mark E." To: djgpp-workers AT delorie DOT com Date: Fri, 23 Feb 2001 13:01:31 -0500 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: O_TEMPORARY v2 Message-ID: <3A965F2B.10227.264CB2@localhost> In-reply-to: <5567-Fri23Feb2001120549+0200-eliz@is.elta.co.il> References: <3A95981A DOT 14546 DOT 31CA2 AT localhost> (snowball3 AT bigfoot DOT com) X-mailer: Pegasus Mail for Win32 (v3.12c) Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > Shouldn't the second typedef simply be "struct fd_properties", without > "typedef"? I'll take your word for it. I'm more familiar with the details of C++ than C. > > + */ static fd_properties * alloc_fd_properties() { > > + static void free_fd_properties(fd_properties *fd) { Pegasus did this. It does weird things like this sometimes. However, the next function after these two was formatted wrong. > > *************** open(const char* filename, int oflag, .. > > *** 152,157 **** > > --- 153,161 ---- > > if(oflag & O_APPEND) > > lseek(fd, 0, SEEK_END); > > > > + if (oflag) > > + _set_fd_properties(fd, real_name, oflag); > > + > > Isn't it better to put this into _open instead of open? The opposite > operation is inside _close, not close. Doesn't matter to me, but then wouldn't the same code need to be added to _creatnew since open calls it too?