Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2008-04-22 18:42:05 +0400
committerCorinna Vinschen <corinna@vinschen.de>2008-04-22 18:42:05 +0400
commitb677a99b34031a72dcb6fa696a28d01259abaf83 (patch)
tree2ef429fa7f46c649cd8e0b975b1c6dca66b828e9 /winsup/utils/cygcheck.cc
parentb1138f3d4bc00c4d99efabdc50fc6ef35bffa734 (diff)
* 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.
Diffstat (limited to 'winsup/utils/cygcheck.cc')
-rw-r--r--winsup/utils/cygcheck.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/winsup/utils/cygcheck.cc b/winsup/utils/cygcheck.cc
index 4d79e3140..84ee45f9a 100644
--- a/winsup/utils/cygcheck.cc
+++ b/winsup/utils/cygcheck.cc
@@ -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