diff options
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/path.cc | 12 |
2 files changed, 13 insertions, 4 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index b1f5b1cee..1c27b8cf5 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,10 @@ 2006-12-05 Corinna Vinschen <corinna@vinschen.de> + * path.cc (cwdstuff::init): Don't change to windows_system_directory + if Cygwin DLL has been loaded dynamically. + +2006-12-05 Corinna Vinschen <corinna@vinschen.de> + * path.cc (cwdstuff::set): Don't try to open directory on systems not supporting that. diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 9d1cb730e..b415a30dc 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -4154,12 +4154,16 @@ cwdstuff::get_hash () void cwdstuff::init () { + extern int dynamically_loaded; cwd_lock.init ("cwd_lock"); get_initial (); - /* Actually chdir into the syste dir to avoid cwd problems. See comment - in cwdstuff::set below. */ - extern char windows_system_directory[]; - SetCurrentDirectory (windows_system_directory); + if (!dynamically_loaded) + { + /* Actually chdir into the syste dir to avoid cwd problems. See comment + in cwdstuff::set below. */ + extern char windows_system_directory[]; + SetCurrentDirectory (windows_system_directory); + } cwd_lock.release (); } |