summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>2000-02-10 08:53:14 (GMT)
committerhobbs <hobbs>2000-02-10 08:53:14 (GMT)
commit38362e8f5997f57fd93f4fdc48ae5b14e988b7c2 (patch)
tree792e35f923db1468f1898b0e36a7de40dfe261b5
parent4dfb3aeabdcba38301d5fb68534eec9dc88028bd (diff)
downloadtk-38362e8f5997f57fd93f4fdc48ae5b14e988b7c2.zip
tk-38362e8f5997f57fd93f4fdc48ae5b14e988b7c2.tar.gz
tk-38362e8f5997f57fd93f4fdc48ae5b14e988b7c2.tar.bz2
* unix/tkUnixWm.c (Tk_CoordsToWindow): qualified delete of error
handler as the goto label is reached from above and below. * unix/configure.in: * unix/aclocal.m4: cleaned up macros to coincide with tcl.m4, added -export-dynamic to LDFLAGS for FreeBSD-3+ [Bug: 2998] * unix/README: * unix/Makefile.in (dist): removed porting.notes and porting.old from distribution and CVS. The information was very outdated. Now refer to http://dev.scriptics.com/services/support/platforms.html
-rw-r--r--unix/Makefile.in3
-rw-r--r--unix/README38
-rw-r--r--unix/aclocal.m465
-rw-r--r--unix/configure.in15
-rw-r--r--unix/porting.notes86
-rw-r--r--unix/porting.old324
-rw-r--r--unix/tkUnixWm.c13
7 files changed, 78 insertions, 466 deletions
diff --git a/unix/Makefile.in b/unix/Makefile.in
index 5681a75..10827f9 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -5,7 +5,7 @@
# "autoconf" program (constructs like "@foo@" will get replaced in the
# actual Makefile.
#
-# RCS: @(#) $Id: Makefile.in,v 1.39 2000/02/08 11:31:36 hobbs Exp $
+# RCS: @(#) $Id: Makefile.in,v 1.40 2000/02/10 08:53:14 hobbs Exp $
# Current Tk version; used in various names.
@@ -943,7 +943,6 @@ dist: $(UNIX_DIR)/configure
cp $(UNIX_DIR)/configure $(UNIX_DIR)/configure.in \
$(UNIX_DIR)/aclocal.m4 \
$(UNIX_DIR)/tkConfig.sh.in $(TCLDIR)/unix/install-sh \
- $(UNIX_DIR)/porting.notes $(UNIX_DIR)/porting.old \
$(UNIX_DIR)/README $(DISTDIR)/unix
chmod 775 $(DISTDIR)/unix/configure $(DISTDIR)/unix/configure.in
chmod +x $(DISTDIR)/unix/install-sh
diff --git a/unix/README b/unix/README
index e1b9dc7..523f3a6 100644
--- a/unix/README
+++ b/unix/README
@@ -6,7 +6,11 @@ UNIX versions of Tk. This directory also contains source files for Tk
that are specific to UNIX.
The information in this file is maintained at:
- http://www.scriptics.com/support/howto/compile.html
+ http://www.scriptics.com/support/howto/compile.html
+
+For information on platforms where Tcl/Tk is known to compile, along
+with any porting notes for getting it to work on those platforms, see:
+ http://dev.scriptics.com/services/support/platforms.html
The rest of this file contains instructions on how to do this. The
release should compile and run either "out of the box" or with trivial
@@ -16,7 +20,7 @@ SGI, as well as PCs running Linux, BSDI, and SCO UNIX. To compile for
a PC running Windows, see the README file in the directory ../win. To
compile for a Macintosh, see the README file in the directory ../mac.
-RCS: @(#) $Id: README,v 1.7 1999/10/01 22:45:27 hobbs Exp $
+RCS: @(#) $Id: README,v 1.8 2000/02/10 08:53:15 hobbs Exp $
How To Compile And Install Tk:
------------------------------
@@ -44,6 +48,8 @@ How To Compile And Install Tk:
itself to use gcc if it is available on your
system. Note: it is not safe to modify the
Makefile to use gcc after configure is run.
+ --enable-threads Tk on Unix currently does not support
+ threaded builds.
--with-tcl=DIR Specifies the directory containing the Tcl
binaries and Tcl's platform-dependent
configuration information. By default
@@ -51,19 +57,23 @@ How To Compile And Install Tk:
location given by (a) above.
--enable-shared If this switch is specified, Tk will compile
itself as a shared library if it can figure
- out how to do that on this platform.
+ out how to do that on this platform. This
+ is the default on platforms where we know
+ how to build shared libraries.
+ --disable-shared If this switch is specified, Tk will compile
+ itself as a static library.
Note: be sure to use only absolute path names (those starting with "/")
in the --prefix and --exec_prefix options.
-(e) Type "make". This will create a library archive called "libtk.a"
- or "libtk.so" and an interpreter application called "wish" that
- allows you to type Tcl commands interactively or execute script files.
+(e) Type "make". This will create a library archive called
+ "libtk<version>.a" or "libtk<version>.so" and an interpreter
+ application called "wish" that allows you to type Tcl commands
+ interactively or execute script files.
(f) If the make fails then you'll have to personalize the Makefile
for your site or possibly modify the distribution in other ways.
- First check the file "porting.notes" to see if there are hints
- for compiling on your system. Then look at the porting Web page
- described later in this file. If you need to modify Makefile,
+ First check the porting Web page above to see if there are hints
+ for compiling on your system. If you need to modify Makefile,
there are comments at the beginning of it that describe the things
you might want to change and how to change them.
@@ -88,11 +98,11 @@ How To Compile And Install Tk:
versions, either specify the version number or create a symbolic
link (e.g. from "wish" to "wish8.3").
-If you have trouble compiling Tk, read through the file
-"porting.notes". It contains information that people have provided
-about changes they had to make to compile Tcl in various environments.
-We're also interested in hearing how to change the configuration setup
-so that Tcl compiles on additional platforms "out of the box".
+If you have trouble compiling Tk, see the URL noted above about working
+platforms. It contains information that people have provided about changes
+they had to make to compile Tk in various environments. We're also
+interested in hearing how to change the configuration setup so that Tk
+compiles on additional platforms "out of the box".
Test suite
----------
diff --git a/unix/aclocal.m4 b/unix/aclocal.m4
index 714b8d5..6ee04c1 100644
--- a/unix/aclocal.m4
+++ b/unix/aclocal.m4
@@ -543,6 +543,12 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
fi
fi
+ if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then
+ using_gcc="yes"
+ else
+ using_gcc="no"
+ fi
+
# Step 2: check for existence of -ldl library. This is needed because
# Linux can use either -ldl or -ldld for dynamic loading.
@@ -560,14 +566,21 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
TCL_LIB_VERSIONS_OK=ok
CFLAGS_DEBUG=-g
CFLAGS_OPTIMIZE=-O
+ if test "$using_gcc" = "yes" ; then
+ CFLAGS_WARNING="-Wall -Wconversion -Wno-implicit-int"
+ else
+ CFLAGS_WARNING=""
+ fi
TCL_NEEDS_EXP_FILE=0
TCL_BUILD_EXP_FILE=""
TCL_EXP_FILE=""
case $system in
AIX-4.[[2-9]])
- # The IBM compiler has a bug with -O when compiling the
- # text widget code (TkTextPixelIndex segv)
- CFLAGS_OPTIMIZE=""
+ if test "$using_gcc" = "no" ; then
+ # The IBM compiler has a bug with -O when compiling the
+ # text widget code (TkTextPixelIndex segv)
+ CFLAGS_OPTIMIZE=""
+ fi
SHLIB_CFLAGS=""
SHLIB_LD=$TCL_SHLIB_LD
SHLIB_LD_LIBS='${LIBS}'
@@ -576,7 +589,7 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
DL_LIBS="-ldl ${TCL_BUILD_LIB_SPEC}"
LDFLAGS=""
LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
- TCL_NEEDS_EXP_FILE=1
+ TCL_NEEDS_EXP_FILE=0
TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp'
;;
AIX-*)
@@ -654,7 +667,7 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
DL_OBJS="tclLoadDl.o"
DL_LIBS=""
LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
- if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then
+ if test "$using_gcc" = "yes" ; then
EXTRA_CFLAGS="-mabi=n32"
LDFLAGS="-mabi=n32"
else
@@ -777,7 +790,7 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
SHLIB_SUFFIX=".so"
DL_OBJS="tclLoadDl.o"
DL_LIBS=""
- LDFLAGS=""
+ LDFLAGS="-export-dynamic"
LD_SEARCH_FLAGS=""
;;
NEXTSTEP-*)
@@ -839,16 +852,21 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
;;
SCO_SV-3.2*)
- # Note, dlopen is available only on SCO 3.2.5 and greater. However,
+ # Note, dlopen is available only on SCO 3.2.5 and greater. However,
# this test works, since "uname -s" was non-standard in 3.2.4 and
# below.
- SHLIB_CFLAGS="-Kpic -belf"
+ if test "$using_gcc" = "yes" ; then
+ SHLIB_CFLAGS="-fPIC -melf"
+ LDFLAGS="-melf -Wl,-Bexport"
+ else
+ SHLIB_CFLAGS="-Kpic -belf"
+ LDFLAGS="-belf -Wl,-Bexport"
+ fi
SHLIB_LD="ld -G"
SHLIB_LD_LIBS=""
SHLIB_SUFFIX=".so"
DL_OBJS="tclLoadDl.o"
DL_LIBS=""
- LDFLAGS="-belf -Wl,-Bexport"
LD_SEARCH_FLAGS=""
;;
SINIX*5.4*)
@@ -901,20 +919,20 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
do64bit_ok=no
if test "$do64bit" = "yes" ; then
- arch=`isainfo`
- if test "$arch" = "sparcv9 sparc" ; then
- if test "$CC" != "gcc" -a `$CC -v 2>&1 | grep -c gcc` = "0" ; then
- do64bit_ok=yes
- EXTRA_CFLAGS="-xarch=v9"
- LDFLAGS="-xarch=v9"
- else
- AC_MSG_WARN("64bit mode not supported using GCC on $system")
+ arch=`isainfo`
+ if test "$arch" = "sparcv9 sparc" ; then
+ if test "$using_gcc" = "no" ; then
+ do64bit_ok=yes
+ EXTRA_CFLAGS="-xarch=v9"
+ LDFLAGS="-xarch=v9"
+ else
+ AC_MSG_WARN("64bit mode not supported with GCC on $system")
+ fi
+ else
+ AC_MSG_WARN("64bit mode only supported sparcv9 system")
fi
- else
- AC_MSG_WARN("64bit mode only supported sparcv9 system")
- fi
fi
-
+
# Note: need the LIBS below, otherwise Tk won't find Tcl's
# symbols when dynamically loaded into tclsh.
@@ -922,7 +940,7 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
SHLIB_SUFFIX=".so"
DL_OBJS="tclLoadDl.o"
DL_LIBS="-ldl"
- if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then
+ if test "$using_gcc" = "yes" ; then
LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
else
LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
@@ -1071,7 +1089,7 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
# standard manufacturer compiler.
if test "$DL_OBJS" != "tclLoadNone.o" ; then
- if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then
+ if test "$using_gcc" = "yes" ; then
case $system in
AIX-*)
;;
@@ -1102,6 +1120,7 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
AC_SUBST(DL_LIBS)
AC_SUBST(CFLAGS_DEBUG)
AC_SUBST(CFLAGS_OPTIMIZE)
+ AC_SUBST(CFLAGS_WARNING)
])
#--------------------------------------------------------------------
diff --git a/unix/configure.in b/unix/configure.in
index 6d88bca..e23dfd5 100644
--- a/unix/configure.in
+++ b/unix/configure.in
@@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to
dnl generate the file "configure", which is run during Tk installation
dnl to configure the system for the local environment.
AC_INIT(../generic/tk.h)
-# RCS: @(#) $Id: configure.in,v 1.46 2000/02/08 10:01:04 hobbs Exp $
+# RCS: @(#) $Id: configure.in,v 1.47 2000/02/10 08:53:16 hobbs Exp $
TK_VERSION=8.3
TK_MAJOR_VERSION=8
@@ -35,16 +35,6 @@ AC_HAVE_HEADERS(unistd.h limits.h)
SC_ENABLE_THREADS
-#------------------------------------------------------------------------
-# Set the warning flags depending on whether or not we are using gcc
-#------------------------------------------------------------------------
-
-if test "${GCC}" = "yes" ; then
- CFLAGS_WARNING="-Wall -Wconversion -Wno-implicit-int"
-else
- CFLAGS_WARNING=""
-fi
-
#------------------------------------------------------------------------------
# If we're using GCC, see if the compiler understands -pipe. If so, use it.
# It makes compiling go faster. (This is only a performance feature.)
@@ -427,10 +417,7 @@ AC_SUBST(TCL_STUB_FLAGS)
AC_SUBST(TK_BUILD_EXP_FILE)
AC_SUBST(TK_EXP_FILE)
-AC_SUBST(CFLAGS_DEBUG)
AC_SUBST(CFLAGS_DEFAULT)
-AC_SUBST(CFLAGS_OPTIMIZE)
-AC_SUBST(CFLAGS_WARNING)
AC_SUBST(TK_DBGX)
AC_SUBST(DL_LIBS)
AC_SUBST(EXTRA_CFLAGS)
diff --git a/unix/porting.notes b/unix/porting.notes
deleted file mode 100644
index 6c9e156..0000000
--- a/unix/porting.notes
+++ /dev/null
@@ -1,86 +0,0 @@
-This file contains a collection of notes that various people have
-provided about porting Tk to various machines and operating systems.
-I don't have personal access to any of these machines, so I make
-no guarantees that the notes are correct, complete, or up-to-date.
-If you see the word "I" in any explanations, it refers to the person
-who contributed the information, not to me; this means that I
-probably can't answer any questions about any of this stuff. In
-some cases, a person has volunteered to act as a contact point for
-questions about porting Tcl to a particular machine; in these
-cases the person's name and e-mail address are listed. I'm very
-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 Tk 4.0 and later releases.
-If there is no information for your configuration in this file, check
-the file "porting.old" too; it contains information that was
-submitted for Tk 3.6 and earlier releases, and some of that information
-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
-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.
-
-RCS: @(#) $Id: porting.notes,v 1.2 1998/09/14 18:23:54 stanton Exp $
-
---------------------------------------------
-Solaris, various versions
---------------------------------------------
-
-1. If typing "make test" results in an error message saying that
-there are no "*.test" files, or you get lots of globbing errors,
-it's probably because your system doesn't have cc installed and
-you used gcc. In order for this to work, you have to set your
-CC environment variable to gcc and your CPP environment variable
-to "gcc -E" before running the configure script.
-
-2. Make sure that /usr/ucb is not in your PATH or LD_LIBRARY_PATH
-environment variables; this will cause confusion between the new
-Solaris libraries and older UCB versions (Tk will expect one version
-and get another).
-
-3. On 486 PCs with Solaris 2.4, when compiling with gcc 2.6.0,
-tkMessage.c appears to hang gcc. If the -O switch is removed
-then it compiles fine.
-
---------------------------------------------
-486 PCs, Solaris 2.4
---------------------------------------------
-
-When compiling with gcc 2.6.0, tkMessage.c appears to hang gcc.
-If the -O switch is removed then it compiles fine.
-
---------------------------------------------
-SGI machines, IRIX 5.2, 5.3, IRIX64 6.0.1
---------------------------------------------
-
-1. Add "-D_BSD_TIME" to CFLAGS in Makefile. This avoids type conflicts
-in the prototype for the gettimeofday procedure.
-
-2. If you're running under Irix 6.x and wish dumps core, try
-removing -O from the CFLAGS in Makefile and recompiling; compiler
-optimizations seem to cause problems on some machines.
-
---------------------------------------------
-QNX 4.22
---------------------------------------------
-
-All of the source files built as is. All I had to do was edit the
-Makefile generated by ./configure to specify where the X11 libraries
-were (ie, I added in -L/usr/X11/lib)
-
---------------------------------------------
-HP-UX
---------------------------------------------
-
-There are problems compiling Tk gcc (version 2.7.2) and the HP assembler.
-The problem is that if static functions are called using a pointer reference,
-double arguments are not transferred correctly into the function. That can
-be fixed by making all those functions global. This happens with the
-ScaleXxx() and TranslateXxx() functions for all canvas item types.
-The simplest fix is configure gcc to use the GNU assembler.
diff --git a/unix/porting.old b/unix/porting.old
deleted file mode 100644
index de41beb..0000000
--- a/unix/porting.old
+++ /dev/null
@@ -1,324 +0,0 @@
-This is an old version of the file "porting.notes". It contains
-porting information that people submitted for Tk releases numbered
-3.6 and earlier. You may find information in this file useful if
-there is no information available for your machine in the current
-version of "porting.notes".
-
-I don't have personal access to any of these machines, so I make
-no guarantees that the notes are correct, complete, or up-to-date.
-If you see the word "I" in any explanations, it refers to the person
-who contributed the information, not to me; this means that I
-probably can't answer any questions about any of this stuff. In
-some cases, a person has volunteered to act as a contact point for
-questions about porting Tcl to a particular machine; in these
-cases the person's name and e-mail address are listed. I'd be
-happy to receive corrections or updates.
-
-RCS: @(#) $Id: porting.old,v 1.2 1998/09/14 18:23:54 stanton Exp $
-
----------------------------------------------
-DEC Alphas:
----------------------------------------------
-
-1. There appears to be a compiler/library bug that prevents tkTrig.c
-from compiling unless you turn off optimization (remove the -O compiler
-switch). The problem appears to have been fixed in the 1.3-4 version
-of the compiler.
-
----------------------------------------------
-HP-UX systems:
----------------------------------------------
-
-1. Configuration:
- HP-UX Release 7.05 on a series 300 (68k) machine.
- The native cc has been used for production.
- X11r4 libraries and include files were taken from
- internet archives, where as the server came with HPUX release 7.05.
-
- Problems:
- Symbol table space for cc had to be increased with: -Wc,-Ns3000
- tkBind.c did not compile under -O:
- C1 internal error in "GetField": Set Error Detected
- *** Error code 1
- tkBind.c did compile without optimization (no -O).
-
-2. Note: if you have trouble getting xauth-style access control to work
-(and you'll need xauth if you want to use "send"), be sure to uncomment
-the line
-
-# Vuelogin*authorize: True
-
-in the file /usr/vue/config/Xconfig, so that the server starts up with
-authorization enabled. Also, you may have to reboot the machine in
-order to force the server to restart.
-
----------------------------------------------
-SCO Unix:
----------------------------------------------
-
-Getting Tk to run under SCO Unix:
-
-Add a "#undef select" to tkEvent.c, and remove the reference to TK_EXCEPTION
-around line 460 of main.c.
-
-Tk uses its own scheme for allocating the border colors for its 3D widgets,
-which causes problems when running TK on a system with "PseudoColor"
-display class, and a 16-cell colormap.
-
-If you can't go to eight bitplanes, you can instead start the server with a
-"-static" (Xsco) or "-analog" (Xsight) option, making the display class
-become "StaticColor". This makes the entire colormap read-only, and it will
-return the color that most closely maps to the desired color as possible.
-
----------------------------------------------
-Silicon Graphics systems:
----------------------------------------------
-
-1. Change the CC variable in the Makefile to:
-
-CC = cc -xansi -D__STDC__ -signed
-
-2. Change the LIBS variable in the Makefile to use the X11 shared library
- ("-lX11_s" instead of "-lX11").
-
-3. Under some versions of IRIX (e.g. 4.0.1) you have to turn off
- optimization (e.g. change "-O" in CFLAGS to "-O0" or remove it
- entirely) because of faulty code generation. If the Tcl or Tk test
- suites fail, turn off optimization.
-
-4. Add a "-lsun" switch just before "-lm" in the LIBS definition.
- Under some versions of IRIX (5.1.1.3?) you'll need to omit the
- "-lsun" switch, plus remove the "-lsocket" and "-lnsl" switches
- added by the configure script; otherwise you won't be able to
- use symbolic host names for the display, only numerical Internet
- addresses.
-
-5. Rumor has it that you'll also need a "-lmalloc" switch in the
- LIBS definition.
-
-6. In IRIX 5.2 you'll have to modify Makefile to fix the following problems:
- - The "-c" option is illegal with this version of install, but
- the "-F" switch is needed instead. Change this in the "INSTALL ="
- definition line.
- - The order of file and directory have to be changed in all the
- invocations of INSTALL_DATA or INSTALL_PROGRAM.
-
----------------------------------------------
-IBM RS/6000's:
----------------------------------------------
-1. To allow ALT- sequences to work on the RS-6000, the following
-line should be changed in tkBind.c:
-
- OLD LINE:
- {"Alt", Mod2Mask, 0},
- NEW LINE:
- {"Alt", Mod1Mask, 0},
-
----------------------------------------------
-AT&T SVR4:
----------------------------------------------
-
-1. The first major hurdle is that SVR4's select() subtly differs
-from BSD select. This impacts Tk in two ways, some of the Xlib calls
-make use of select() and are inherently broken and Tk itself makes
-extensive use of select(). The first problem can't be fixed without
-rebuilding one's Xlib, but can be avoided. I intend to submit part
-of my work the XFree86 guys so that the next version of XFree86 for
-SVR4 will not be broken. Until then, it is necessary to comment out
-this section of code from Tk_DoOneEvent() (which is near line 1227):
-
-#if !defined(SVR4)
- void (*oldHandler)();
-
- oldHandler = (void (*)()) signal(SIGPIPE, SIG_IGN);
- XNoOp(display);
- XFlush(display);
- (void) signal(SIGPIPE, oldHandler);
-#endif /* SVR4 */
-
-if you don't comment it out, some scripts cause wish to go into
-an infinite loop of sending no-ops to the X server.
-
-2. As for fixing Tk's calls to select(), I've taken the simple
-approach of writing a wrapper for select and then using #define to
-replace all calls to select with the wrapper. I chose tkConfig.h
-to load the wrapper. So at the very end of tkConfig.h, it now looks
-like:
-
-#if defined(SVR4)
-# include "BSDselect.h"
-#endif
-
-#endif /* _TKCONFIG */
-
-The file BSDselect.h looks like this:
-
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/select.h>
-
-/* This is a fix for the difference between BSD's select() and
- * SVR4's select(). SVR4's select() can never return a value larger
- * than the total number of file descriptors being checked. So, if
- * you select for read and write on one file descriptor, and both
- * are true, SVR4 select() will only return 1. BSD select in the
- * same situation will return 2.
- *
- * Additionally, BSD select() on timing out, will zero the masks,
- * while SVR4 does not. This is fixed here as well.
- *
- * Set your tabstops to 4 characters to have this code nicely formatted.
- *
- * Jerry Whelan, guru@bradley.edu, June 12th, 1993
- */
-
-
-int
-BSDselect(nfds, readfds, writefds, exceptfds, timeout)
-int nfds;
-fd_set *readfds, *writefds, *exceptfds;
-struct timeval *timeout;
-{
- int rval,
- i;
-
- rval = select(nfds, readfds, writefds, exceptfds, timeout);
-
- switch(rval) {
- case -1: return(rval);
- break;
-
- case 0: if(readfds != NULL)
- FD_ZERO(readfds);
- if(writefds != NULL)
- FD_ZERO(writefds);
- if(exceptfds != NULL)
- FD_ZERO(exceptfds);
-
- return(rval);
- break;
-
- default: for(i=0, rval=0; i < nfds; i++) {
- if((readfds != NULL) && FD_ISSET
-(i, readfds)) rval++;
- if((writefds != NULL) && FD_ISSE
-T(i, writefds)) rval++;
- if((writefds != NULL) && FD_ISSE
-T(i, exceptfds)) rval++;
- }
- return(rval);
- }
-/* Should never get here */
-}
-
----------------------------------------------
-CDC 4680MP, EP/IX 1.4.3:
----------------------------------------------
-
-The installation was done in the System V environment (-systype sysv)
-with the BSD extensions available (-I/usr/include/bsd and -lbsd). It was
-built with the 2.20 level C compiler. The 2.11 level can be used, but
-it is better to match what TCL is built with, which must be 2.20 or
-higher (see the porting notes with TCL for the details).
-
-To make the configure script find the BSD extensions, I set environment
-variable DEFS to "-I/usr/include/bsd" and LIBS to "-lbsd" before
-running it. I would have also set CC to "cc2.20", but that compiler
-driver has a bug that loader errors (e.g. not finding a library routine,
-which the script uses to tell what is available) do not cause an error
-status to be returned to the shell (but see the Tcl 2.1.1 porting notes
-for comments about using "-non_shared").
-
-After running configure, I changed the CC definition line in Makefile
-from:
- CC=cc
-to
- CC=cc2.20
-to match the TCL build. Skip this if the default compiler is already 2.20
-(or later).
-
----------------------------------------------
-CDC 4680MP, EP/IX 2.1.1:
----------------------------------------------
-
-The installation was done in the System V environment (-systype sysv)
-with the BSD extensions available (-I/usr/include/bsd and -lbsd). It was
-built with the 3.11 level C compiler. Earlier levels can be used, but it
-is better to match what TCL is built with, which must be 2.20 or higher
-(see the porting notes with TCL for the details).
-
-To make the configure script find the BSD extensions, I set environment
-variable DEFS to "-I/usr/include/bsd -non_shared" and LIBS to "-lbsd"
-before running it.
-
-See the Tcl porting notes for comments on why "-non_shared" is needed
-during the configuration step. It was removed from AC_FLAGS before
-building.
-
--------------------------------------------------
-Pyramid, OSx 5.1a (UCB universe, GCC installed):
--------------------------------------------------
-
-Instead of typing "./configure" to configure, type
-
- DEFS="-I/usr/include/X11/attinc" ./configure
-
-to sh to do the configuration.
-
--------------------------------------------------
-NextSTEP 3.1:
--------------------------------------------------
-
-1. Run configure with predefined CPP:
- CPP='cc -E' ./configure
- (If your shell is [t]csh, do a "setenv CPP 'cc -E'")
-
-2. Edit Makefile:
- -add the following to AC_FLAGS:
- -Dstrtod=tcl_strtod
-
-Note: Tk's raise test may fail when running the tvtwm window manager.
-Changing to either twm or even better fvwm ensures that this test will
-succeed.
-
--------------------------------------------------
-Encore 91, UMAX V 3.0.9.3:
--------------------------------------------------
-
-1. Modify the CFLAGS definition in Makefile to include -DENCORE:
-
- CFLAGS = -O -DENCORE
-
-2. "mkdir" does not by default create the parent directories. The mkdir
-directives should be modified to "midir -p".
-
-3. An error of a redeclaration of read, can be resolved by conditionally
-not compiling if an ENCORE system.
-
-#ifndef ENCORE
-extern int read _ANSI_ARGS_((int fd, char *buf, size_t size));
-#endif
-
--------------------------------------------------
-Sequent machines running Dynix:
-Contact: Andrew Swan (aswan@soda.berkeley.edu)
--------------------------------------------------
-
-1. Use gcc instead of the cc distributed by Sequent
-
-2. There are problems with the distributed version of
- <stddef.h>. The easiest solution is probably to create a
- copy of stddef.h, make sure it comes early in the include
- path and then edit it as need be to eliminate conflicts
- with the X11 header files.
-
-3. The same comments about the tanh function from the notes on
- porting Tcl apply to Tk.
-
--------------------------------------------------
-Systems running Interactive 4.0:
--------------------------------------------------
-
-1. Add "-posix" to CFLAGS in Makefile (or Makefile.in).
-
-2. Add "-lnsl_s" to LIBS in Makefile (or Makefile.in).
diff --git a/unix/tkUnixWm.c b/unix/tkUnixWm.c
index e9e1aa7..7b68074 100644
--- a/unix/tkUnixWm.c
+++ b/unix/tkUnixWm.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkUnixWm.c,v 1.6 2000/01/12 11:46:05 hobbs Exp $
+ * RCS: @(#) $Id: tkUnixWm.c,v 1.7 2000/02/10 08:53:19 hobbs Exp $
*/
#include "tkPort.h"
@@ -3571,7 +3571,7 @@ Tk_CoordsToWindow(rootX, rootY, tkwin)
WmInfo *wmPtr;
TkWindow *winPtr, *childPtr, *nextPtr;
TkDisplay *dispPtr = ((TkWindow *) tkwin)->dispPtr;
- Tk_ErrorHandler handler;
+ Tk_ErrorHandler handler = NULL;
/*
* Step 1: scan the list of toplevel windows to see if there is a
@@ -3646,7 +3646,14 @@ Tk_CoordsToWindow(rootX, rootY, tkwin)
}
gotToplevel:
- Tk_DeleteErrorHandler(handler);
+ if (handler) {
+ /*
+ * Check value of handler, because we can reach this label
+ * from above or below
+ */
+ Tk_DeleteErrorHandler(handler);
+ handler = NULL;
+ }
winPtr = wmPtr->winPtr;
if (winPtr->mainPtr != ((TkWindow *) tkwin)->mainPtr) {
return NULL;