Index: doc/CrtCommand.3
===================================================================
RCS file: /cvsroot/tcl/tcl/doc/CrtCommand.3,v
retrieving revision 1.4
diff -u -r1.4 CrtCommand.3
--- doc/CrtCommand.3	24 Apr 2001 20:59:17 -0000	1.4
+++ doc/CrtCommand.3	15 Jul 2002 23:34:56 -0000
@@ -84,7 +84,7 @@
 	ClientData \fIclientData\fR,
 	Tcl_Interp *\fIinterp\fR,
 	int \fIargc\fR,
-	char *\fIargv\fR[]);
+	CONST char *\fIargv\fR[]);
 .CE
 When \fIproc\fR is invoked the \fIclientData\fR and \fIinterp\fR
 parameters will be copies of the \fIclientData\fR and \fIinterp\fR
Index: doc/CrtSlave.3
===================================================================
RCS file: /cvsroot/tcl/tcl/doc/CrtSlave.3,v
retrieving revision 1.7
diff -u -r1.7 CrtSlave.3
--- doc/CrtSlave.3	1 Jul 2002 18:24:39 -0000	1.7
+++ doc/CrtSlave.3	15 Jul 2002 23:34:56 -0000
@@ -91,7 +91,7 @@
 .AP int *argcPtr out
 Pointer to location to store count of additional arguments to be passed to
 the alias. The location is in storage owned by the caller.
-.AP char ***argvPtr out
+.AP "CONST char" ***argvPtr out
 Pointer to location to store a vector of strings, the additional arguments
 to pass to an alias. The location is in storage owned by the caller, the
 vector of strings is owned by the called function.
Index: doc/CrtTrace.3
===================================================================
RCS file: /cvsroot/tcl/tcl/doc/CrtTrace.3,v
retrieving revision 1.5
diff -u -r1.5 CrtTrace.3
--- doc/CrtTrace.3	17 Jun 2002 22:52:50 -0000	1.5
+++ doc/CrtTrace.3	15 Jul 2002 23:34:56 -0000
@@ -165,7 +165,7 @@
 	Tcl_CmdProc *\fIcmdProc\fR,
 	ClientData \fIcmdClientData\fR,
 	int \fIargc\fR,
-	char *\fIargv\fR[]);
+	CONST char *\fIargv\fR[]);
 .CE
 The parameters to the \fIproc\fR callback are similar to those of the
 \fIobjProc\fR callback above. The \fIcommandToken\fR is
Index: generic/tcl.decls
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tcl.decls,v
retrieving revision 1.90
diff -u -r1.90 tcl.decls
--- generic/tcl.decls	21 Jun 2002 14:22:28 -0000	1.90
+++ generic/tcl.decls	15 Jul 2002 23:34:56 -0000
@@ -32,7 +32,7 @@
 	    CONST char* version, ClientData clientData)
 }
 declare 1 generic {
-    CONST char * Tcl_PkgRequireEx(Tcl_Interp *interp, CONST char *name,
+    CONST84_RETURN char * Tcl_PkgRequireEx(Tcl_Interp *interp, CONST char *name,
 	    CONST char *version, int exact, ClientData *clientDataPtr)
 }
 declare 2 generic {
@@ -461,10 +461,10 @@
     int Tcl_Eof(Tcl_Channel chan)
 }
 declare 127 generic {
-    CONST char * Tcl_ErrnoId(void)
+    CONST84_RETURN char * Tcl_ErrnoId(void)
 }
 declare 128 generic {
-    CONST char * Tcl_ErrnoMsg(int err)
+    CONST84_RETURN char * Tcl_ErrnoMsg(int err)
 }
 declare 129 generic {
     int Tcl_Eval(Tcl_Interp *interp, char *string)
@@ -530,7 +530,7 @@
 declare 148 generic {
     int Tcl_GetAlias(Tcl_Interp *interp, CONST char *slaveCmd,
 	    Tcl_Interp **targetInterpPtr, CONST84 char **targetCmdPtr,
-	    int *argcPtr, char ***argvPtr)
+	    int *argcPtr, CONST84 char ***argvPtr)
 }
 declare 149 generic {
     int Tcl_GetAliasObj(Tcl_Interp *interp, CONST char *slaveCmd,
@@ -559,7 +559,7 @@
     int Tcl_GetChannelMode(Tcl_Channel chan)
 }
 declare 156 generic {
-    CONST char * Tcl_GetChannelName(Tcl_Channel chan)
+    CONST84_RETURN char * Tcl_GetChannelName(Tcl_Channel chan)
 }
 declare 157 generic {
     int Tcl_GetChannelOption(Tcl_Interp *interp, Tcl_Channel chan,
@@ -573,13 +573,13 @@
 	    Tcl_CmdInfo *infoPtr)
 }
 declare 160 generic {
-    CONST char * Tcl_GetCommandName(Tcl_Interp *interp, Tcl_Command command)
+    CONST84_RETURN char * Tcl_GetCommandName(Tcl_Interp *interp, Tcl_Command command)
 }
 declare 161 generic {
     int Tcl_GetErrno(void)
 }
 declare 162 generic {
-    CONST char * Tcl_GetHostName(void)
+    CONST84_RETURN char * Tcl_GetHostName(void)
 }
 declare 163 generic {
     int Tcl_GetInterpPath(Tcl_Interp *askInterp, Tcl_Interp *slaveInterp)
@@ -622,13 +622,13 @@
     Tcl_Channel Tcl_GetStdChannel(int type)
 }
 declare 174 generic {
-    CONST char * Tcl_GetStringResult(Tcl_Interp *interp)
+    CONST84_RETURN char * Tcl_GetStringResult(Tcl_Interp *interp)
 }
 declare 175 generic {
-    CONST char * Tcl_GetVar(Tcl_Interp *interp, char *varName, int flags)
+    CONST84_RETURN char * Tcl_GetVar(Tcl_Interp *interp, char *varName, int flags)
 }
 declare 176 generic {
-    CONST char * Tcl_GetVar2(Tcl_Interp *interp, char *part1, CONST char *part2,
+    CONST84_RETURN char * Tcl_GetVar2(Tcl_Interp *interp, char *part1, CONST char *part2,
 	    int flags)
 }
 declare 177 generic {
@@ -727,7 +727,7 @@
     int Tcl_PutEnv(CONST char *string)
 }
 declare 204 generic {
-    CONST char * Tcl_PosixError(Tcl_Interp *interp)
+    CONST84_RETURN char * Tcl_PosixError(Tcl_Interp *interp)
 }
 declare 205 generic {
     void Tcl_QueueEvent(Tcl_Event *evPtr, Tcl_QueuePosition position)
@@ -834,18 +834,18 @@
     void Tcl_SetStdChannel(Tcl_Channel channel, int type)
 }
 declare 237 generic {
-    CONST char * Tcl_SetVar(Tcl_Interp *interp, char *varName,
+    CONST84_RETURN char * Tcl_SetVar(Tcl_Interp *interp, char *varName,
 	    CONST char *newValue, int flags)
 }
 declare 238 generic {
-    CONST char * Tcl_SetVar2(Tcl_Interp *interp, char *part1, CONST char *part2,
+    CONST84_RETURN char * Tcl_SetVar2(Tcl_Interp *interp, char *part1, CONST char *part2,
 	    CONST char *newValue, int flags)
 }
 declare 239 generic {
-    CONST char * Tcl_SignalId(int sig)
+    CONST84_RETURN char * Tcl_SignalId(int sig)
 }
 declare 240 generic {
-    CONST char * Tcl_SignalMsg(int sig)
+    CONST84_RETURN char * Tcl_SignalMsg(int sig)
 }
 declare 241 generic {
     void Tcl_SourceRCFile(Tcl_Interp *interp)
@@ -949,17 +949,17 @@
     void Tcl_AppendStringsToObjVA(Tcl_Obj *objPtr, va_list argList)
 }
 declare 269 generic {
-    CONST char * Tcl_HashStats(Tcl_HashTable *tablePtr)
+    CONST84_RETURN char * Tcl_HashStats(Tcl_HashTable *tablePtr)
 }
 declare 270 generic {
-    CONST char * Tcl_ParseVar(Tcl_Interp *interp, char *str, char **termPtr)
+    CONST84_RETURN char * Tcl_ParseVar(Tcl_Interp *interp, char *str, char **termPtr)
 }
 declare 271 generic {
-    CONST char * Tcl_PkgPresent(Tcl_Interp *interp, CONST char *name,
+    CONST84_RETURN char * Tcl_PkgPresent(Tcl_Interp *interp, CONST char *name,
 	    CONST char *version, int exact)
 }
 declare 272 generic {
-    CONST char * Tcl_PkgPresentEx(Tcl_Interp *interp, CONST char *name,
+    CONST84_RETURN char * Tcl_PkgPresentEx(Tcl_Interp *interp, CONST char *name,
 	    CONST char *version, int exact, ClientData *clientDataPtr)
 }
 declare 273 generic {
@@ -967,7 +967,7 @@
 	    CONST char *version)
 }
 declare 274 generic {
-    CONST char * Tcl_PkgRequire(Tcl_Interp *interp, CONST char *name, 
+    CONST84_RETURN char * Tcl_PkgRequire(Tcl_Interp *interp, CONST char *name, 
 	    CONST char *version, int exact)
 }
 declare 275 generic {
@@ -1080,7 +1080,7 @@
     Tcl_Encoding Tcl_GetEncoding(Tcl_Interp *interp, CONST char *name)
 }
 declare 302 generic {
-    CONST char * Tcl_GetEncodingName(Tcl_Encoding encoding)
+    CONST84_RETURN char * Tcl_GetEncodingName(Tcl_Encoding encoding)
 }
 declare 303 generic {
     void Tcl_GetEncodingNames(Tcl_Interp *interp)
@@ -1156,7 +1156,7 @@
     int Tcl_UniCharToUtf(int ch, char *buf)
 }
 declare 325 generic {
-    CONST char * Tcl_UtfAtIndex(CONST char *src, int index)
+    CONST84_RETURN char * Tcl_UtfAtIndex(CONST char *src, int index)
 }
 declare 326 generic {
     int Tcl_UtfCharComplete(CONST char *src, int len)
@@ -1165,16 +1165,16 @@
     int Tcl_UtfBackslash(CONST char *src, int *readPtr, char *dst)
 }
 declare 328 generic {
-    CONST char * Tcl_UtfFindFirst(CONST char *src, int ch)
+    CONST84_RETURN char * Tcl_UtfFindFirst(CONST char *src, int ch)
 }
 declare 329 generic {
-    CONST char * Tcl_UtfFindLast(CONST char *src, int ch)
+    CONST84_RETURN char * Tcl_UtfFindLast(CONST char *src, int ch)
 }
 declare 330 generic {
-    CONST char * Tcl_UtfNext(CONST char *src)
+    CONST84_RETURN char * Tcl_UtfNext(CONST char *src)
 }
 declare 331 generic {
-    CONST char * Tcl_UtfPrev(CONST char *src, CONST char *start)
+    CONST84_RETURN char * Tcl_UtfPrev(CONST char *src, CONST char *start)
 }
 declare 332 generic {
     int Tcl_UtfToExternal(Tcl_Interp *interp, Tcl_Encoding encoding,
@@ -1208,7 +1208,7 @@
     char * Tcl_GetString(Tcl_Obj *objPtr)
 }
 declare 341 generic {
-    CONST char * Tcl_GetDefaultEncodingDir(void)
+    CONST84_RETURN char * Tcl_GetDefaultEncodingDir(void)
 }
 declare 342 generic {
     void Tcl_SetDefaultEncodingDir(CONST char *path)
@@ -1401,7 +1401,7 @@
     int Tcl_ChannelBuffered(Tcl_Channel chan)
 }
 declare 398 generic {
-    CONST char * Tcl_ChannelName(Tcl_ChannelType *chanTypePtr)
+    CONST84_RETURN char * Tcl_ChannelName(Tcl_ChannelType *chanTypePtr)
 }
 declare 399 generic {
     Tcl_ChannelTypeVersion Tcl_ChannelVersion(Tcl_ChannelType *chanTypePtr)
Index: generic/tcl.h
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tcl.h,v
retrieving revision 1.132
diff -u -r1.132 tcl.h
--- generic/tcl.h	14 Jul 2002 17:29:01 -0000	1.132
+++ generic/tcl.h	15 Jul 2002 23:34:56 -0000
@@ -249,9 +249,19 @@
 #endif
 
 #ifdef USE_NON_CONST
+#   ifdef USE_COMPAT_CONST
+#      error define at most one of USE_NON_CONST and USE_COMPAT_CONST
+#   endif
 #   define CONST84
+#   define CONST84_RETURN
 #else
-#   define CONST84 CONST
+#   ifdef USE_COMPAT_CONST
+#      define CONST84 
+#      define CONST84_RETURN CONST
+#   else
+#      define CONST84 CONST
+#      define CONST84_RETURN CONST
+#   endif
 #endif
 
 
@@ -636,10 +646,10 @@
 typedef void (Tcl_CloseProc) _ANSI_ARGS_((ClientData data));
 typedef void (Tcl_CmdDeleteProc) _ANSI_ARGS_((ClientData clientData));
 typedef int (Tcl_CmdProc) _ANSI_ARGS_((ClientData clientData,
-	Tcl_Interp *interp, int argc, char *argv[]));
+	Tcl_Interp *interp, int argc, CONST84 char *argv[]));
 typedef void (Tcl_CmdTraceProc) _ANSI_ARGS_((ClientData clientData,
 	Tcl_Interp *interp, int level, char *command, Tcl_CmdProc *proc,
-	ClientData cmdClientData, int argc, char *argv[]));
+	ClientData cmdClientData, int argc, CONST84 char *argv[]));
 typedef int (Tcl_CmdObjTraceProc) _ANSI_ARGS_((ClientData clientData,
 	Tcl_Interp *interp, int level, CONST char *command,
 	Tcl_Command commandInfo, int objc, struct Tcl_Obj * CONST * objv));
@@ -1582,7 +1592,7 @@
 	_ANSI_ARGS_((Tcl_Interp *interp, Tcl_Obj *pathPtr, 
 	int mode, int permissions));
 typedef int (Tcl_FSMatchInDirectoryProc) _ANSI_ARGS_((Tcl_Interp* interp, 
-	Tcl_Obj *result, Tcl_Obj *pathPtr, CONST84 char *pattern, 
+	Tcl_Obj *result, Tcl_Obj *pathPtr, CONST char *pattern, 
 	Tcl_GlobTypeData * types));
 typedef Tcl_Obj* (Tcl_FSGetCwdProc) _ANSI_ARGS_((Tcl_Interp *interp));
 typedef int (Tcl_FSChdirProc) _ANSI_ARGS_((Tcl_Obj *pathPtr));
@@ -1609,7 +1619,7 @@
 typedef int (Tcl_FSFileAttrsGetProc) _ANSI_ARGS_((Tcl_Interp *interp,
 			    int index, Tcl_Obj *pathPtr,
 			    Tcl_Obj **objPtrRef));
-typedef CONST84 char** (Tcl_FSFileAttrStringsProc) _ANSI_ARGS_((Tcl_Obj *pathPtr, 
+typedef CONST char** (Tcl_FSFileAttrStringsProc) _ANSI_ARGS_((Tcl_Obj *pathPtr, 
 			    Tcl_Obj** objPtrRef));
 typedef int (Tcl_FSFileAttrsSetProc) _ANSI_ARGS_((Tcl_Interp *interp,
 			    int index, Tcl_Obj *pathPtr,
Index: generic/tclBasic.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclBasic.c,v
retrieving revision 1.62
diff -u -r1.62 tclBasic.c
--- generic/tclBasic.c	20 Jun 2002 16:41:30 -0000	1.62
+++ generic/tclBasic.c	15 Jul 2002 23:34:56 -0000
@@ -1753,8 +1753,8 @@
      */
 
 #define NUM_ARGS 20
-    char *(argStorage[NUM_ARGS]);
-    char **argv = argStorage;
+    CONST char *(argStorage[NUM_ARGS]);
+    CONST char **argv = argStorage;
 
     /*
      * Create the string argument array "argv". Make sure argv is large
@@ -1763,7 +1763,7 @@
      */
 
     if ((objc + 1) > NUM_ARGS) {
-	argv = (char **) ckalloc((unsigned)(objc + 1) * sizeof(char *));
+	argv = (CONST char **) ckalloc((unsigned)(objc + 1) * sizeof(char *));
     }
 
     for (i = 0;  i < objc;  i++) {
@@ -1814,7 +1814,7 @@
     ClientData clientData;	/* Points to command's Command structure. */
     Tcl_Interp *interp;		/* Current interpreter. */
     int argc;			/* Number of arguments. */
-    register char **argv;	/* Argument strings. */
+    register CONST char **argv;	/* Argument strings. */
 {
     Command *cmdPtr = (Command *) clientData;
     register Tcl_Obj *objPtr;
@@ -4281,7 +4281,7 @@
 TclInvoke(interp, argc, argv, flags)
     Tcl_Interp *interp;		/* Where to invoke the command. */
     int argc;			/* Count of args. */
-    register char **argv;	/* The arg strings; argv[0] is the name of
+    register CONST char **argv;	/* The arg strings; argv[0] is the name of
                                  * the command to invoke. */
     int flags;			/* Combination of flags controlling the
 				 * call: TCL_INVOKE_HIDDEN and
@@ -4378,7 +4378,7 @@
 TclGlobalInvoke(interp, argc, argv, flags)
     Tcl_Interp *interp;		/* Where to invoke the command. */
     int argc;			/* Count of args. */
-    register char **argv;	/* The arg strings; argv[0] is the name of
+    register CONST char **argv;	/* The arg strings; argv[0] is the name of
                                  * the command to invoke. */
     int flags;			/* Combination of flags controlling the
 				 * call: TCL_INVOKE_HIDDEN and
@@ -4911,7 +4911,7 @@
           
     ( data->proc )( data->clientData, interp, level,
 		    (char*) command, cmdPtr->proc, cmdPtr->clientData,
-		    objc, (char**) argv );
+		    objc, argv );
     ckfree( (char*) argv );
 
     return TCL_OK;
Index: generic/tclEvent.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclEvent.c,v
retrieving revision 1.22
diff -u -r1.22 tclEvent.c
--- generic/tclEvent.c	14 May 2002 09:44:43 -0000	1.22
+++ generic/tclEvent.c	15 Jul 2002 23:34:57 -0000
@@ -222,7 +222,7 @@
     ClientData clientData;	/* Pointer to ErrAssocData structure. */
 {
     Tcl_Interp *interp;
-    char *argv[2];
+    CONST char *argv[2];
     int code;
     BgError *errPtr;
     ErrAssocData *assocPtr = (ErrAssocData *) clientData;
Index: generic/tclInt.decls
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclInt.decls,v
retrieving revision 1.52
diff -u -r1.52 tclInt.decls
--- generic/tclInt.decls	15 Jul 2002 22:18:04 -0000	1.52
+++ generic/tclInt.decls	15 Jul 2002 23:34:57 -0000
@@ -181,7 +181,7 @@
     char * TclpGetUserHome(CONST char *name, Tcl_DString *bufferPtr)
 }
 declare 43 generic {
-    int TclGlobalInvoke(Tcl_Interp *interp, int argc, char **argv, int flags)
+    int TclGlobalInvoke(Tcl_Interp *interp, int argc, CONST84 char **argv, int flags)
 }
 declare 44 generic {
     int TclGuessPackageName(CONST char *fileName, Tcl_DString *bufPtr)
@@ -212,11 +212,11 @@
     int TclInterpInit(Tcl_Interp *interp)
 }
 declare 52 generic {
-    int TclInvoke(Tcl_Interp *interp, int argc, char **argv, int flags)
+    int TclInvoke(Tcl_Interp *interp, int argc, CONST84 char **argv, int flags)
 }
 declare 53 generic {
     int TclInvokeObjectCommand(ClientData clientData, Tcl_Interp *interp,
-	    int argc, char **argv)
+	    int argc, CONST84 char **argv)
 }
 declare 54 generic {
     int TclInvokeStringCommand(ClientData clientData, Tcl_Interp *interp,
@@ -370,7 +370,7 @@
 }
 declare 94 generic {
     int TclProcInterpProc(ClientData clientData, Tcl_Interp *interp,
-	    int argc, char **argv)
+	    int argc, CONST84 char **argv)
 }
 # Replaced by Tcl_FSStat in 8.4:
 #declare 95 generic {
@@ -530,7 +530,7 @@
 #   int TclpChdir(CONST char *dirName)
 #}
 declare 138 generic {
-    CONST char * TclGetEnv(CONST char *name, Tcl_DString *valuePtr)
+    CONST84_RETURN char * TclGetEnv(CONST char *name, Tcl_DString *valuePtr)
 }
 #declare 139 generic {
 #    int TclpLoadFile(Tcl_Interp *interp, char *fileName, char *sym1,
@@ -542,7 +542,7 @@
 }
 # This is used by TclX, but should otherwise be considered private
 declare 141 generic {
-    CONST char *TclpGetCwd(Tcl_Interp *interp, Tcl_DString *cwdPtr)
+    CONST84_RETURN char *TclpGetCwd(Tcl_Interp *interp, Tcl_DString *cwdPtr)
 }
 declare 142 generic {
     int TclSetByteCodeFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr,
@@ -614,7 +614,7 @@
     void TclSetStartupScriptFileName(CONST char *filename)
 }
 declare 159 generic {
-    CONST char *TclGetStartupScriptFileName(void)
+    CONST84_RETURN char *TclGetStartupScriptFileName(void)
 }
 #declare 160 generic {
 #    int TclpMatchFilesTypes(Tcl_Interp *interp, char *separators,
Index: generic/tclInt.h
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclInt.h,v
retrieving revision 1.98
diff -u -r1.98 tclInt.h
--- generic/tclInt.h	15 Jul 2002 22:18:04 -0000	1.98
+++ generic/tclInt.h	15 Jul 2002 23:34:57 -0000
@@ -91,11 +91,11 @@
 
 
 typedef int (Tcl_ResolveCompiledVarProc) _ANSI_ARGS_((
-    Tcl_Interp* interp, CONST char* name, int length,
+    Tcl_Interp* interp, CONST84 char* name, int length,
     Tcl_Namespace *context, Tcl_ResolvedVarInfo **rPtr));
 
 typedef int (Tcl_ResolveVarProc) _ANSI_ARGS_((
-    Tcl_Interp* interp, CONST char* name, Tcl_Namespace *context,
+    Tcl_Interp* interp, CONST84 char* name, Tcl_Namespace *context,
     int flags, Tcl_Var *rPtr));
 
 typedef int (Tcl_ResolveCmdProc) _ANSI_ARGS_((Tcl_Interp* interp,
@@ -1593,7 +1593,7 @@
  */
 
 typedef int (*TclCmdProcType) _ANSI_ARGS_((ClientData clientData,
-	Tcl_Interp *interp, int argc, char *argv[]));
+	Tcl_Interp *interp, int argc, CONST char *argv[]));
 typedef int (*TclObjCmdProcType) _ANSI_ARGS_((ClientData clientData,
 	Tcl_Interp *interp, int objc, struct Tcl_Obj * CONST objv[]));
 
@@ -1999,7 +1999,7 @@
 
 #ifdef MAC_TCL
 EXTERN int	Tcl_EchoCmd _ANSI_ARGS_((ClientData clientData,
-		    Tcl_Interp *interp, int argc, char **argv));
+		    Tcl_Interp *interp, int argc, CONST84 char **argv));
 EXTERN int	Tcl_LsObjCmd _ANSI_ARGS_((ClientData clientData,
 		    Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]));
 EXTERN int	Tcl_BeepObjCmd _ANSI_ARGS_((ClientData clientData,
Index: generic/tclInterp.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclInterp.c,v
retrieving revision 1.12
diff -u -r1.12 tclInterp.c
--- generic/tclInterp.c	7 Mar 2002 20:17:22 -0000	1.12
+++ generic/tclInterp.c	15 Jul 2002 23:34:57 -0000
@@ -929,7 +929,7 @@
     Tcl_Interp **targetInterpPtr;	/* (Return) target interpreter. */
     CONST char **targetNamePtr;		/* (Return) name of target command. */
     int *argcPtr;			/* (Return) count of addnl args. */
-    char ***argvPtr;			/* (Return) additional arguments. */
+    CONST char ***argvPtr;		/* (Return) additional arguments. */
 {
     InterpInfo *iiPtr;
     Tcl_HashEntry *hPtr;
@@ -957,7 +957,8 @@
 	*argcPtr = objc - 1;
     }
     if (argvPtr != NULL) {
-        *argvPtr = (char **) ckalloc((unsigned) sizeof(char *) * (objc - 1));
+        *argvPtr = (CONST char **) 
+		ckalloc((unsigned) sizeof(char *) * (objc - 1));
         for (i = 1; i < objc; i++) {
             *argvPtr[i - 1] = Tcl_GetString(objv[i]);
         }
Index: generic/tclProc.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclProc.c,v
retrieving revision 1.38
diff -u -r1.38 tclProc.c
--- generic/tclProc.c	11 Jul 2002 12:39:16 -0000	1.38
+++ generic/tclProc.c	15 Jul 2002 23:34:57 -0000
@@ -798,7 +798,7 @@
 				 * invoked. */
     int argc;			/* Count of number of arguments to this
 				 * procedure. */
-    register char **argv;	/* Argument values. */
+    register CONST char **argv;	/* Argument values. */
 {
     register Tcl_Obj *objPtr;
     register int i;
Index: generic/tclTest.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclTest.c,v
retrieving revision 1.54
diff -u -r1.54 tclTest.c
--- generic/tclTest.c	8 Jul 2002 10:11:22 -0000	1.54
+++ generic/tclTest.c	15 Jul 2002 23:34:57 -0000
@@ -17,7 +17,7 @@
  */
 
 #define TCL_TEST
-
+#define USE_COMPAT_CONST
 #include "tclInt.h"
 #include "tclPort.h"
 
@@ -458,7 +458,7 @@
     Tcl_Obj *listPtr;
     Tcl_Obj **objv;
     int objc, index;
-    static CONST char *specialOptions[] = {
+    static char *specialOptions[] = {
 	"-appinitprocerror", "-appinitprocdeleteinterp",
 	"-appinitprocclosestderr", "-appinitprocsetrcfile", (char *) NULL
     };
@@ -759,7 +759,7 @@
     int code;			/* Current return code from command. */
 {
     TestAsyncHandler *asyncPtr = (TestAsyncHandler *) clientData;
-    CONST char *listArgv[4];
+    char *listArgv[4];
     char string[TCL_INTEGER_SPACE], *cmd;
 
     TclFormatInt(string, code);
@@ -1582,7 +1582,7 @@
     int index, length;
     char *string;
     TclEncoding *encodingPtr;
-    static CONST char *optionStrings[] = {
+    static char *optionStrings[] = {
 	"create",	"delete",	"path",
 	NULL
     };
@@ -2401,7 +2401,7 @@
     int index;
     char *locale;
 
-    static CONST char *optionStrings[] = {
+    static char *optionStrings[] = {
     	"ctype", "numeric", "time", "collate", "monetary", 
 	"all",	NULL
     };
@@ -2940,7 +2940,7 @@
     char *string;
     Tcl_Obj *objPtr;
     Tcl_RegExpInfo info;
-    static CONST char *options[] = {
+    static char *options[] = {
 	"-indices",	"-nocase",	"-about",	"-expanded",
 	"-line",	"-linestop",	"-lineanchor",
 	"-xflags",
@@ -3639,7 +3639,7 @@
      *  Append all of the arguments together separated by spaces
      */
 
-    argString = Tcl_Merge(argc-1, (CONST char **) argv+1);
+    argString = Tcl_Merge(argc-1, argv+1);
     panic(argString);
     ckfree(argString);
  
@@ -4165,7 +4165,7 @@
     int discard, result, index;
     Tcl_SavedResult state;
     Tcl_Obj *objPtr;
-    static CONST char *optionStrings[] = {
+    static char *optionStrings[] = {
 	"append", "dynamic", "free", "object", "small", NULL
     };
     enum options {
@@ -4811,7 +4811,7 @@
                                          * file, with what modes to create
                                          * it? */
 {
-    CONST char *expectname="testOpenFileChannel1%.fil";
+    char *expectname="testOpenFileChannel1%.fil";
     Tcl_DString ds;
     
     Tcl_DStringInit(&ds);
@@ -4839,7 +4839,7 @@
                                          * file, with what modes to create
                                          * it? */
 {
-    CONST char *expectname="testOpenFileChannel2%.fil";
+    char *expectname="testOpenFileChannel2%.fil";
     Tcl_DString ds;
     
     Tcl_DStringInit(&ds);
@@ -4867,7 +4867,7 @@
                                          * file, with what modes to create
                                          * it? */
 {
-    CONST char *expectname="testOpenFileChannel3%.fil";
+    char *expectname="testOpenFileChannel3%.fil";
     Tcl_DString ds;
     
     Tcl_DStringInit(&ds);
@@ -5604,7 +5604,7 @@
     int objc;				/* Number of arguments. */
     Tcl_Obj *CONST objv[];		/* Argument objects. */
 {
-    CONST char *ary[] = {
+    char *ary[] = {
 	"a", "b", "c", "d", "e", "f", (char *)NULL,(char *)NULL
     };
     int idx,target;
Index: mac/tclMacTest.c
===================================================================
RCS file: /cvsroot/tcl/tcl/mac/tclMacTest.c,v
retrieving revision 1.4
diff -u -r1.4 tclMacTest.c
--- mac/tclMacTest.c	11 May 1999 07:13:36 -0000	1.4
+++ mac/tclMacTest.c	15 Jul 2002 23:34:57 -0000
@@ -13,7 +13,7 @@
  */
 
 #define TCL_TEST
-
+#define USE_COMPAT_CONST
 #include "tclInt.h"
 #include "tclMacInt.h"
 #include "tclMacPort.h"
Index: unix/tclUnixTest.c
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/tclUnixTest.c,v
retrieving revision 1.11
diff -u -r1.11 tclUnixTest.c
--- unix/tclUnixTest.c	13 Oct 1999 00:32:50 -0000	1.11
+++ unix/tclUnixTest.c	15 Jul 2002 23:34:58 -0000
@@ -12,6 +12,7 @@
  * RCS: @(#) $Id: tclUnixTest.c,v 1.11 1999/10/13 00:32:50 hobbs Exp $
  */
 
+#define USE_COMPAT_CONST
 #include "tclInt.h"
 #include "tclPort.h"
 
Index: unix/tclXtTest.c
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/tclXtTest.c,v
retrieving revision 1.4
diff -u -r1.4 tclXtTest.c
--- unix/tclXtTest.c	2 Jul 1999 06:05:34 -0000	1.4
+++ unix/tclXtTest.c	15 Jul 2002 23:34:58 -0000
@@ -12,6 +12,7 @@
  */
 
 #include <X11/Intrinsic.h>
+#define USE_COMPAT_CONST
 #include "tcl.h"
 
 static int	TesteventloopCmd _ANSI_ARGS_((ClientData clientData,
Index: win/tclWinTest.c
===================================================================
RCS file: /cvsroot/tcl/tcl/win/tclWinTest.c,v
retrieving revision 1.6
diff -u -r1.6 tclWinTest.c
--- win/tclWinTest.c	21 Nov 2001 02:36:21 -0000	1.6
+++ win/tclWinTest.c	15 Jul 2002 23:34:58 -0000
@@ -11,6 +11,7 @@
  * RCS: @(#) $Id: tclWinTest.c,v 1.6 2001/11/21 02:36:21 hobbs Exp $
  */
 
+#define USE_COMPAT_CONST
 #include "tclWinInt.h"
 
 /*
