summaryrefslogtreecommitdiffstats
path: root/lang
diff options
context:
space:
mode:
authordinoex <dinoex@FreeBSD.org>2001-05-07 18:37:02 +0000
committerdinoex <dinoex@FreeBSD.org>2001-05-07 18:37:02 +0000
commit8b40aa08992c6456e020d8e9340e15acd1e36b13 (patch)
tree9e958cff3e191a48b07b2808434ebbce36c7c879 /lang
parent6ba1876540615c610cd21bdcb5bf48ef3097d6df (diff)
downloadFreeBSD-ports-8b40aa08992c6456e020d8e9340e15acd1e36b13.zip
FreeBSD-ports-8b40aa08992c6456e020d8e9340e15acd1e36b13.tar.gz
- patch to use mkstemp instead of tmpnam
Submitted by: mi@aldan.algebra.com (Mikhail Teterin)
Diffstat (limited to 'lang')
-rw-r--r--lang/tcl83/Makefile1
-rw-r--r--lang/tcl83/files/patch-tmpnam17
-rw-r--r--lang/tcl84/Makefile1
-rw-r--r--lang/tcl84/files/patch-tmpnam17
4 files changed, 36 insertions, 0 deletions
diff --git a/lang/tcl83/Makefile b/lang/tcl83/Makefile
index ae4b3b1..9d4b733 100644
--- a/lang/tcl83/Makefile
+++ b/lang/tcl83/Makefile
@@ -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
diff --git a/lang/tcl83/files/patch-tmpnam b/lang/tcl83/files/patch-tmpnam
new file mode 100644
index 0000000..ef53561
--- /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);
diff --git a/lang/tcl84/Makefile b/lang/tcl84/Makefile
index ae4b3b1..9d4b733 100644
--- a/lang/tcl84/Makefile
+++ b/lang/tcl84/Makefile
@@ -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
diff --git a/lang/tcl84/files/patch-tmpnam b/lang/tcl84/files/patch-tmpnam
new file mode 100644
index 0000000..ef53561
--- /dev/null
+++ b/lang/tcl84/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);
OpenPOWER on IntegriCloud