The attached patch, or something similar, is required to build the 
current svn version of libapreq2 on Win32.

PerlLIO_link() is mapped to link(), which the Win32 CRT doesn't have.  I 
will look at changing PerlLIO_link() to map it to win32_link() on Win32 
in future versions of Perl (win32_link() is exported from the perl 
library, and implements hard links on NTFS), so some further 
version-checking trickery could be required later, but just falling back 
to a copy is probably the best thing to do for now.

Btw, are the build instructions in need of an update?  The INSTALL 
document refers to a "mod_apreq" target for Win32 builds, but the 
Makefile doesn't contain any such target.

- Steve


------------------------------------------------
Radan Computational Ltd.

The information contained in this message and any files transmitted with it are 
confidential and intended for the addressee(s) only.  If you have received this 
message in error or there are any problems, please notify the sender 
immediately.  The unauthorized use, disclosure, copying or alteration of this 
message is strictly forbidden.  Note that any views or opinions presented in 
this email are solely those of the author and do not necessarily represent 
those of Radan Computational Ltd.  The recipient(s) of this message should 
check it and any attached files for viruses: Radan Computational will accept no 
liability for any damage caused by any virus transmitted by this email.
Index: glue/perl/xsbuilder/APR/Request/Param/Param.xs
===================================================================
--- glue/perl/xsbuilder/APR/Request/Param/Param.xs      (revision 279559)
+++ glue/perl/xsbuilder/APR/Request/Param/Param.xs      (working copy)
@@ -201,9 +201,12 @@
         s = apr_file_name_get(&fname, f);
         if (s != APR_SUCCESS)
             Perl_croak(aTHX_ "$param->upload_link($file): can't get spoolfile 
name");
+#ifndef WIN32
         if (PerlLIO_link(fname, path) >= 0)
             XSRETURN_YES;
-        else {
+        else
+#endif
+        {
             s = apr_file_copy(fname, path, APR_OS_DEFAULT, param->upload->p);
             if (s == APR_SUCCESS)
                 XSRETURN_YES;

Reply via email to