This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Bug in cygcheck.exe


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]