]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Revert "Make PL/Tcl require Tcl 8.6 or later"
authorPeter Eisentraut <peter@eisentraut.org>
Thu, 16 Jul 2026 10:38:37 +0000 (12:38 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Thu, 16 Jul 2026 10:38:37 +0000 (12:38 +0200)
This reverts commit b6d3ccf2f5f1a179e25e277bae3f432cc084ce58.

macOS still ships with Tcl 8.5.

config/tcl.m4
configure
doc/src/sgml/installation.sgml
src/pl/tcl/pltcl.c

index d226ef99d05b9ddd4a860bcf709017f8cc642976..9de31a5715648fa43180d332aac477a924997525 100644 (file)
@@ -4,7 +4,7 @@
 
 
 AC_DEFUN([PGAC_PATH_TCLSH],
-[PGAC_PATH_PROGS(TCLSH, [tclsh tcl tclsh8.6 tclsh86])
+[PGAC_PATH_PROGS(TCLSH, [tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84])
 AC_ARG_VAR(TCLSH, [Tcl interpreter program (tclsh)])dnl
 if test x"$TCLSH" = x""; then
   AC_MSG_ERROR([Tcl shell not found])
index 51f160bd218109f8a9a8c89f6cfe5baf823821bd..d42a7a794ff0c70baf28ac0892b0bbc0e0ea57ba 100755 (executable)
--- a/configure
+++ b/configure
@@ -19003,7 +19003,7 @@ fi
 # Check for Tcl configuration script tclConfig.sh
 if test "$with_tcl" = yes; then
     if test -z "$TCLSH"; then
-  for ac_prog in tclsh tcl tclsh8.6 tclsh86
+  for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
index ac7e5c445769708e05544b4ab481ba5d9f3d0401..e4159522e181fdd647b3fca6e5d8cf80baab8ff7 100644 (file)
       To build the <application>PL/Tcl</application>
       procedural language, you of course need a <productname>Tcl</productname>
       installation.  The minimum required version is
-      <productname>Tcl</productname> 8.6.
+      <productname>Tcl</productname> 8.4.
      </para>
     </listitem>
 
@@ -1938,7 +1938,8 @@ build-postgresql:
          Tcl interpreter program.  This will be used to
          determine the dependencies for building PL/Tcl.
          If this is not set, the following are probed in this
-         order: <literal>tclsh tcl tclsh8.6 tclsh86</literal>.
+         order: <literal>tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85
+         tclsh8.4 tclsh84</literal>.
         </para>
        </listitem>
       </varlistentry>
index c8a9363aaa1affdcaf20a0a029227886964cbe16..85e83bbf1e34d087513db15020e60e15d82f040f 100644 (file)
@@ -50,9 +50,14 @@ PG_MODULE_MAGIC_EXT(
        ((TCL_MAJOR_VERSION > maj) || \
         (TCL_MAJOR_VERSION == maj && TCL_MINOR_VERSION >= min))
 
-/* Insist on Tcl >= 8.6 */
-#if !HAVE_TCL_VERSION(8,6)
-#error PostgreSQL only supports Tcl 8.6 or later.
+/* Insist on Tcl >= 8.4 */
+#if !HAVE_TCL_VERSION(8,4)
+#error PostgreSQL only supports Tcl 8.4 or later.
+#endif
+
+/* Hack to deal with Tcl 8.6 const-ification without losing compatibility */
+#ifndef CONST86
+#define CONST86
 #endif
 
 #if !HAVE_TCL_VERSION(8,7)
@@ -361,7 +366,7 @@ pltcl_FinalizeNotifier(ClientData clientData)
 }
 
 static void
-pltcl_SetTimer(const Tcl_Time *timePtr)
+pltcl_SetTimer(CONST86 Tcl_Time *timePtr)
 {
 }
 
@@ -387,7 +392,7 @@ pltcl_ServiceModeHook(int mode)
 }
 
 static int
-pltcl_WaitForEvent(const Tcl_Time *timePtr)
+pltcl_WaitForEvent(CONST86 Tcl_Time *timePtr)
 {
        return 0;
 }