delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Message-ID: | <4270D2B6.3030805@zikzak.net> |
Date: | Thu, 28 Apr 2005 22:10:30 +1000 |
From: | Daniel Bell <dbell AT zikzak DOT net> |
Reply-To: | daniel DOT m DOT bell AT gmail DOT com |
User-Agent: | Mozilla Thunderbird 1.0.2 (Windows/20050317) |
MIME-Version: | 1.0 |
To: | cygwin AT cygwin DOT com |
Subject: | [PATCH]: which 1.6-1 |
X-TPG-Antivirus: | Passed |
Hi, I have used "which" under cygwin and discovered that it does not work correctly (compared to solaris which) when passed an absolute path. For example: which /usr/bin/ksh returns "command not found" under cygwin but "/usr/bin/ksh" under solaris. I have created a patch against which 1.6-1 that checks for an absolute path. Daniel. --- which.c.orig 2004-12-27 09:26:16.001000000 +1100 +++ which.c 2005-04-28 21:55:06.136577600 +1000 @@ -97,6 +97,11 @@ char cmdpath[PATH_MAX]; int found = 0; + if ((cmd[0] == '/') && (check(cmd))) + { + puts(cmd); + continue; + } for (i = 0; i < pcnt; ++i) { strcpy (cmdpath, path[i]); -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |