#include <tcl.h> ... #if (TCL_MAJOR_VERSION < 8) extern int Tcl_GetChannelHandle _ANSI_ARGS_((Tcl_Channel, int, ClientData*)); #endifSomewhere in your program/library code, add these lines:
#if (TCL_MAJOR_VERSION < 8)
int
Tcl_GetChannelHandle(Tcl_Channel channel, int dir, ClientData *handlePtr)
{
Tcl_File tfile=Tcl_GetChannelFile(channel,dir);
if(tfile==NULL) return TCL_ERROR;
*handlePtr=Tcl_GetFileInfo(tfile,NULL);
return TCL_OK;
}
#endifThere! Now you can call Tcl_GetChannelHandle() even if you happen to link against a Tcl 7 library.Category Porting
