Steve Hay wrote:
Randy Kobes wrote:
Thanks very much for the explanation, Steve - that makes
sense. So as was mentioned earlier, this problem probably
won't be encountered by the majority of Win32 users,
who will be unpacking a CPAN distribution. It is
annoying for svn users though who may encounter this
problem - would the following patch be OK, which uses
the generated httpd.conf as the file?

The patch works OK for me (and, as you say, we don't need the utime() call any more either.)

Randy, I see that you applied your patch to change the file used in the finfo tests, but you didn't remove the utime() call. Was there any particular reason why not, or just an oversight?

I can't see any point to keeping it now: the httpd.conf file should be up-to-date (i.e. in the same DST season), and if it isn't then the utime() call will only fix up the mtime, not the ctime, which is probably more confusing than helpful.

With the attached patch, I currently have all tests successful.


------------------------------------------------
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: t/lib/TestAPRlib/finfo.pm
===================================================================
--- t/lib/TestAPRlib/finfo.pm   (revision 412077)
+++ t/lib/TestAPRlib/finfo.pm   (working copy)
@@ -36,22 +36,6 @@
     # span across DST season boundaries.
     my $file = catfile Apache::Test::vars->{t_dir}, 'conf', 'httpd.conf';
 
-    # On Win32, touch the file to ensure it is in the same Daylight Saving
-    # Time season as the current time to workaround a bug in Win32's stat()
-    # which APR::Finfo allows for, otherwise the two disagree.
-    #
-    # With perl-5.8.0 on Win32, the syntax
-    #   utime undef, undef, $file;
-    # causes an uninitialized warning to be emitted,
-    # so use the equivalent
-    #   utime $now, $now, $file;
-    # instead.
-    #
-    if (WIN32) {
-        my $now = time;
-        utime $now, $now, $file;
-    }
-
     my $pool = APR::Pool->new();
     # populate the finfo struct first
     my $finfo = APR::Finfo::stat($file, APR::Const::FINFO_NORM, $pool);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to