From: Andy Polyakov Date: Thu, 26 Oct 2006 10:52:12 +0000 (+0000) Subject: Minor portability update to c_rehash. X-Git-Tag: OpenSSL_0_9_8k^2~1089 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a2688c872ded9cd210bb721ab6bbf5e7cc745049;p=oweals%2Fopenssl.git Minor portability update to c_rehash. --- diff --git a/tools/c_rehash.in b/tools/c_rehash.in index ca3021ae8a..96a73aeedd 100644 --- a/tools/c_rehash.in +++ b/tools/c_rehash.in @@ -15,7 +15,13 @@ if(defined $ENV{OPENSSL}) { $ENV{OPENSSL} = $openssl; } -my $pwd = `pwd`; chomp $pwd; +my $pwd; +eval "require Cwd"; +if (defined(&Cwd::getcwd)) { + $pwd=Cwd::getcwd(); +} else { + $pwd=`pwd`; chomp($pwd); +} my $path_delim = ($pwd =~ /^[a-z]\:/i) ? ';' : ':'; # DOS/Win32 or Unix delimiter? $ENV{PATH} .= "$path_delim$dir/bin";