On Oct 23, 2008, at 7:35 PM, John E. Malmberg wrote:

Craig A. Berry wrote:
  At
first glance the readdir part doesn't look right; there shouldn't need
to be another completely different way of setting up the macros for
one extension, but I don't know offhand why the existing macros would
not be visible in File::Glob.

According to the comments in iperlsys.h, it is the place that the macros need to be in order to make the wrappers visible to Perl.


I don't think there's any reason for the opendir/readdir part of the patch. Running ext/File/Glob/t/basic.t under the debugger and doing a SET TRACE/CALL/NOSYS shows definitively that it's already using the routines in vms.c:

%DEBUG-I-DYNIMGSET, setting image PL_FILE__GLOB
trace on calls at BSD_GLOB\g_opendir\%LINE 73519+88 in THREAD 1
 73519:         return(PerlDir_open(buf));
%DEBUG-I-DYNIMGSET, setting image DBGPERLSHR
trace on calls at VMS\Perl_opendir\%LINE 120525+16 in THREAD 1
120525:     Newx(dir, VMS_MAXRSS, char);

and a bit later:

trace on calls at BSD_GLOB\glob3\%LINE 73312+16 in THREAD 1
 73312:         while ((dp = (*readdirfunc)(dirp))) {
trace on calls at BSD_GLOB\my_readdir\%LINE 72577+16 in THREAD 1
 72577:     return PerlDir_read(d);
trace on calls at BSD_GLOB\my_readdir\%LINE 72577+48 in THREAD 1
 72577:     return PerlDir_read(d);
%DEBUG-I-DYNIMGSET, setting image DBGPERLSHR
trace on calls at PERLAPI\Perl_Gthr_key_ptr\%LINE 72551+28 in THREAD 1
72551: PERLVAR(Gthr_key, perl_key) /* key to retrieve per-thread struct */
%DEBUG-I-DYNIMGSET, setting image PL_FILE__GLOB
trace on calls at BSD_GLOB\my_readdir\%LINE 72577+96 in THREAD 1
 72577:     return PerlDir_read(d);
%DEBUG-I-DYNIMGSET, setting image DBGPERLSHR
trace on calls at VMS\Perl_readdir\%LINE 120685+20 in THREAD 1

________________________________________
Craig A. Berry
mailto:[EMAIL PROTECTED]

"... getting out of a sonnet is much more
 difficult than getting in."
                 Brad Leithauser

Reply via email to