From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4430 invoked from network); 26 Jan 2001 13:37:07 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 26 Jan 2001 13:37:07 -0000 Received: (qmail 919 invoked by alias); 26 Jan 2001 13:37:01 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13391 Received: (qmail 904 invoked from network); 26 Jan 2001 13:36:59 -0000 X-Envelope-Sender-Is: Andrej.Borsenkow@mow.siemens.ru (at relayer david.siemens.de) From: "Andrej Borsenkow" To: "ZSH workers mailing list" Subject: RE: PATCH: avoid hashing command names twice on Cygwin Date: Fri, 26 Jan 2001 16:36:53 +0300 Message-ID: <000301c0879d$0b59bea0$21c9ca95@mow.siemens.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) In-reply-to: <000201c0879b$76bca8d0$21c9ca95@mow.siemens.ru> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 > > Under Cygwin every foo.exe was hashed twice - as foo and foo.exe. > > Actually, the code was funny. It contained one block that was executed > unconditionally and exactly the same later under condition. > Hmm ... I believe, this was intentional. But, under Cygwin, foo.exe *is* foo - stat(foo) returns the same as stat(foo.exe) if foo does not exist. Also, IIRC _WIN32 was removed from current development version of Cygwin, so the above would be resolved in favour of foo.exe instead of foo. We could be more intellegent and test if stat(foo) != stat(foo.exe) to decide if we should add both. Is it worth troubles? OTOH it is just command table; for all purposes hashing foo is the same as hashing foo.exe except very rare cases when both exist. Comments? -andrej