Update Tcl to 9.0.3

This commit is contained in:
Joshua Root
2026-04-10 10:24:45 +10:00
parent 227a37b749
commit d875700c34
2270 changed files with 235152 additions and 210991 deletions
+51 -33
View File
@@ -1,29 +1,45 @@
--- vendor/tcl/unix/configure.orig 2024-10-05 22:33:31
+++ vendor/tcl/unix/configure 2024-10-05 22:41:49
@@ -17439,7 +17439,7 @@ fi
done
--- vendor/tcl/unix/configure.orig 2025-11-12 03:28:25
+++ vendor/tcl/unix/configure 2026-04-10 10:07:16
@@ -10442,16 +10442,32 @@
if test "x$ac_cv_header_copyfile_h" = xyes
then :
printf "%s\n" "#define HAVE_COPYFILE_H 1" >>confdefs.h
+
+fi
+
+ ac_fn_c_check_header_compile "$LINENO" "sys/clonefile.h" "ac_cv_header_sys_clonefile_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_clonefile_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_CLONEFILE_H 1" >>confdefs.h
fi
+
-for ac_header in copyfile.h
+for ac_header in sys/clonefile.h copyfile.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
@@ -17589,7 +17589,7 @@ fi
done
ac_fn_c_check_func "$LINENO" "copyfile" "ac_cv_func_copyfile"
if test "x$ac_cv_func_copyfile" = xyes
then :
printf "%s\n" "#define HAVE_COPYFILE 1" >>confdefs.h
+
+fi
+
+ ac_fn_c_check_func "$LINENO" "clonefile" "ac_cv_func_clonefile"
+if test "x$ac_cv_func_clonefile" = xyes
+then :
+ printf "%s\n" "#define HAVE_CLONEFILE 1" >>confdefs.h
fi
-for ac_func in copyfile
+for ac_func in clonefile copyfile
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5
--- vendor/tcl/unix/tclUnixFCmd.c.orig
+++ vendor/tcl/unix/tclUnixFCmd.c
@@ -51,6 +51,21 @@
+
if test $tcl_corefoundation = yes; then
ac_fn_c_check_header_compile "$LINENO" "libkern/OSAtomic.h" "ac_cv_header_libkern_OSAtomic_h" "$ac_includes_default"
if test "x$ac_cv_header_libkern_OSAtomic_h" = xyes
--- vendor/tcl/unix/tclUnixFCmd.c.orig 2025-11-12 03:22:57
+++ vendor/tcl/unix/tclUnixFCmd.c 2026-04-10 10:14:21
@@ -48,7 +48,23 @@
#endif /* !HAVE_STRUCT_STAT_ST_BLKSIZE */
#ifdef HAVE_FTS
#include <fts.h>
#endif
+#endif
+#ifdef HAVE_SYS_CLONEFILE_H
+#include <sys/clonefile.h>
+#ifndef CLONE_NOOWNERCOPY
@@ -37,20 +53,21 @@
+#define MayUseCloneFile() (clonefile != NULL)
+#else
+#define MayUseCloneFile() (1)
+#endif
#endif
+#endif /* HAVE_CLONEFILE */
+
/*
* The following constants specify the type of callback when
@@ -526,14 +541,57 @@ DoCopyFile(
@@ -489,14 +505,58 @@ DoCopyFile(
}
return TCL_OK;
}
-
+
+/*
+ *----------------------------------------------------------------------
+ *
/*
*----------------------------------------------------------------------
*
+ * TclUnixCloneFile -
+ *
+ * Helper function for TclUnixCopyFile. Clones one regular file, using
@@ -90,9 +107,10 @@
+}
+#endif
+
/*
*----------------------------------------------------------------------
*
+
+/*
+ *----------------------------------------------------------------------
+ *
* TclUnixCopyFile -
*
* Helper function for TclpCopyFile. Copies one regular file, using
@@ -102,17 +120,17 @@
*
* Results:
* A standard Tcl result.
@@ -558,6 +616,13 @@ TclUnixCopyFile(
@@ -520,6 +580,13 @@ TclUnixCopyFile(
size_t blockSize; /* Optimal I/O blocksize for filesystem */
char *buffer; /* Data buffer for copy */
size_t nread;
ssize_t nread;
+
+#ifdef HAVE_CLONEFILE
+ if (MayUseCloneFile() &&
+ TclUnixCloneFile(src, dst, statBufPtr, dontCopyAtts) == TCL_OK) {
+ return TCL_OK;
+ }
+#endif
+
#ifdef DJGPP
#define BINMODE |O_BINARY
#else
+4 -4
View File
@@ -3,7 +3,7 @@
# Delete unneeded (for us) files from the Tcl source distribution.
# Run from vendor/
rm tcl8.*/compat/zlib/doc/crc-doc.1.0.pdf
rm -r tcl8.*/compat/zlib/{amiga,contrib,msdos,nintendods,old,os400,qnx,watcom,win32,win64,win64-arm}
rm -r tcl8.*/pkgs/{sqlite3,itcl,tdbc,thread}*/win
rm -r tcl8.*/win
rm tcl9.*/compat/zlib/doc/crc-doc.1.0.pdf
rm -r tcl9.*/compat/zlib/{amiga,contrib,msdos,nintendods,old,os400,qnx,watcom,win32,win64,win64-arm}
rm -r tcl9.*/pkgs/{sqlite3,itcl,tdbc,thread}*/win
rm -r tcl9.*/win
+4 -4
View File
@@ -1,7 +1,7 @@
Make the normal sqlite3 API externally visible (until we switch to tdbc...)
--- vendor/tcl/pkgs/sqlite3.50.4/Makefile.in.orig 2024-03-01 00:32:11
+++ vendor/tcl/pkgs/sqlite3.50.4/Makefile.in 2024-03-01 00:26:48
--- vendor/tcl/pkgs/sqlite3.51.0/Makefile.in.orig 2024-03-01 00:32:11
+++ vendor/tcl/pkgs/sqlite3.51.0/Makefile.in 2024-03-01 00:26:48
@@ -155,7 +155,7 @@
INCLUDES = @PKG_INCLUDES@ @TCL_INCLUDES@ -I. -I$(srcdir)/..
#INCLUDES = @PKG_INCLUDES@ @TCL_INCLUDES@ @TK_INCLUDES@ @TK_XINCLUDES@
@@ -11,8 +11,8 @@ Make the normal sqlite3 API externally visible (until we switch to tdbc...)
# TCL_DEFS is not strictly need here, but if you remove it, then you
# must make sure that configure.ac checks for the necessary components
--- vendor/tcl/pkgs/sqlite3.50.4/configure.orig 2024-12-10 07:49:12
+++ vendor/tcl/pkgs/sqlite3.50.4/configure 2025-01-06 01:48:04
--- vendor/tcl/pkgs/sqlite3.51.0/configure.orig 2024-12-10 07:49:12
+++ vendor/tcl/pkgs/sqlite3.51.0/configure 2025-01-06 01:48:04
@@ -5775,7 +5775,7 @@
else
+13 -7
View File
@@ -1,8 +1,8 @@
Don't use strchrnul on macOS < 15.4.
--- vendor/tcl/pkgs/sqlite3.50.4/compat/sqlite3/sqlite3.c.orig
+++ vendor/tcl/pkgs/sqlite3.50.4/compat/sqlite3/sqlite3.c
@@ -31676,10 +31676,18 @@ SQLITE_API void sqlite3_str_vappendf(
--- vendor/tcl/pkgs/sqlite3.51.0/compat/sqlite3/sqlite3.c.orig 2026-04-10 09:47:22
+++ vendor/tcl/pkgs/sqlite3.51.0/compat/sqlite3/sqlite3.c 2026-04-10 09:55:38
@@ -32269,13 +32269,21 @@ SQLITE_API void sqlite3_str_vappendf(
if( c!='%' ){
bufpt = (char *)fmt;
#if HAVE_STRCHRNUL
@@ -10,15 +10,21 @@ Don't use strchrnul on macOS < 15.4.
+#if __APPLE__
+ if (__builtin_available(macOS 15.4, iOS 18.4, tvOS 18.4, watchOS 11.4, *))
#else
- do{ fmt++; }while( *fmt && *fmt != '%' );
- fmt = strchr(fmt, '%');
- if( fmt==0 ){
- fmt = bufpt + strlen(bufpt);
- }
+ if (1)
#endif
+#endif
+ {
+ fmt = strchrnul(fmt, '%');
+ } else
+#endif
#endif
+ {
+ do{ fmt++; }while( *fmt && *fmt != '%' );
+ fmt = strchr(fmt, '%');
+ if( fmt==0 ){
+ fmt = bufpt + strlen(bufpt);
+ }
+ }
sqlite3_str_append(pAccum, bufpt, (int)(fmt - bufpt));
if( *fmt==0 ) break;
Vendored
+1 -1
View File
@@ -1 +1 @@
tcl8.6.17
tcl9.0.3
-78
View File
@@ -1,78 +0,0 @@
name: macOS
on:
push:
branches:
- "main"
- "core-8-6-branch"
tags:
- "core-**"
permissions:
contents: read
jobs:
xcode:
runs-on: macos-13
defaults:
run:
shell: bash
working-directory: macosx
steps:
- name: Checkout
uses: actions/checkout@v5
timeout-minutes: 5
- name: Prepare
run: |
touch tclStubInit.c tclOOStubInit.c
working-directory: generic
- name: Build
run: make -j4 all
timeout-minutes: 15
- name: Run Tests
run: make -j4 test styles=develop
env:
ERROR_ON_FAILURES: 1
MAC_CI: 1
timeout-minutes: 15
clang:
runs-on: macos-13
strategy:
matrix:
config:
- ""
- "--disable-shared"
- "--enable-symbols"
- "--enable-symbols=mem"
- "--enable-symbols=all"
defaults:
run:
shell: bash
working-directory: unix
steps:
- name: Checkout
uses: actions/checkout@v5
timeout-minutes: 5
- name: Prepare
run: |
touch tclStubInit.c tclOOStubInit.c
mkdir "$HOME/install dir"
working-directory: generic
- name: Configure ${{ matrix.config }}
# Note that macOS is always a 64 bit platform
run: ./configure --enable-64bit --enable-dtrace --enable-framework ${CFGOPT} "--prefix=$HOME/install" || (cat config.log && exit 1)
env:
CFGOPT: ${{ matrix.config }}
timeout-minutes: 5
- name: Build
run: |
make -j4 all tcltest
timeout-minutes: 15
- name: Info
run: |
ulimit -a || echo 'get limit failed'
echo 'puts exe:\t[info nameofexecutable]\nver:\t[info patchlevel]\t[if {![catch tcl::build-info ret]} {set ret}]\nlib:\t[info library]\nplat:\t[lsort -dictionary -stride 2 [array get tcl_platform]]' | make runtest || echo 'get info failed'
- name: Run Tests
run: |
make test
env:
ERROR_ON_FAILURES: 1
MAC_CI: 1
timeout-minutes: 15
-8856
View File
File diff suppressed because it is too large Load Diff
-2634
View File
File diff suppressed because it is too large Load Diff
-2539
View File
File diff suppressed because it is too large Load Diff
-3629
View File
File diff suppressed because it is too large Load Diff
-4741
View File
File diff suppressed because it is too large Load Diff
-3349
View File
File diff suppressed because it is too large Load Diff
-4619
View File
File diff suppressed because it is too large Load Diff
-3822
View File
File diff suppressed because it is too large Load Diff
-5921
View File
File diff suppressed because it is too large Load Diff
-3796
View File
File diff suppressed because it is too large Load Diff
-9420
View File
File diff suppressed because it is too large Load Diff
-21
View File
@@ -1,21 +0,0 @@
/*
* dirent.h --
*
* This file is a replacement for <dirent.h> in systems that
* support the old BSD-style <sys/dir.h> with a "struct direct".
*
* Copyright (c) 1991 The Regents of the University of California.
* Copyright (c) 1994 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*/
#ifndef _DIRENT
#define _DIRENT
#include <sys/dir.h>
#define dirent direct
#endif /* _DIRENT */
-53
View File
@@ -1,53 +0,0 @@
/*
* dirent.h --
*
* Declarations of a library of directory-reading procedures
* in the POSIX style ("struct dirent").
*
* Copyright (c) 1991 The Regents of the University of California.
* Copyright (c) 1994 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*/
#ifndef _DIRENT
#define _DIRENT
/*
* Dirent structure, which holds information about a single
* directory entry.
*/
#define MAXNAMLEN 255
#define DIRBLKSIZ 512
struct dirent {
long d_ino; /* Inode number of entry */
short d_reclen; /* Length of this record */
short d_namlen; /* Length of string in d_name */
char d_name[MAXNAMLEN + 1]; /* Name must be no longer than this */
};
/*
* State that keeps track of the reading of a directory (clients
* should never look inside this structure; the fields should
* only be accessed by the library procedures).
*/
typedef struct _dirdesc {
int dd_fd;
long dd_loc;
long dd_size;
char dd_buf[DIRBLKSIZ];
} DIR;
/*
* Procedures defined for reading directories:
*/
extern void closedir (DIR *dirp);
extern DIR * opendir (char *name);
extern struct dirent * readdir (DIR *dirp);
#endif /* _DIRENT */
-14
View File
@@ -1,14 +0,0 @@
/*
* float.h --
*
* This is a dummy header file to #include in Tcl when there
* is no float.h in /usr/include. Right now this file is empty:
* Tcl contains #ifdefs to deal with the lack of definitions;
* all it needs is for the #include statement to work.
*
* Copyright (c) 1993 The Regents of the University of California.
* Copyright (c) 1994 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*/

Some files were not shown because too many files have changed in this diff Show More