Bug in cygcheck.exe

Town, Brad btown@ceddec.com
Mon Oct 16 13:36:00 GMT 2000


When y'all changed to using getopt_long in cygcheck (from CVS and snapshot),
you introduced an off-by-one error.  The following patch remedies that.

Without the patch, you can't do, say,
cygcheck bash.exe

Brad Town


--- cygcheck.cc.orig	Mon Oct 16 16:18:22 2000
+++ cygcheck.cc	Mon Oct 16 16:34:32 2000
@@ -1063,9 +1063,9 @@
 
   init_paths ();
 
-  if (argc > 1 && givehelp)
+  if (argc >= 1 && givehelp)
     {
-      if (argc == 2)
+      if (argc == 1)
 	{
 	  printf ("Here is where the OS will find your program, and which
dlls\n");
 	  printf ("will be used for it.  Use -v to see DLL version info\n");
@@ -1080,7 +1080,7 @@
 	printf ("\n");
     }
 
-  for (i = 1; i < argc; i++)
+  for (i = 0; i < argc; i++)
     {
       cygcheck (argv[i]);
       printf ("\n");

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com



More information about the Cygwin mailing list