Excellent - your patch (below) fixes this test:
C:\Temp\modperl-2.0>perl t/TEST -verbose t/apr/perlio.t ... # testing : read/write a dupped file # expected: This is a test: 2108 # received: This is a test: 2108 ok 10 ...
(and the rest of the testsuite (skipping filter, hooks and modules) also still passes OK too).
Excellent! One bug down.
From comparing the apr dup functions for win32 and unix, it seems that there could be a few other things that aren't dupped on win32. at least that's how I found the bug. it's not the first time mod_perl test suite finds a bug in apr. I wish theirs had a better test suite.
Shall I leave you to submit that to the Apache guys, then, seeing as you cracked it?
Unfortunately I have a commit access to apr, so they would expect me to exercise it. I'll commit it and disable that test on win32 untill the next version is released.
Index: apr/file_io/win32/filedup.c
===================================================================
RCS file: /home/cvspublic/apr/file_io/win32/filedup.c,v
retrieving revision 1.54
diff -u -r1.54 filedup.c
--- apr/file_io/win32/filedup.c 7 Jan 2003 00:52:53 -0000 1.54
+++ apr/file_io/win32/filedup.c 18 Sep 2003 21:13:11 -0000
@@ -81,7 +81,8 @@
(*new_file)->fname = apr_pstrdup(p, old_file->fname);
(*new_file)->append = old_file->append;
(*new_file)->buffered = FALSE;
-
+ (*new_file)->ungetchar = old_file->ungetchar;
+
apr_pool_cleanup_register((*new_file)->pool, (void *)(*new_file), file_cleanup,
apr_pool_cleanup_null);
@@ -150,6 +151,7 @@ new_file->fname = apr_pstrdup(new_file->pool, old_file->fname); new_file->append = old_file->append; new_file->buffered = FALSE; + new_file->ungetchar = old_file->ungetchar;
return APR_SUCCESS;
#endif /* !defined(_WIN32_WCE) */
--
__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
