Date: Wed, 9 Oct 1996 22:32:22 -0400 (EDT)
From: Ilya Zakharevich <ilya@math.ohio-state.edu>
Use builtin methods if present under OS/2 (maybe should be
done outside of OS/2 too?).
*fastgetcwd = \&_NT_cwd;
}
elsif ($^O eq 'os2') {
-
- *cwd = \&_os2_cwd;
- *getcwd = \&_os2_cwd;
- *fastgetcwd = \&_os2_cwd;
- *fastcwd = \&_os2_cwd;
-}
+ # sys_cwd may keep the builtin command
+ *cwd = defined &sys_cwd ? \&sys_cwd : \&_os2_cwd;
+ *getcwd = defined &sys_cwd ? \&sys_cwd : \&_os2_cwd;
+ *fastgetcwd = defined &sys_cwd ? \&sys_cwd : \&_os2_cwd;
+ *fastcwd = defined &sys_cwd ? \&sys_cwd : \&_os2_cwd;
+ }
$^W = $oldw;
# package main; eval join('',<DATA>) || die $@; # quick test