X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f X-Recipient: djgpp-workers AT delorie DOT com Date: Mon, 07 May 2012 23:08:38 +0300 From: Eli Zaretskii Subject: Re: NULL pointer support for freopen In-reply-to: <83397d4379.fsf@gnu.org> X-012-Sender: halo1 AT inter DOT net DOT il To: djgpp-workers AT delorie DOT com Message-id: <83397b3gah.fsf@gnu.org> References: <201205061806 DOT 08510 DOT juan DOT guerrero AT gmx DOT de> <83397d4379 DOT fsf AT gnu DOT org> 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 > Date: Sun, 06 May 2012 20:41:30 +0300 > From: Eli Zaretskii > > > From: Juan Manuel Guerrero > > Date: Sun, 6 May 2012 18:06:08 +0200 > > > > I have tried to implement the case when a NULL pointer is passed as filename. > > Because DOS does not allow to change file descriptor flags of open files, only > > the change of textmode using setmode() is supported. Any other function call > > with a NULL pointer as filename argument will fail with EBADF. > > Please note that a different file acces mode will make the call fail, > > e.g.: if the new mode is O_WRONLY but the old mode was O_RDWR then the call > > will fail. No file access mode is allowed. > > Suggestions, objections, comments are welcome. > > Thanks, this looks good to me. However, this thread: http://lists.gnu.org/archive/html/bug-gnulib/2012-05/msg00063.html and in particular its last 2 messages, seem to indicate that perhaps we shouldn't support such a controversial feature.