diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2007-09-20 13:34:06 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2007-09-20 13:34:06 +0000 |
commit | 41f7a3dc98d0bb9a1c6a22c082087f0831db7dd1 (patch) | |
tree | 92fa09efc36901a6ada46f0623b6325cff3999ff | |
parent | 7fccbf5549aecb01979b1c53663f919fcad421ea (diff) |
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.
-rw-r--r-- | dmake/sysintf.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/dmake/sysintf.c b/dmake/sysintf.c index 110333cdafca..335a20fca944 100644 --- a/dmake/sysintf.c +++ b/dmake/sysintf.c @@ -1,4 +1,4 @@ -/* 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); |