-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TCL9 support #351
Draft
dlmiles
wants to merge
20
commits into
RTimothyEdwards:master
Choose a base branch
from
dlmiles:master-upstream-20241021-tcl9
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
TCL9 support #351
dlmiles
wants to merge
20
commits into
RTimothyEdwards:master
from
dlmiles:master-upstream-20241021-tcl9
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Now a (void *) but previously an integer. These macros resolve the codebase allowing it to be built against both tcl8 (8.5, 8.6) and tcl9 (9.0). tar -zxvf tcl9.0.0-src.tar.gz cd tcl9.0.0/unix ./configure --enable-symbols --prefix=/opt/tktcl9 make install tar -zxvf tk9.0.0-src.tar.gz cd tk9.0.0/unix ./configure --enable-symbols --prefix=/opt/tktcl9 --with-tcl=/opt/tktcl9/lib make install cd magic ./configure --with-tk=/opt/tktcl9/lib --with-tcl=/opt/tktcl9/lib
Modern compiler have support for 'offsetof' keyword.
Legacy compiler support macro provided by TCL from a time when 'const' did not exist.
Legacy compiler support macro provided by TCL from a time when 'const' did not exist. This looks like it was put in place around the time of TCL 8.4 (from 2002 until 2013) which introduced APIs with 'const' types, that were previously non-const. Probably due to legacy compiler support across target platforms at the time. Since the minimum TCL level is hardwired to 8.5 (from 2007 until 2016) it does not seem like that compatiblity is a current requirement.
Tk_ImageType.createProc() uses new Tcl_Size type now.
Header files documentation indicates the macros are of type ClientData but previously did not cast to ensure that. So now follow this intention.
The Tcl_Exit() replacement proc takes charge of calling exit() So this function can be easily migrated to libc atexit() which will now run during exit() not just before. Which seems ok for the purpose of restoring the termios state of the tty. This solution seems compatible with TCL8 as well so all calls to this removed API are removed. Note this patch also removes the invalidation (of the callback so the deefault use of Tcl_Exit() is restored) before returning from this function. atexit() usage can not be invalidated after registration but that can be controlled with application flag checked inside the callback function if needed. I have observed scenarios where I need to issue 'reset' manually after exiting magic, still understanding better the build types and scenarios that triggers this.
This API uses address of operator to Tcl API with (int) type, but does not use Tcl_Size in TCL9, it remained an (int) type.
In the TCL8 to TCL9 porting information it was indicated the sentinal NULL termination should be cast (char *) with API call Tcl_AppendResult(). This was already in place for most of the codebase this resolves the last few places.
This seems like it has 2 use cases. Internal console management around reprinting command prompt, but many modes of operation delegate the prompt processing to tkcon or readline. Process termination to restore the termios.
This did not work as expected. Maybe that indicate this should have a slighlt restructure so the tcl.h definition is always given a chance to provide type. Or maybe autoconf should detect the type and provide in config.h ?
This reverts commit 8adbd75760aeeb4f39507dcd3e746287381b7b38.
dlmiles
force-pushed
the
master-upstream-20241021-tcl9
branch
2 times, most recently
from
October 21, 2024 14:42
918b445
to
f49e783
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Initial attempt at TCL9 support. It builds with 8.6 and 9.0 and appears to run ok, re batch script.
The most recent 4 commits still need work and resolution
::tk::unsupported
items, needs impact assessment$::tk_platform
(read from migration notes)tcltk/*.tcl
scripts, I could not find any use of octal strings of tilde $HOME expansionDue to the above drafting status only.
Example command sequence to build and pickup as alternative version