- patch to use mkstemp instead of tmpnam
Submitted by: mi@aldan.algebra.com (Mikhail Teterin)
This commit is contained in:
parent
72bd7e8e3e
commit
cb3ed2d00e
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=42378
@ -7,6 +7,7 @@
|
||||
|
||||
PORTNAME= tcl
|
||||
PORTVERSION= 8.3.3
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= lang tcl83
|
||||
MASTER_SITES= ${MASTER_SITE_TCLTK}
|
||||
MASTER_SITE_SUBDIR= tcl8_3
|
||||
|
17
lang/tcl83/files/patch-tmpnam
Normal file
17
lang/tcl83/files/patch-tmpnam
Normal file
@ -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);
|
@ -7,6 +7,7 @@
|
||||
|
||||
PORTNAME= tcl
|
||||
PORTVERSION= 8.3.3
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= lang tcl83
|
||||
MASTER_SITES= ${MASTER_SITE_TCLTK}
|
||||
MASTER_SITE_SUBDIR= tcl8_3
|
||||
|
17
lang/tcl84/files/patch-tmpnam
Normal file
17
lang/tcl84/files/patch-tmpnam
Normal file
@ -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);
|
Loading…
Reference in New Issue
Block a user