ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2011/03/16/05:15:20

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: RayeR <glaux AT centrum DOT cz>
Newsgroups: comp.os.msdos.djgpp
Subject: What DOS call is used by libc/fopen("w") and fprints() in djgpp 2.04 beta?
Date: Wed, 16 Mar 2011 02:07:00 -0700 (PDT)
Organization: http://groups.google.com
Lines: 16
Message-ID: <5b55a372-17c3-4bc6-b1c3-7ca7ab9a1612@u6g2000vbh.googlegroups.com>
NNTP-Posting-Host: 78.45.120.174
Mime-Version: 1.0
X-Trace: posting.google.com 1300266420 17576 127.0.0.1 (16 Mar 2011 09:07:00 GMT)
X-Complaints-To: groups-abuse AT google DOT com
NNTP-Posting-Date: Wed, 16 Mar 2011 09:07:00 +0000 (UTC)
Complaints-To: groups-abuse AT google DOT com
Injection-Info: u6g2000vbh.googlegroups.com; posting-host=78.45.120.174; posting-account=Q0wMHAoAAADjYrghh94FTf6YnbpTqZgp
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.16)
Gecko/20101123 SeaMonkey/2.0.11,gzip(gfe)
Bytes: 1882
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hi,
I'm trying to track another problem in freedos and need to trace what
dos calls are used in this operation. My original message:

Hi,
I tested my program (compiled in djgpp) on write-protected floppy and
found there's very different behavior what happen if run under msdos
and freedos 2038.
Under msdos I got null pointer as expected according to ansi c spec.
If I then tried to write to NULL by fwrite() program crashed.
Under freedos it opened something (NUL device?) and fopen returned a
valid pointer. fwrite() didn't crashed, fclose() didn't return error.
But of course file was not created. I think this is a bad idea because
application may confuse user with notification that file was
successfully created blabla and it isn't. I would suggest to return
null as ususal...

- Raw text -


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