Subject: Re: Gnu-Win32 and Tcl/Tk
From: [email-masked] ("Kirk W. Benson")

17 Dec 1996 10:03:19 -0800
Sender: [email-masked]
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
X-Sender: [email-masked]
X-Mailer: Windows Eudora Light Version 1.5.4 (32)
Original-To: [email-masked]
Original-Sender: [email-masked]

A couple of comments on interfacing Gnu-win32 and TCL:

The work of Mr. Hamel is interesting in that it proves that it is possible
to write TCL extensions under Gnu-win32 and interface them to the
Win32-native release of TCL.  However, the reality is that most "large" TCL
projects involve the use of other extensions which in many cases do not
provide Win32 versions.

Therefore, the "best" solution IMO is to build the UNIX source base(s) under
Gnu-win32 such that all will inter-operate on NT under the same environment.
This would then encompass TK given X11R6 and a builtin X-server.  The goal
would then be for Gnu-win32 to provide sufficiently robust compatibility
that these modules will operate.  

That said, there appear to several areas where native Win32 TCL has
compatibility problems with external unix ports.  There has already been
some discussion in this list relative to these:

a. Heap allocatiobn.  If the Gnu-win32 extension malloc's memory which is
freed within the TCL DLL, the freeing will fail.  This can be avoided by
calling the Tcl_Alloc/Tcl_Free routines within the extension.

b. File handles.  The DLL uses NT handles to represent open files within the
channel structures.  Therefore, a channel cannot be registered with the DLL
using an fd returned from a Gbu-win32 function.  Using an fd as an event
source will require an API call which returns the NT Handle given a fd; a
converse function to import a NT Handle into the fd space would also be needed.

---------------------------------------------------------
Kirk W. Benson                 Ph: 214-851-7076
Healthcare Communications Inc. FAX 214-851-7045
15301 Dallas Parkway Ste. 950  email: [email-masked]
Dallas, TX 75248

-
For help on using this list, send a message to
"[email-masked]" with one line of text: "help".