Kaydet (Commit) 41f7a3dc authored tarafından Vladimir Glazounov's avatar Vladimir Glazounov

INTEGRATION: CWS os2port01 (1.7.12); FILE MERGED

2007/08/08 08:31:51 obr 1.7.12.2: RESYNC: (1.7-1.10); FILE MERGED
2006/12/28 14:54:33 ydario 1.7.12.1: OS/2 initial import.
üst 7fccbf55
/* RCS $Id: sysintf.c,v 1.10 2007-06-12 06:07:03 obo Exp $
/* RCS $Id: sysintf.c,v 1.11 2007-09-20 14:34:06 vg Exp $
--
-- SYNOPSIS
-- System independent interface
......@@ -596,11 +596,20 @@ char **path;
#if defined(HAVE_MKSTEMP)
mode_t mask;
#ifdef __EMX__
// YD use \ since temporary names with / can be interpreted as options
// e.g. 4os2 'del /y e:\tmp/mkW4mmkS._.zip' will fail
*path = DmStrJoin( tmpdir, "\\", -1, FALSE);
#else
*path = DmStrJoin( tmpdir, "/", -1, FALSE);
#endif
*path = DmStrJoin( *path, "mkXXXXXX", -1, TRUE );
mask = umask(0066);
fd = mkstemp( *path );
#ifdef __EMX__
_setmode( fd, O_TEXT);
#endif
umask(mask);
#elif defined(HAVE_TEMPNAM)
......@@ -663,6 +672,9 @@ char *mode;
Def_macro( "TMPFILE", *path, M_MULTI|M_EXPANDED );
/* associate stream with file descriptor */
fp = fdopen(fd, mode);
#ifdef __EMX__
_setmode( fd, O_TEXT);
#endif
}
else
fp = NIL(FILE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment