From d1d3fd976dd58be3a48e928517580b4f11206fe2 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 25 Apr 2025 08:11:10 +0000 Subject: Protect TclWinGetUserEncoding() for environments it doen't exist, e.g. Tcl 9.0.0/9.0.1 --- generic/tclIntPlatDecls.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/generic/tclIntPlatDecls.h b/generic/tclIntPlatDecls.h index ebc5896..527536e 100644 --- a/generic/tclIntPlatDecls.h +++ b/generic/tclIntPlatDecls.h @@ -738,4 +738,12 @@ MODULE_SCOPE int TclMacOSXMatchType(Tcl_Interp *interp, # define TclpGetPid(pid) ((Tcl_Size)(pid)) #endif +#ifdef USE_TCL_STUBS +/* Protect TclWinGetUserEncoding() for environments it doen't exist, e.g. Tcl 9.0.0/9.0.1 */ +#undef TclWinGetUserEncoding +#define TclWinGetUserEncoding(interp) \ + (tclIntPlatStubsPtr->tclWinGetUserEncoding ? tclIntPlatStubsPtr->tclWinGetUserEncoding(interp) : NULL) +#endif + + #endif /* _TCLINTPLATDECLS */ -- cgit v0.12