delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/09/18/16:53:08

Date: Mon, 18 Sep 2000 16:52:35 -0400
Message-Id: <200009182052.QAA22284@envy.delorie.com>
From: DJ Delorie <dj AT delorie DOT com>
To: djgpp-workers AT delorie DOT com
In-reply-to: <200009182019.WAA26760@father.ludd.luth.se> (message from Martin
Str|mberg on Mon, 18 Sep 2000 22:19:36 +0200 (MET DST))
Subject: Re: O_APPEND
References: <200009182019 DOT WAA26760 AT father DOT ludd DOT luth DOT se>
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

> Well how can I expect to preserve the O_APPEND flag here if I don't do
> it as above? Or is my idea to make __file_handle_modes an array of
> unsigned short instead of char completely wrong?

"oldmode & ~(text|binary)" returns all the flags *except* text and
binary.  It will preserve the O_APPEND flag.

You shouldn't use setmode() to set the O_APPEND flag.  Use
__file_handle_set() directly.  You'll probably have to change both
open/creat and _open/_creat.

- Raw text -


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