summaryrefslogtreecommitdiffstats
path: root/tools/c_rehash.in
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2006-10-26 12:52:12 +0200
committerAndy Polyakov <appro@openssl.org>2006-10-26 12:52:12 +0200
commita2688c872ded9cd210bb721ab6bbf5e7cc745049 (patch)
tree59ab74eafa0b0c1a136b372331403b354aa4121e /tools/c_rehash.in
parentFurther mingw build procedure updates. (diff)
downloadopenssl-a2688c872ded9cd210bb721ab6bbf5e7cc745049.tar.xz
openssl-a2688c872ded9cd210bb721ab6bbf5e7cc745049.zip
Minor portability update to c_rehash.
Diffstat (limited to 'tools/c_rehash.in')
-rw-r--r--tools/c_rehash.in8
1 files changed, 7 insertions, 1 deletions
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";