diff options
author | Dirk Meyer <dinoex@FreeBSD.org> | 2001-05-07 18:37:02 +0000 |
---|---|---|
committer | Dirk Meyer <dinoex@FreeBSD.org> | 2001-05-07 18:37:02 +0000 |
commit | cb3ed2d00e9455bc2e05a7d02d5d89d10eaaecbd (patch) | |
tree | ee6206f34f449f936706709f7abc6c708ac50757 /lang/tcl83/files | |
parent | Update to knu-cvsweb 1.106.1.71. (diff) |
- patch to use mkstemp instead of tmpnam
Submitted by: mi@aldan.algebra.com (Mikhail Teterin)
Notes
Notes:
svn path=/head/; revision=42378
Diffstat (limited to 'lang/tcl83/files')
-rw-r--r-- | lang/tcl83/files/patch-tmpnam | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lang/tcl83/files/patch-tmpnam b/lang/tcl83/files/patch-tmpnam new file mode 100644 index 000000000000..ef535617fe5d --- /dev/null +++ b/lang/tcl83/files/patch-tmpnam @@ -0,0 +1,17 @@ +--- tclUnixPipe.c Tue Apr 3 18:54:39 2001 ++++ tclUnixPipe.c Sat Apr 28 12:41:46 2001 +@@ -193,13 +193,10 @@ + /* + * Linux says we should use mkstemp, but Solaris prefers tmpnam. + * We should also check against making more then TMP_MAX of these. + */ + +- if (tmpnam(fileName) == NULL) { /* INTL: Native. */ +- return NULL; +- } +- fd = open(fileName, O_RDWR|O_CREAT|O_EXCL, 0666); /* INTL: Native. */ ++ fd = mkstemp(fileName); /* INTL: Native. */ + if (fd == -1) { + return NULL; + } + fcntl(fd, F_SETFD, FD_CLOEXEC); |