From 5817de92b6e25bf3e19ff91d3fd006717526a6c7 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Thu, 16 Sep 2010 14:49:37 +0000 Subject: Make Tcl_FindExecutable() work in UNICODE compiles (windows-only) as well as ASCII. Needed for [FRQ 491789]: setargv() doesn't support a unicode cmdline --- ChangeLog | 7 +++++++ generic/tclDecls.h | 12 +++++++----- generic/tclEncoding.c | 4 ++-- generic/tclStubInit.c | 3 ++- 4 files changed, 18 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index ef97787..4f85ce6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-09-16 Jan Nijtmans + + * generic/tclDecls.h Make Tcl_FindExecutable() work in UNICODE + * generic/tclEncoding.c compiles (windows-only) as well as ASCII. + * generic/tclStubInit.c Needed for [FRQ 491789]: setargv() doesn't + support a unicode cmdline + 2010-09-15 Donal K. Fellows * generic/tclBinary.c (TclAppendBytesToByteArray): [Bug 3067036]: Make diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 3922548..675f383 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDecls.h,v 1.185 2010/08/31 20:48:17 nijtmans Exp $ + * RCS: @(#) $Id: tclDecls.h,v 1.186 2010/09/16 14:49:37 nijtmans Exp $ */ #ifndef _TCLDECLS @@ -3771,9 +3771,6 @@ extern const TclStubs *tclStubsPtr; /* !END!: Do not edit above this line. */ -#undef TCL_STORAGE_CLASS -#define TCL_STORAGE_CLASS DLLIMPORT - #if defined(USE_TCL_STUBS) # undef Tcl_CreateInterp # undef Tcl_FindExecutable @@ -3786,6 +3783,11 @@ extern const TclStubs *tclStubsPtr; # define Tcl_SetVar(interp, varName, newValue, flags) \ (tclStubsPtr->tcl_SetVar(interp, varName, newValue, flags)) #endif +#if defined(_WIN32) && defined(UNICODE) +# define Tcl_FindExecutable(arg) ((Tcl_FindExecutable)((const char *)(arg))) +#endif -#endif /* _TCLDECLS */ +#undef TCL_STORAGE_CLASS +#define TCL_STORAGE_CLASS DLLIMPORT +#endif /* _TCLDECLS */ diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index a9d60ff..11e0c9c 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclEncoding.c,v 1.71 2010/08/22 18:53:26 nijtmans Exp $ + * RCS: @(#) $Id: tclEncoding.c,v 1.72 2010/09/16 14:49:37 nijtmans Exp $ */ #include "tclInt.h" @@ -1427,7 +1427,7 @@ Tcl_UtfToExternal( * *--------------------------------------------------------------------------- */ - +#undef Tcl_FindExecutable void Tcl_FindExecutable( const char *argv0) /* The value of the application's argv[0] diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index e004694..b804b9a 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubInit.c,v 1.196 2010/08/25 01:00:10 nijtmans Exp $ + * RCS: @(#) $Id: tclStubInit.c,v 1.197 2010/09/16 14:49:37 nijtmans Exp $ */ #include "tclInt.h" @@ -40,6 +40,7 @@ #undef Tcl_FindHashEntry #undef Tcl_CreateHashEntry #undef Tcl_Panic +#undef Tcl_FindExecutable /* * WARNING: The contents of this file is automatically generated by the -- cgit v0.12