delorie.com/archives/browse.cgi | search |
From: | Martin Str|mberg <ams AT ludd DOT luth DOT se> |
Message-Id: | <200009182019.WAA26760@father.ludd.luth.se> |
Subject: | Re: O_APPEND |
In-Reply-To: | <200009181937.PAA21670@envy.delorie.com> from DJ Delorie at "Sep 18, 2000 03:37:24 pm" |
To: | djgpp-workers AT delorie DOT com |
Date: | Mon, 18 Sep 2000 22:19:36 +0200 (MET DST) |
X-Mailer: | ELM [version 2.4ME+ PL54 (25)] |
MIME-Version: | 1.0 |
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 |
According to DJ Delorie: This code is in setmode(): > > newmode = (oldmode & ~(O_BINARY|O_TEXT)) | (mode & (O_BINARY|O_TEXT)); > > becomes: > > newmode = (oldmode & ~(O_BINARY|O_TEXT|O_APPEND)) | (mode & (O_BINARY|O_TEXT|O_APPEND)); followed by: __file_handle_set (handle, newmode); > No. setmode() shouldn't be used to change the O_APPEND mode. It is > for text/binary changes only. 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? Right, MartinS
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |