made compatible with borlan bcc
This commit is contained in:
@@ -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" );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user