tcl-mod_dtcl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject cvs commit: tcl-moddtcl/debian changelog
Date Tue, 07 Jan 2003 22:21:22 GMT
davidw      2003/01/07 14:21:22

  Modified:    .        mod_dtcl.c tcl_commands.c
               debian   changelog
  Log:
  * Made file upload stuff work on windows, thanks to Holger Zeinert.
  
  Revision  Changes    Path
  1.57      +10 -3     tcl-moddtcl/mod_dtcl.c
  
  Index: mod_dtcl.c
  ===================================================================
  RCS file: /home/cvs/tcl-moddtcl/mod_dtcl.c,v
  retrieving revision 1.56
  retrieving revision 1.57
  diff -u -r1.56 -r1.57
  --- mod_dtcl.c	5 Nov 2002 00:33:04 -0000	1.56
  +++ mod_dtcl.c	7 Jan 2003 22:21:22 -0000	1.57
  @@ -569,9 +569,16 @@
   	}
   	if (!upload_files_to_var)
   	{
  -	    if (upload->fp != NULL)
  +	    if (ApacheUpload_FILE(upload) != NULL)
   	    {
  -		chan = Tcl_MakeFileChannel((ClientData)fileno(upload->fp), TCL_READABLE);
  +#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 = Tcl_GetChannelName(chan);
   		Tcl_ObjSetVar2(interp,
  
  
  
  1.27      +24 -6     tcl-moddtcl/tcl_commands.c
  
  Index: tcl_commands.c
  ===================================================================
  RCS file: /home/cvs/tcl-moddtcl/tcl_commands.c,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- tcl_commands.c	5 Nov 2002 00:33:04 -0000	1.26
  +++ tcl_commands.c	7 Jan 2003 22:21:22 -0000	1.27
  @@ -743,8 +743,14 @@
   		{
   		    /* create and return a file channel */
   		    char *channelname = NULL;
  -		    chan = Tcl_MakeFileChannel((ClientData)fileno(
  -			ApacheUpload_FILE(upload)), TCL_READABLE);
  +#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 +774,14 @@
   		else
   		    Tcl_SetChannelOption(interp, savechan, "-translation", "binary");
   
  -		chan = Tcl_MakeFileChannel((ClientData)fileno(
  -		    ApacheUpload_FILE(upload)), TCL_READABLE);
  +#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 +807,14 @@
   		    Tcl_Channel chan = NULL;
   
   		    bytes = Tcl_Alloc((unsigned int)ApacheUpload_size(upload));
  -		    chan = Tcl_MakeFileChannel((ClientData)fileno(
  -			ApacheUpload_FILE(upload)), TCL_READABLE);
  +#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  */
  
  
  
  1.25      +6 -0      tcl-moddtcl/debian/changelog
  
  Index: changelog
  ===================================================================
  RCS file: /home/cvs/tcl-moddtcl/debian/changelog,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- changelog	18 Nov 2002 19:39:28 -0000	1.24
  +++ changelog	7 Jan 2003 22:21:22 -0000	1.25
  @@ -1,3 +1,9 @@
  +libapache-mod-dtcl (1.0.1-1) unstable; urgency=low
  +
  +  * Made file upload stuff work on windows, thanks to Holger Zeinert.
  +
  + -- David N. Welton <davidw@debian.org>  Tue,  7 Jan 2003 14:18:02 -0800
  +
   libapache-mod-dtcl (1.0.0-1) unstable; urgency=low
   
     * Cleanup after HEAD requests.
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: mod_dtcl-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: mod_dtcl-cvs-help@tcl.apache.org


Mime
View raw message