diff options
author | dinoex <dinoex@FreeBSD.org> | 2001-11-14 16:44:08 +0800 |
---|---|---|
committer | dinoex <dinoex@FreeBSD.org> | 2001-11-14 16:44:08 +0800 |
commit | fef4a91637604263931e633a927abecabb802672 (patch) | |
tree | 90b74702585d9006f2ca060111b282cf4fdb135d | |
parent | 10dad47a82fbe04f3a6150a122421b34c9e5fcaf (diff) | |
download | freebsd-ports-gnome-fef4a91637604263931e633a927abecabb802672.tar.gz freebsd-ports-gnome-fef4a91637604263931e633a927abecabb802672.tar.zst freebsd-ports-gnome-fef4a91637604263931e633a927abecabb802672.zip |
Tcl will get hostname using uname(3). It seems FreeBSD's uname(3)
returns only 31 letters by /usr/include/sys/utsname.h.
Problem was that configure detects uname(3) and uses uname(3) in
the hostname-function, while gethostname gives more (=longer)
information.
keep uname around, as it is be used in TclpSetVariables.
took maintainership 8.2
apply a fix for unsafe tempfile handling from 8.3
PR: 18896
Submitted by: yoshint@flab.fujitsu.co.jp
-rw-r--r-- | lang/tcl82/Makefile | 3 | ||||
-rw-r--r-- | lang/tcl82/files/patch-tclUnixPipe.c | 13 | ||||
-rw-r--r-- | lang/tcl82/files/patch-tclUnixSock.c | 11 | ||||
-rw-r--r-- | lang/tcl83/Makefile | 2 | ||||
-rw-r--r-- | lang/tcl83/files/patch-tclUnixPipe.c | 15 | ||||
-rw-r--r-- | lang/tcl83/files/patch-tclUnixSock.c | 11 | ||||
-rw-r--r-- | lang/tcl83/files/patch-tmpnam | 15 | ||||
-rw-r--r-- | lang/tcl84/Makefile | 2 | ||||
-rw-r--r-- | lang/tcl84/files/patch-tclUnixPipe.c | 15 | ||||
-rw-r--r-- | lang/tcl84/files/patch-tclUnixSock.c | 11 | ||||
-rw-r--r-- | lang/tcl84/files/patch-tmpnam | 15 |
11 files changed, 80 insertions, 33 deletions
diff --git a/lang/tcl82/Makefile b/lang/tcl82/Makefile index be5a061e3e60..5cc15f933ab1 100644 --- a/lang/tcl82/Makefile +++ b/lang/tcl82/Makefile @@ -7,11 +7,12 @@ PORTNAME= tcl PORTVERSION= 8.2.3 +PORTREVISION= 1 CATEGORIES= lang tcl82 MASTER_SITES= ftp://ftp.scriptics.com/pub/tcl/tcl8_2/ DISTNAME= tcl8.2.3 -MAINTAINER= ports@FreeBSD.org +MAINTAINER= dinoex@FreeBSD.org NO_LATEST_LINK= yes WRKSRC= ${WRKDIR}/${DISTNAME}/unix diff --git a/lang/tcl82/files/patch-tclUnixPipe.c b/lang/tcl82/files/patch-tclUnixPipe.c new file mode 100644 index 000000000000..1d9c0be1e0fa --- /dev/null +++ b/lang/tcl82/files/patch-tclUnixPipe.c @@ -0,0 +1,13 @@ +--- tclUnixPipe.c.orig Tue Nov 30 09:43:03 1999 ++++ tclUnixPipe.c Wed Nov 14 09:09:20 2001 +@@ -185,8 +185,8 @@ + char fileName[L_tmpnam]; + int fd; + +- tmpnam(fileName); /* INTL: Native. */ +- fd = open(fileName, O_RDWR|O_CREAT|O_TRUNC, 0666); /* INTL: Native. */ ++ strlcpy(fileName, "/var/tmp/tcltmp.XXXXXX", L_tmpnam); ++ fd = mkstemp(fileName); /* INTL: Native. */ + if (fd == -1) { + return NULL; + } diff --git a/lang/tcl82/files/patch-tclUnixSock.c b/lang/tcl82/files/patch-tclUnixSock.c new file mode 100644 index 000000000000..44f7e59d6789 --- /dev/null +++ b/lang/tcl82/files/patch-tclUnixSock.c @@ -0,0 +1,11 @@ +--- tclUnixSock.c.orig Fri Apr 16 02:48:05 1999 ++++ tclUnixSock.c Wed Nov 14 09:25:20 2001 +@@ -80,7 +80,7 @@ + } + + native = NULL; +-#ifndef NO_UNAME ++#if 0 + (VOID *) memset((VOID *) &u, (int) 0, sizeof(struct utsname)); + if (uname(&u) > -1) { /* INTL: Native. */ + hp = gethostbyname(u.nodename); /* INTL: Native. */ diff --git a/lang/tcl83/Makefile b/lang/tcl83/Makefile index 3249f6b2aa3e..6d97c53ba62e 100644 --- a/lang/tcl83/Makefile +++ b/lang/tcl83/Makefile @@ -7,7 +7,7 @@ PORTNAME= tcl PORTVERSION= 8.3.4 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= lang tcl83 MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= tcl diff --git a/lang/tcl83/files/patch-tclUnixPipe.c b/lang/tcl83/files/patch-tclUnixPipe.c new file mode 100644 index 000000000000..535259b7af2c --- /dev/null +++ b/lang/tcl83/files/patch-tclUnixPipe.c @@ -0,0 +1,15 @@ +--- tclUnixPipe.c.orig Wed Apr 4 00:54:39 2001 ++++ tclUnixPipe.c Thu May 10 22:00:30 2001 +@@ -195,10 +195,8 @@ + * 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. */ ++ strlcpy(fileName, "/var/tmp/tcltmp.XXXXXX", L_tmpnam); ++ fd = mkstemp(fileName); /* INTL: Native. */ + if (fd == -1) { + return NULL; + } diff --git a/lang/tcl83/files/patch-tclUnixSock.c b/lang/tcl83/files/patch-tclUnixSock.c new file mode 100644 index 000000000000..44f7e59d6789 --- /dev/null +++ b/lang/tcl83/files/patch-tclUnixSock.c @@ -0,0 +1,11 @@ +--- tclUnixSock.c.orig Fri Apr 16 02:48:05 1999 ++++ tclUnixSock.c Wed Nov 14 09:25:20 2001 +@@ -80,7 +80,7 @@ + } + + native = NULL; +-#ifndef NO_UNAME ++#if 0 + (VOID *) memset((VOID *) &u, (int) 0, sizeof(struct utsname)); + if (uname(&u) > -1) { /* INTL: Native. */ + hp = gethostbyname(u.nodename); /* INTL: Native. */ diff --git a/lang/tcl83/files/patch-tmpnam b/lang/tcl83/files/patch-tmpnam index 535259b7af2c..e69de29bb2d1 100644 --- a/lang/tcl83/files/patch-tmpnam +++ b/lang/tcl83/files/patch-tmpnam @@ -1,15 +0,0 @@ ---- tclUnixPipe.c.orig Wed Apr 4 00:54:39 2001 -+++ tclUnixPipe.c Thu May 10 22:00:30 2001 -@@ -195,10 +195,8 @@ - * 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. */ -+ strlcpy(fileName, "/var/tmp/tcltmp.XXXXXX", L_tmpnam); -+ fd = mkstemp(fileName); /* INTL: Native. */ - if (fd == -1) { - return NULL; - } diff --git a/lang/tcl84/Makefile b/lang/tcl84/Makefile index 3249f6b2aa3e..6d97c53ba62e 100644 --- a/lang/tcl84/Makefile +++ b/lang/tcl84/Makefile @@ -7,7 +7,7 @@ PORTNAME= tcl PORTVERSION= 8.3.4 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= lang tcl83 MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= tcl diff --git a/lang/tcl84/files/patch-tclUnixPipe.c b/lang/tcl84/files/patch-tclUnixPipe.c new file mode 100644 index 000000000000..535259b7af2c --- /dev/null +++ b/lang/tcl84/files/patch-tclUnixPipe.c @@ -0,0 +1,15 @@ +--- tclUnixPipe.c.orig Wed Apr 4 00:54:39 2001 ++++ tclUnixPipe.c Thu May 10 22:00:30 2001 +@@ -195,10 +195,8 @@ + * 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. */ ++ strlcpy(fileName, "/var/tmp/tcltmp.XXXXXX", L_tmpnam); ++ fd = mkstemp(fileName); /* INTL: Native. */ + if (fd == -1) { + return NULL; + } diff --git a/lang/tcl84/files/patch-tclUnixSock.c b/lang/tcl84/files/patch-tclUnixSock.c new file mode 100644 index 000000000000..44f7e59d6789 --- /dev/null +++ b/lang/tcl84/files/patch-tclUnixSock.c @@ -0,0 +1,11 @@ +--- tclUnixSock.c.orig Fri Apr 16 02:48:05 1999 ++++ tclUnixSock.c Wed Nov 14 09:25:20 2001 +@@ -80,7 +80,7 @@ + } + + native = NULL; +-#ifndef NO_UNAME ++#if 0 + (VOID *) memset((VOID *) &u, (int) 0, sizeof(struct utsname)); + if (uname(&u) > -1) { /* INTL: Native. */ + hp = gethostbyname(u.nodename); /* INTL: Native. */ diff --git a/lang/tcl84/files/patch-tmpnam b/lang/tcl84/files/patch-tmpnam index 535259b7af2c..e69de29bb2d1 100644 --- a/lang/tcl84/files/patch-tmpnam +++ b/lang/tcl84/files/patch-tmpnam @@ -1,15 +0,0 @@ ---- tclUnixPipe.c.orig Wed Apr 4 00:54:39 2001 -+++ tclUnixPipe.c Thu May 10 22:00:30 2001 -@@ -195,10 +195,8 @@ - * 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. */ -+ strlcpy(fileName, "/var/tmp/tcltmp.XXXXXX", L_tmpnam); -+ fd = mkstemp(fileName); /* INTL: Native. */ - if (fd == -1) { - return NULL; - } |