From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 42143 invoked by alias); 28 Oct 2015 00:30:37 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 42133 invoked by uid 89); 28 Oct 2015 00:30:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: out3-smtp.messagingengine.com Received: from out3-smtp.messagingengine.com (HELO out3-smtp.messagingengine.com) (66.111.4.27) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 28 Oct 2015 00:30:35 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id BF2AC2043B for ; Tue, 27 Oct 2015 20:30:32 -0400 (EDT) Received: from web5 ([10.202.2.215]) by compute3.internal (MEProxy); Tue, 27 Oct 2015 20:30:32 -0400 Received: by web5.nyi.internal (Postfix, from userid 99) id 90492A6E525; Tue, 27 Oct 2015 20:30:32 -0400 (EDT) Message-Id: <1445992232.1521329.422055817.4924D989@webmail.messagingengine.com> From: Anthony Heading To: cygwin@cygwin.com MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain Subject: Re: mkshortcut (cygutils-1.4.14) free error Date: Wed, 28 Oct 2015 04:49:00 -0000 In-Reply-To: References: <1445135414.3384650.413058409.46BC94AD@webmail.messagingengine.com> <1445823930.241438.419951441.109BA262@webmail.messagingengine.com> <562E30AF.5020502@cornell.edu> <1445904708.1171081.420968713.3D94007E@webmail.messagingengine.com> X-IsSubscribed: yes X-SW-Source: 2015-10/txt/msg00496.txt.bz2 On Tue, Oct 27, 2015, at 01:29 AM, Mark Geisert wrote: > I really appreciate the leads and code you've provided. Could we > please discuss only on the Cygwin mailing list? That's the convention > we have, barring extraordinary circumstances :) . It allows for > public review. I believe I did send everything to the mailing list. I may have copied you directly also. Apologies if that was inconvenient. > At that point I could reproduce your first mkshortcut issue. Your > patch seems to fix that issue. So far, so good. Great. > The second issue with the non-absolute path is more problematic. > Without your second patch, I do see the issue but only on the 2nd or > later invocation. In other words, if the xyzzy.lnk file does not > initially exist, the command 'src/mkshortcut/.libs/mkshortcut xyzzy' > works and does create the link file. Another invocation then shows the > error. Is it simply mis-reporting that there's an existing link file? Yes. The hint in the error message is unhelpful I think, since a missing directory is only one of a myriad of possible errors. As you note, an existing link prompts the same message. On the build I made on Windows 10, however, I hit the problem on the very first invocation. I imagine you therefore are building on Windows 7 or earlier, which seems to produce binaries that work OK. As I said, I suspect this is because IPersistFile::Save has changed semantics, e.g. per this link: https://msdn.microsoft.com/en-us/library/windows/desktop/hh848036%28v=vs.85%29.aspx I haven't verified this; I don't know how why or whether gcc is volunteering the executable to run in Windows 8 mode, or if there's a manifest in some dll library stub, or whether the COM ID of the IPersistFile interface is redirected by newer headers, or any similar variant of Windows black magic, but it seems to me like a good guess. If you're going to stay building on Windows 7 then, I don't think this latter patch is needed, although it's hopefully harmless. But I guess without it the code will silently break when Windows 8 or newer comes into the picture. Regards Anthony -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple