this is very similar to something that was part of randy's
win32 patch that i was going to do some more digging on before
applying. i'll try testing with 5.6 later today. if someone could
give it a whirl with 5.005, that would be cool.
jim
On Mon, Jan 08, 2001 at 10:36:17PM -0800, Doug MacEachern wrote:
> this patch is required to work with perl-current (5.7.1-dev), it should
> work with other Perls, but i have not tested.
>
> Index: Request/Request.xs
> ===================================================================
> RCS file: /home/cvs/httpd-apreq/Request/Request.xs,v
> retrieving revision 1.7
> diff -u -r1.7 Request.xs
> --- Request/Request.xs 2001/01/09 04:21:08 1.7
> +++ Request/Request.xs 2001/01/09 06:27:54
> @@ -18,6 +18,13 @@
> #define PerlLIO_close(fd) close((fd))
> #endif
>
> +#ifdef PerlIO
> +typedef PerlIO * InputStream;
> +#else
> +typedef FILE * InputStream;
> +#define PerlIO_importFILE(fp,flags) fp
> +#endif
> +
> static char *r_keys[] = { "_r", "r", NULL };
>
> static SV *r_key_sv(SV *in)
> @@ -199,12 +206,12 @@
>
> PROTOTYPES: DISABLE
>
> -FILE *
> +InputStream
> ApacheUpload_fh(upload)
> Apache::Upload upload
>
> CODE:
> - if (!(RETVAL = ApacheUpload_fh(upload))) {
> + if (!(RETVAL = PerlIO_importFILE(ApacheUpload_fh(upload),0))) {
> XSRETURN_UNDEF;
> }
>
>