* path.h (cwdstuff): Move class.

* cygheap.h (cwdstuff): To here.
(init_cygheap): Add cwd field.
* child_info.h (cygheap_exec_info): Eliminate cwd stuff.
(child_info_spawn): Ditto.
* dcrt0.cc (dll_crt0_1): Remove cygcwd.fixup_after_exec call.  Convert cygcwd
reference to cygheap->cwd.
* path.cc: Ditto, throughout.
(cwdstuff::copy): Eliminate.
(cwdstuff::fixup_after_exec): Ditto.
* spawn.cc (spawn_guts): Eliminate call to cygcwd.copy.
* fhandler.h (FH_OSS_DSP): Move into "fast" device category.
This commit is contained in:
Christopher Faylor
2001-04-17 03:52:08 +00:00
parent 7ade56ca6a
commit 431ba7dd33
8 changed files with 48 additions and 70 deletions

View File

@ -160,26 +160,5 @@ has_exec_chars (const char *buf, int len)
(buf[0] == 'M' && buf[1] == 'Z'));
}
/* cwd cache stuff. */
class muto;
struct cwdstuff
{
char *posix;
char *win32;
DWORD hash;
muto *lock;
char *get (char *buf, int need_posix = 1, int with_chroot = 0, unsigned ulen = MAX_PATH);
DWORD get_hash ();
void init ();
void fixup_after_exec (char *win32, char *posix, DWORD hash);
bool get_initial ();
void copy (char * &posix_cwd, char * &win32_cwd, DWORD hash_cwd);
void set (const char *win32_cwd, const char *posix_cwd = NULL);
};
extern cwdstuff cygcwd;
extern int pathmatch (const char *path1, const char *path2);
extern int pathnmatch (const char *path1, const char *path2, int len);