diff options
-rw-r--r-- | dist/XSLoader/t/XSLoader.t | 4 | ||||
-rw-r--r-- | ext/File-Glob/Glob.xs | 8 |
2 files changed, 5 insertions, 7 deletions
diff --git a/dist/XSLoader/t/XSLoader.t b/dist/XSLoader/t/XSLoader.t index bf02e4821a..aab0af1fe7 100644 --- a/dist/XSLoader/t/XSLoader.t +++ b/dist/XSLoader/t/XSLoader.t @@ -25,7 +25,9 @@ BEGIN { my %modules = ( # ModuleName => q|code to check that it was loaded|, 'Cwd' => q| ::can_ok( 'Cwd' => 'fastcwd' ) |, # 5.7 ? - 'File::Glob' => q| ::can_ok( 'File::Glob' => 'doglob' ) |, # 5.6 + 'File::Glob' => q| ::can_ok( 'File::Glob' => # 5.6 + $] > 5.014 + ? 'bsd_glob' : 'doglob') |, $db_file => q| ::can_ok( $db_file => 'TIEHASH' ) |, # 5.0 'Socket' => q| ::can_ok( 'Socket' => 'inet_aton' ) |, # 5.0 'Time::HiRes'=> q| ::can_ok( 'Time::HiRes' => 'usleep' ) |, # 5.7.3 diff --git a/ext/File-Glob/Glob.xs b/ext/File-Glob/Glob.xs index a5f531d68f..830bb8cfb5 100644 --- a/ext/File-Glob/Glob.xs +++ b/ext/File-Glob/Glob.xs @@ -272,9 +272,8 @@ GLOB_ERROR() RETVAL void -doglob(pattern,...) +bsd_glob(pattern,...) char *pattern -PROTOTYPE: $;$ PREINIT: glob_t pglob; int i; @@ -284,14 +283,13 @@ PREINIT: PPCODE: { dMY_CXT; - dXSI32; /* allow for optional flags argument */ if (items > 1) { flags = (int) SvIV(ST(1)); /* remove unsupported flags */ flags &= ~(GLOB_APPEND | GLOB_DOOFFS | GLOB_ALTDIRFUNC | GLOB_MAGCHAR); - } else if (ix) { + } else { flags = (int) SvIV(get_sv("File::Glob::DEFAULT_FLAGS", GV_ADD)); } @@ -319,8 +317,6 @@ PPCODE: BOOT: { - CV *cv = newXS("File::Glob::bsd_glob", XS_File__Glob_doglob, __FILE__); - XSANY.any_i32 = 1; #ifndef PERL_EXTERNAL_GLOB /* Don’t do this at home! The globhook interface is highly volatile. */ PL_globhook = csh_glob; |