* cygcheck.cc (dump_sysinfo): Fix multiple Cygwin DLL test.
* path.cc: Fetch mount points from fstab files instead of from registry. Use adapted functions copied from Cygwin DLL. (mnt_t): Drop issys member. Define as "mnt_t" instead of "struct mnt_t" subsequently. (max_mount_entry): New variable. (unconvert_slashes): Move to earlier location in file. Make inline. (find2): Remove. (get_cygdrive0): Remove. (get_cygdrive): Remove. (skip_ws): New function. (find_ws): Ditto. (conv_fstab_spaces): Ditto. (read_flags): Ditto. (from_fstab_line): Ditto. (get_user): Ditto. (from_fstab): Ditto. (mnt_sort): Ditto. (read_mounts): Drop old registry code. Fetch "Software\Cygwin\Setup\rootdir" value from HKCU or HKLM key. Use rootdir extracted from module path as fallback. Call from_fstab for nouser and user mount points. (setmntent): Check max_mount_entry to test if read_mounts must be called. (getmntent): Use MOUNT_SYSTEM flag instead of mnt_t's issys member.
This commit is contained in:
@@ -1669,6 +1669,7 @@ dump_sysinfo ()
|
||||
if (givehelp)
|
||||
printf ("Looking for various Cygwin DLLs... (-v gives version info)\n");
|
||||
int cygwin_dll_count = 0;
|
||||
char cygdll_path[32768];
|
||||
for (pathlike *pth = paths; pth->dir; pth++)
|
||||
{
|
||||
WIN32_FIND_DATA ffinfo;
|
||||
@@ -1686,7 +1687,11 @@ dump_sysinfo ()
|
||||
sprintf (tmp, "%s%s", pth->dir, f);
|
||||
if (strcasecmp (f, "cygwin1.dll") == 0)
|
||||
{
|
||||
cygwin_dll_count++;
|
||||
if (!cygwin_dll_count)
|
||||
strcpy (cygdll_path, pth->dir);
|
||||
if (!cygwin_dll_count
|
||||
|| strcasecmp (cygdll_path, pth->dir) != 0)
|
||||
cygwin_dll_count++;
|
||||
found_cygwin_dll = strdup (tmp);
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user