delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/09/24/17:32:03

Date: 24 Sep 94 15:43:41 EDT
From: "David Seidel (IDC)" <71333 DOT 1575 AT compuserve DOT com>
To: <djgpp AT sun DOT soe DOT clarkson DOT edu>
Subject: _open and open...

>#ifdef MSDOS
>#include "io.h"
>#define close _close
>#define creat _creat
>#define open _open
>#define read _read
>#define write _write
>#endif

These are Microsoft C-specific calls -- they're equivalent to the usual 
calls, but slightly more efficient because they're implemented as 
lower-level system calls.  This is definitely a bogus set of conditional 
definitions, though, because it's not portable across compilers.  These 
calls do exist for many DOS-based compilers that track MSC, but there's no 
guarantee that they'll exist in a particular vendor's RTL.  Just leave MSDOS 
undefined (which you should be doing anyhow with djgpp) and you should be 
fine.

Dave


- Raw text -


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