summaryrefslogtreecommitdiffstats
path: root/contrib/tcl/unix
diff options
context:
space:
mode:
authorpst <pst@FreeBSD.org>1997-11-27 19:49:05 +0000
committerpst <pst@FreeBSD.org>1997-11-27 19:49:05 +0000
commit10ddeda1f7695845a8cf461ed2472f333c7a83c0 (patch)
treec038940a790bdd7908298c07b12c2f769b5febcb /contrib/tcl/unix
parent9e7dd6797930e89233ca858144cbffd8d15d4e13 (diff)
parent8bd128dbdcfa494c5de67f1aa036784f0b3ac26e (diff)
downloadFreeBSD-src-10ddeda1f7695845a8cf461ed2472f333c7a83c0.zip
FreeBSD-src-10ddeda1f7695845a8cf461ed2472f333c7a83c0.tar.gz
This commit was generated by cvs2svn to compensate for changes in r31434,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/tcl/unix')
-rw-r--r--contrib/tcl/unix/Makefile.in32
-rwxr-xr-xcontrib/tcl/unix/configure.in12
-rw-r--r--contrib/tcl/unix/porting.notes30
-rw-r--r--contrib/tcl/unix/tclUnixChan.c10
-rw-r--r--contrib/tcl/unix/tclUnixFCmd.c29
-rw-r--r--contrib/tcl/unix/tclUnixNotfy.c11
-rw-r--r--contrib/tcl/unix/tclUnixPipe.c10
-rw-r--r--contrib/tcl/unix/tclUnixSock.c8
-rw-r--r--contrib/tcl/unix/tclUnixTest.c6
-rw-r--r--contrib/tcl/unix/tclXtTest.c4
10 files changed, 100 insertions, 52 deletions
diff --git a/contrib/tcl/unix/Makefile.in b/contrib/tcl/unix/Makefile.in
index 8d2d7c8..6b15ff5 100644
--- a/contrib/tcl/unix/Makefile.in
+++ b/contrib/tcl/unix/Makefile.in
@@ -5,7 +5,7 @@
# "autoconf" program (constructs like "@foo@" will get replaced in the
# actual Makefile.
#
-# SCCS: @(#) Makefile.in 1.187 97/08/15 10:23:55
+# SCCS: @(#) Makefile.in 1.190 97/11/05 10:57:38
# Current Tcl version; used in various names.
@@ -73,12 +73,7 @@ MANN_INSTALL_DIR = $(MAN_INSTALL_DIR)/mann
# To change the compiler switches, for example to change from -O
# to -g, change the following line:
-# On systems where both getcwd(3) and getwd(3) exist, check the man
-# page and if getcwd, like on Solaris, uses popen to pwd(1)
-# add -DUSEGETWD to the flags so getwd will be used instead.
CFLAGS = -O
-# Solaris recommended:
-#CFLAGS = -O -DUSEGETWD
# To disable ANSI-C procedure prototypes reverse the comment characters
# on the following lines:
@@ -890,6 +885,11 @@ dist: $(UNIX_DIR)/configure
cp -p $(UNIX_DIR)/dltest/configure.in $(UNIX_DIR)/dltest/configure \
$(UNIX_DIR)/dltest/README $(DISTDIR)/unix/dltest
+#
+# The following target can only be used for non-patch releases. Use
+# the "allpatch" target below for patch releases.
+#
+
alldist: dist
rm -f /proj/tcl/dist/$(DISTNAME).tar.Z \
/proj/tcl/dist/$(DISTNAME).tar.gz \
@@ -899,6 +899,26 @@ alldist: dist
compress $(DISTNAME).tar; zip -r8 $(ZIPNAME) $(DISTNAME)
#
+# The target below is similar to "alldist" except it works for patch
+# releases. It is needed because patch releases are peculiar: the
+# patch designation appears in the name of the compressed file
+# (e.g. tcl8.0p1.tar.gz) but the extracted source directory doesn't
+# include the patch designation (e.g. tcl8.0).
+#
+
+allpatch: dist
+ rm -f /proj/tcl/dist/$(DISTNAME).tar.Z \
+ /proj/tcl/dist/$(DISTNAME).tar.gz \
+ /proj/tcl/dist/$(ZIPNAME)
+ mv /proj/tcl/dist/tcl${VERSION} /proj/tcl/dist/old
+ mv /proj/tcl/dist/$(DISTNAME) /proj/tcl/dist/tcl${VERSION}
+ cd /proj/tcl/dist; tar cf $(DISTNAME).tar tcl${VERSION}; \
+ gzip -9 -c $(DISTNAME).tar > $(DISTNAME).tar.gz; \
+ compress $(DISTNAME).tar; zip -r8 $(ZIPNAME) tcl${VERSION}
+ mv /proj/tcl/dist/tcl${VERSION} /proj/tcl/dist/$(DISTNAME)
+ mv /proj/tcl/dist/old /proj/tcl/dist/tcl${VERSION}
+
+#
# Target to create a Macintosh version of the distribution. This will
# do a normal distribution and then massage the output to prepare it
# for moving to the Mac platform. This requires a few scripts and
diff --git a/contrib/tcl/unix/configure.in b/contrib/tcl/unix/configure.in
index 27fa8b1..ee36dc4 100755
--- a/contrib/tcl/unix/configure.in
+++ b/contrib/tcl/unix/configure.in
@@ -2,12 +2,12 @@ dnl This file is an input file used by the GNU "autoconf" program to
dnl generate the file "configure", which is run during Tcl installation
dnl to configure the system for the local environment.
AC_INIT(../generic/tcl.h)
-# SCCS: @(#) configure.in 1.140 97/08/12 10:36:18
+# SCCS: @(#) configure.in 1.144 97/11/20 12:39:44
TCL_VERSION=8.0
TCL_MAJOR_VERSION=8
TCL_MINOR_VERSION=0
-TCL_PATCH_LEVEL=""
+TCL_PATCH_LEVEL="p2"
VERSION=${TCL_VERSION}
if test "${prefix}" = "NONE"; then
@@ -36,7 +36,7 @@ AC_C_CROSS
# Check if Posix compliant getcwd exists, if not we'll use getwd.
AC_CHECK_FUNCS(getcwd, , AC_DEFINE(USEGETWD))
-# Nb: if getcwd uses popen and pwd(1) (like Solaris) we should really
+# Nb: if getcwd uses popen and pwd(1) (like SunOS 4) we should really
# define USEGETWD even if the posix getcwd exists. Add a test ?
AC_REPLACE_FUNCS(opendir strstr)
@@ -269,6 +269,12 @@ if test $libbsd = yes; then
fi
#--------------------------------------------------------------------
+# Some systems (e.g., IRIX 4.0.5) lack the st_blksize field
+# in struct stat.
+#--------------------------------------------------------------------
+AC_STRUCT_ST_BLKSIZE
+
+#--------------------------------------------------------------------
# On some systems strstr is broken: it returns a pointer even
# even if the original string is empty.
#--------------------------------------------------------------------
diff --git a/contrib/tcl/unix/porting.notes b/contrib/tcl/unix/porting.notes
index 39b35cb..2d0a403 100644
--- a/contrib/tcl/unix/porting.notes
+++ b/contrib/tcl/unix/porting.notes
@@ -11,7 +11,7 @@ cases the person's name and e-mail address are listed. I'm
interested in getting new porting information to add to the file;
please mail updates to "john.ousterhout@eng.sun.com".
-This file reflects information provided for Tcl 7.4 and later releases.
+This file reflects information provided for Tcl 7.4 and later releases (8.x).
If there is no information for your configuration in this file, check
the file "porting.old" too; it contains information that was
submitted for Tcl 7.3 and earlier releases, and some of that information
@@ -19,14 +19,14 @@ may still be valid.
A new porting database has recently become available on the Web at
the following URL:
- http://www.sunlabs.com/cgi-bin/tcl/info.4.0
-This page provides information about the platforms on which Tcl 7.4
-and Tk 4.0 have been compiled and what changes were needed to get Tcl
+ http://www.sunlabs.com/cgi-bin/tcl/info.8.0
+This page provides information about the platforms on which Tcl and
+and Tk 8.0 have been compiled and what changes were needed to get Tcl
and Tk to compile. You can also add new entries to that database
when you install Tcl and Tk on a new platform. The Web database is
likely to be more up-to-date than this file.
-sccsid = SCCS: @(#) porting.notes 1.18 96/12/31 14:50:27
+sccsid = SCCS: @(#) porting.notes 1.20 97/11/03 09:43:40
--------------------------------------------
Solaris, various versions
@@ -51,6 +51,26 @@ run and add "-DNO_DIRENT_H=1" to the definitions of DEFS. Do this
before compiling.
--------------------------------------------
+SunOS 4 and potentially other OSes
+--------------------------------------------
+
+On systems where both getcwd(3) and getwd(3) exist, check the man
+page and if getcwd, like on SunOS 4, uses popen to pwd(1)
+add -DUSEGETWD to the flags CFLAGS so getwd will be used instead.
+
+That is, change the CFLAGS = -O line so it reads
+CFLAGS = -O -DUSEGETWD
+
+--------------------------------------------
+Linux, ELF, various versions/distributions
+--------------------------------------------
+
+If ./configure --enable-shared complains it can not do a shared
+library you might have to make the following symbolic link:
+ln -s /lib/libdl.so.1 /lib/libdl.so
+then remove config.cache and re run configure.
+
+--------------------------------------------
Pyramid DC/OSx SVr4, DC/OSx version 94c079
--------------------------------------------
diff --git a/contrib/tcl/unix/tclUnixChan.c b/contrib/tcl/unix/tclUnixChan.c
index 2e53440..2c0e996 100644
--- a/contrib/tcl/unix/tclUnixChan.c
+++ b/contrib/tcl/unix/tclUnixChan.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * SCCS: @(#) tclUnixChan.c 1.203 97/06/20 13:03:18
+ * SCCS: @(#) tclUnixChan.c 1.207 97/11/04 14:45:29
*/
#include "tclInt.h" /* Internal definitions for Tcl. */
@@ -1713,7 +1713,7 @@ TcpGetOptionProc(instanceData, interp, optionName, dsPtr)
}
Tcl_DStringAppendElement(dsPtr, inet_ntoa(sockname.sin_addr));
hostEntPtr = gethostbyaddr((char *) &(sockname.sin_addr),
- sizeof(peername.sin_addr), AF_INET);
+ sizeof(sockname.sin_addr), AF_INET);
if (hostEntPtr != (struct hostent *) NULL) {
Tcl_DStringAppendElement(dsPtr, hostEntPtr->h_name);
} else {
@@ -2360,6 +2360,7 @@ Tcl_GetOpenFile(interp, string, forWriting, checkUsage, filePtr)
Tcl_Channel chan;
int chanMode;
Tcl_ChannelType *chanTypePtr;
+ ClientData data;
int fd;
FILE *f;
@@ -2387,8 +2388,9 @@ Tcl_GetOpenFile(interp, string, forWriting, checkUsage, filePtr)
if ((chanTypePtr == &fileChannelType) || (chanTypePtr == &tcpChannelType)
|| (strcmp(chanTypePtr->typeName, "pipe") == 0)) {
if (Tcl_GetChannelHandle(chan,
- (forWriting ? TCL_WRITABLE : TCL_READABLE), (ClientData*) &fd)
- == TCL_OK) {
+ (forWriting ? TCL_WRITABLE : TCL_READABLE),
+ (ClientData*) &data) == TCL_OK) {
+ fd = (int) data;
/*
* The call to fdopen below is probably dangerous, since it will
diff --git a/contrib/tcl/unix/tclUnixFCmd.c b/contrib/tcl/unix/tclUnixFCmd.c
index 51224e6..3ec1a69 100644
--- a/contrib/tcl/unix/tclUnixFCmd.c
+++ b/contrib/tcl/unix/tclUnixFCmd.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * SCCS: @(#) tclUnixFCmd.c 1.29 97/06/16 16:28:25
+ * SCCS: @(#) tclUnixFCmd.c 1.31 97/10/13 16:51:14
*
* Portions of this code were derived from NetBSD source code which has
* the following copyright notice:
@@ -363,7 +363,12 @@ CopyFile(src, dst, srcStatBufPtr)
return TCL_ERROR;
}
+#if HAVE_ST_BLKSIZE
blockSize = srcStatBufPtr->st_blksize;
+#else
+ blockSize = 4096;
+#endif
+
buffer = ckalloc(blockSize);
while (1) {
nread = read(srcFd, buffer, blockSize);
@@ -937,16 +942,11 @@ GetGroupAttribute(interp, objIndex, fileName, attributePtrPtr)
groupPtr = getgrgid(statBuf.st_gid);
if (groupPtr == NULL) {
- endgrent();
- Tcl_AppendStringsToObj(Tcl_GetObjResult(interp),
- "could not get group for file \"", fileName, "\": ",
- Tcl_PosixError(interp), (char *) NULL);
- return TCL_ERROR;
+ *attributePtrPtr = Tcl_NewIntObj(statBuf.st_gid);
+ } else {
+ *attributePtrPtr = Tcl_NewStringObj(groupPtr->gr_name, -1);
}
-
- *attributePtrPtr = Tcl_NewStringObj(groupPtr->gr_name, -1);
endgrent();
-
return TCL_OK;
}
@@ -986,16 +986,11 @@ GetOwnerAttribute(interp, objIndex, fileName, attributePtrPtr)
pwPtr = getpwuid(statBuf.st_uid);
if (pwPtr == NULL) {
- endpwent();
- Tcl_AppendStringsToObj(Tcl_GetObjResult(interp),
- "could not get owner for file \"", fileName, "\": ",
- Tcl_PosixError(interp), (char *) NULL);
- return TCL_ERROR;
+ *attributePtrPtr = Tcl_NewIntObj(statBuf.st_uid);
+ } else {
+ *attributePtrPtr = Tcl_NewStringObj(pwPtr->pw_name, -1);
}
-
- *attributePtrPtr = Tcl_NewStringObj(pwPtr->pw_name, -1);
endpwent();
-
return TCL_OK;
}
diff --git a/contrib/tcl/unix/tclUnixNotfy.c b/contrib/tcl/unix/tclUnixNotfy.c
index 857454c..1a86680 100644
--- a/contrib/tcl/unix/tclUnixNotfy.c
+++ b/contrib/tcl/unix/tclUnixNotfy.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * SCCS: @(#) tclUnixNotfy.c 1.42 97/07/02 20:55:44
+ * SCCS: @(#) tclUnixNotfy.c 1.44 97/11/05 13:02:20
*/
#include "tclInt.h"
@@ -266,7 +266,8 @@ Tcl_DeleteFileHandler(fd)
int fd; /* Stream id for which to remove callback procedure. */
{
FileHandler *filePtr, *prevPtr;
- int index, bit, mask, i;
+ int index, bit, i;
+ unsigned long flags;
if (!initialized) {
InitNotifier();
@@ -310,12 +311,12 @@ Tcl_DeleteFileHandler(fd)
if (fd+1 == notifier.numFdBits) {
for (notifier.numFdBits = 0; index >= 0; index--) {
- mask = notifier.checkMasks[index]
+ flags = notifier.checkMasks[index]
| (notifier.checkMasks+MASK_SIZE)[index]
| (notifier.checkMasks+2*(MASK_SIZE))[index];
- if (mask) {
+ if (flags) {
for (i = (NBBY*sizeof(fd_mask)); i > 0; i--) {
- if (mask & (1 << (i-1))) {
+ if (flags & (((unsigned long)1) << (i-1))) {
break;
}
}
diff --git a/contrib/tcl/unix/tclUnixPipe.c b/contrib/tcl/unix/tclUnixPipe.c
index f6d90d7..83aa4e8 100644
--- a/contrib/tcl/unix/tclUnixPipe.c
+++ b/contrib/tcl/unix/tclUnixPipe.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * SCCS: @(#) tclUnixPipe.c 1.36 97/05/14 13:24:24
+ * SCCS: @(#) tclUnixPipe.c 1.37 97/10/31 17:23:37
*/
#include "tclInt.h"
@@ -22,7 +22,7 @@
* the same as NULL.
*/
-#define MakeFile(fd) ((TclFile)((fd)+1))
+#define MakeFile(fd) ((TclFile)(((int)fd)+1))
#define GetFd(file) (((int)file)-1)
/*
@@ -100,11 +100,11 @@ TclpMakeFile(channel, direction)
Tcl_Channel channel; /* Channel to get file from. */
int direction; /* Either TCL_READABLE or TCL_WRITABLE. */
{
- int fd;
+ ClientData data;
- if (Tcl_GetChannelHandle(channel, direction, (ClientData *) &fd)
+ if (Tcl_GetChannelHandle(channel, direction, (ClientData *) &data)
== TCL_OK) {
- return MakeFile(fd);
+ return MakeFile((int)data);
} else {
return (TclFile) NULL;
}
diff --git a/contrib/tcl/unix/tclUnixSock.c b/contrib/tcl/unix/tclUnixSock.c
index b917832..c532993 100644
--- a/contrib/tcl/unix/tclUnixSock.c
+++ b/contrib/tcl/unix/tclUnixSock.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * SCCS: @(#) tclUnixSock.c 1.7 97/07/24 17:54:02
+ * SCCS: @(#) tclUnixSock.c 1.9 97/10/09 18:24:49
*/
#include "tcl.h"
@@ -47,11 +47,12 @@ static int hostnameInited = 0;
*
* Tcl_GetHostName --
*
- * Get the network name for this machine, in a system dependent way.
+ * Returns the name of the local host.
*
* Results:
* A string containing the network name for this machine, or
- * an empty string if we can't figure out the name.
+ * an empty string if we can't figure out the name. The caller
+ * must not modify or free this string.
*
* Side effects:
* None.
@@ -72,6 +73,7 @@ Tcl_GetHostName()
}
#ifndef NO_UNAME
+ (VOID *) memset((VOID *) &u, (int) 0, sizeof(struct utsname));
if (uname(&u) > -1) {
hp = gethostbyname(u.nodename);
if (hp != NULL) {
diff --git a/contrib/tcl/unix/tclUnixTest.c b/contrib/tcl/unix/tclUnixTest.c
index 67717d0..b1d1676 100644
--- a/contrib/tcl/unix/tclUnixTest.c
+++ b/contrib/tcl/unix/tclUnixTest.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * SCCS: @(#) tclUnixTest.c 1.4 97/05/14 13:24:29
+ * SCCS: @(#) tclUnixTest.c 1.5 97/10/31 17:23:42
*/
#include "tclInt.h"
@@ -343,6 +343,7 @@ TestfilewaitCmd(clientData, interp, argc, argv)
int mask, result, timeout;
Tcl_Channel channel;
int fd;
+ ClientData data;
if (argc != 4) {
Tcl_AppendResult(interp, "wrong # arguments: should be \"", argv[0],
@@ -366,10 +367,11 @@ TestfilewaitCmd(clientData, interp, argc, argv)
}
if (Tcl_GetChannelHandle(channel,
(mask & TCL_READABLE) ? TCL_READABLE : TCL_WRITABLE,
- (ClientData*) &fd) != TCL_OK) {
+ (ClientData*) &data) != TCL_OK) {
Tcl_SetResult(interp, "couldn't get channel file", TCL_STATIC);
return TCL_ERROR;
}
+ fd = (int) data;
if (Tcl_GetInt(interp, argv[3], &timeout) != TCL_OK) {
return TCL_ERROR;
}
diff --git a/contrib/tcl/unix/tclXtTest.c b/contrib/tcl/unix/tclXtTest.c
index bb23256..1479412 100644
--- a/contrib/tcl/unix/tclXtTest.c
+++ b/contrib/tcl/unix/tclXtTest.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * SCCS: @(#) tclXtTest.c 1.1 97/03/24 14:30:42
+ * SCCS: @(#) tclXtTest.c 1.2 97/09/15 15:26:52
*/
#include <X11/Intrinsic.h>
@@ -100,7 +100,7 @@ TesteventloopCmd(clientData, interp, argc, argv)
done = 0;
while (!done) {
- XtProcessEvent(XtIMAll);
+ XtAppProcessEvent(TclSetAppContext(NULL), XtIMAll);
}
(void) Tcl_SetServiceMode(oldMode);
framePtr = oldFramePtr;
OpenPOWER on IntegriCloud