delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/10/16/16:37:41

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <F10D23B02E54D011A0AB0020AF9CEFE988F961@lynx.ceddec.com>
From: "Town, Brad" <btown AT ceddec DOT com>
To: "'cygwin AT sources DOT redhat DOT com'" <cygwin AT sources DOT redhat DOT com>
Subject: Bug in cygcheck.exe
Date: Mon, 16 Oct 2000 16:38:46 -0400
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)

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 AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019