Ups, I overlooked some warnings of casts...
Changing
Tcl_MakeFileChannel(_get_osfhandle((ClientData)fileno(...
to
Tcl_MakeFileChannel((ClientData)_get_osfhandle(fileno(...
does the trick.
So the final diffs are as follows:
cvs diff -ub tcl_commands.c:
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
Index: tcl_commands.c
===================================================================
RCS file: /home/cvspublic/tcl-moddtcl/tcl_commands.c,v
retrieving revision 1.26
diff -u -b -r1.26 tcl_commands.c
--- tcl_commands.c 5 Nov 2002 00:33:04 -0000 1.26
+++ tcl_commands.c 4 Jan 2003 15:09:19 -0000
@@ -743,8 +743,13 @@
{
/* create and return a file channel */
char *channelname = NULL;
+#ifdef __MINGW32__
+ chan =
Tcl_MakeFileChannel((ClientData)_get_osfhandle(fileno(
+ ApacheUpload_FILE(upload))), TCL_READABLE);
+#else
chan = Tcl_MakeFileChannel((ClientData)fileno(
ApacheUpload_FILE(upload)), TCL_READABLE);
+#endif
Tcl_RegisterChannel(interp, chan);
channelname = (char *)Tcl_GetChannelName(chan);
Tcl_SetStringObj(result, channelname, -1);
@@ -768,8 +773,13 @@
else
Tcl_SetChannelOption(interp, savechan, "-translation",
"binary");
+#ifdef __MINGW32__
+ chan =
Tcl_MakeFileChannel((ClientData)_get_osfhandle(fileno(
+ ApacheUpload_FILE(upload))), TCL_READABLE);
+#else
chan = Tcl_MakeFileChannel((ClientData)fileno(
ApacheUpload_FILE(upload)), TCL_READABLE);
+#endif
Tcl_SetChannelOption(interp, chan, "-translation",
"binary");
while ((sz = Tcl_Read(chan, savebuffer, BUFSZ)))
@@ -795,8 +805,13 @@
Tcl_Channel chan = NULL;
bytes = Tcl_Alloc((unsigned
int)ApacheUpload_size(upload));
+#ifdef __MINGW32__
+ chan =
Tcl_MakeFileChannel((ClientData)_get_osfhandle(fileno(
+ ApacheUpload_FILE(upload))), TCL_READABLE);
+#else
chan = Tcl_MakeFileChannel((ClientData)fileno(
ApacheUpload_FILE(upload)), TCL_READABLE);
+#endif
Tcl_SetChannelOption(interp, chan, "-translation",
"binary");
Tcl_SetChannelOption(interp, chan, "-encoding",
"binary");
/* put data in a variable */
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cvs diff -ub mod_dtcl.c
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
Index: mod_dtcl.c
===================================================================
RCS file: /home/cvspublic/tcl-moddtcl/mod_dtcl.c,v
retrieving revision 1.56
diff -u -b -r1.56 mod_dtcl.c
--- mod_dtcl.c 5 Nov 2002 00:33:04 -0000 1.56
+++ mod_dtcl.c 4 Jan 2003 15:10:25 -0000
@@ -571,7 +571,11 @@
{
if (upload->fp != NULL)
{
+#ifdef __MINGW32__
+ chan =
Tcl_MakeFileChannel((ClientData)_get_osfhandle(fileno(upload->fp)),
TCL_READABLE);
+#else
chan = Tcl_MakeFileChannel((ClientData)fileno(upload->fp),
TCL_READABLE);
+#endif
Tcl_RegisterChannel(interp, chan);
channelname = Tcl_GetChannelName(chan);
Tcl_ObjSetVar2(interp,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Regards
Holger
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]