made compatible with borlan bcc

This commit is contained in:
Jeff Hill
2003-08-26 00:37:08 +00:00
parent ac13592d0a
commit 48c4992799

View File

@@ -49,6 +49,13 @@ epicsShareFunc FILE * epicsShareAPI epicsTempFile ( void )
// _O_BINARY no translation
// _O_SHORT_LIVED avoid flush to disk
//
// (Borland does not supply _O_SHORT_LIVED and _O_TEMPORARY)
# ifndef _O_SHORT_LIVED
# define _O_SHORT_LIVED 0x1000
# endif
# ifndef _O_TEMPORARY
# define _O_TEMPORARY 0x0040
# endif
const int openFlag = _O_CREAT | _O_EXCL | _O_RDWR |
_O_SHORT_LIVED | _O_BINARY | _O_TEMPORARY;
int fd = open ( pName, openFlag, _S_IWRITE );
@@ -59,6 +66,6 @@ epicsShareFunc FILE * epicsShareAPI epicsTempFile ( void )
return 0;
}
free ( pName );
return fdopen ( fd, "w+bTD" );
return _fdopen ( fd, "w+bTD" );
}