[Patch] cygcheck: Warn about multiple or missing cygwin1.dlls.

Bas van Gompel cygwin-patches.buzz@bavag.tmfweb.nl
Tue Oct 26 21:34:00 GMT 2004


Hi,

Another (trivial, I think) patch, this time to warn about one of the
more common pitfalls: multiple or missing cygwin1.dlls.

2004-10-26  Bas van Gompel  <cygwin-patch.buzz@bavag.tmfweb.nl>

	* cygcheck.cc (dump_sysinfo): Warn about missing or multiple cygwin1
	dlls.


--- src/winsup/utils-3/cygcheck.cc	25 Oct 2004 16:11:41 -0000	1.57
+++ src/winsup/utils-3/cygcheck.cc	26 Oct 2004 20:50:24 -0000
@@ -1222,6 +1222,7 @@ dump_sysinfo ()
 
   if (givehelp)
     printf ("Looking for various Cygnus DLLs...  (-v gives version info)\n");
+  int cygwin_dll_count = 0;
   for (i = 0; i < num_paths; i++)
     {
       WIN32_FIND_DATA ffinfo;
@@ -1238,7 +1239,10 @@ dump_sysinfo ()
 		{
 		  sprintf (tmp, "%s\\%s", paths[i], f);
 		  if (strcasecmp (f, "cygwin1.dll") == 0)
-		    found_cygwin_dll = strdup (tmp);
+		    {
+		      cygwin_dll_count++;
+		      found_cygwin_dll = strdup (tmp);
+		    }
 		  else
 		    ls (tmp);
 		}
@@ -1253,6 +1257,10 @@ dump_sysinfo ()
 
       FindClose (ff);
     }
+  if (cygwin_dll_count > 1)
+    puts ("Warning: There are multiple cygwin1.dlls on your path");
+  if (!cygwin_dll_count)
+    puts ("Warning: cygwin1.dll not found on your path");
 }
 
 static int



L8r,

Buzz.
-- 
  ) |  | ---/ ---/  Yes, this | This message consists of true | I do not
--  |  |   /    /   really is |   and false bits entirely.    | mail for
  ) |  |  /    /    a 72 by 4 +-------------------------------+ any1 but
--  \--| /--- /---  .sigfile. |   |perl -pe "s.u(z)\1.as."    | me. 4^re



More information about the Cygwin-patches mailing list