From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 59868 invoked by alias); 27 Oct 2015 00:11:52 -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 59851 invoked by uid 89); 27 Oct 2015 00:11:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.7 required=5.0 tests=AWL,BAYES_05,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: out2-smtp.messagingengine.com Received: from out2-smtp.messagingengine.com (HELO out2-smtp.messagingengine.com) (66.111.4.26) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 27 Oct 2015 00:11:50 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id EF448209C2 for ; Mon, 26 Oct 2015 20:11:48 -0400 (EDT) Received: from web5 ([10.202.2.215]) by compute1.internal (MEProxy); Mon, 26 Oct 2015 20:11:48 -0400 Received: by web5.nyi.internal (Postfix, from userid 99) id BA5CAA64E72; Mon, 26 Oct 2015 20:11:48 -0400 (EDT) Message-Id: <1445904708.1171081.420968713.3D94007E@webmail.messagingengine.com> From: Anthony Heading To: Mark Geisert , 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: Tue, 27 Oct 2015 08:46:00 -0000 In-Reply-To: References: <1445135414.3384650.413058409.46BC94AD@webmail.messagingengine.com> <1445823930.241438.419951441.109BA262@webmail.messagingengine.com> <562E30AF.5020502@cornell.edu> X-IsSubscribed: yes X-SW-Source: 2015-10/txt/msg00472.txt.bz2 On Mon, Oct 26, 2015, at 03:54 PM, Mark Geisert wrote: > There are configure errors from this process, at least on my > machine. I'll take on maintenance of this package. Give me a short > while to get my sea legs. Thanks Ken for the pointers and Corinna > for the nudge. Thanks Mark. I would try to suggest you beat me to the punch but the truth is you're much more noble. I didn't hit any explicit configure issue myself, rather a bunch of unrecognized case-invariant strcmp variants, which took about 10 seconds to fix but did make me wonder about the source code. And then this below was the slightly trickier issue: % src/mkshortcut/.libs/mkshortcut xyzzy mkshortcut: Saving "xyzzy.lnk" failed; does the target directory exist? The packaged binary does not do this. Fiddling about with various command-line flags suggests the issue is with saving the link to a non-absolute path; Google sort of vaguely implies that IPersistFile may have changed semantics starting in Windows 8, but the docs I have say the Save() path should be absolute. So I added the minimal patch below. At least, I think it's minimal, but I'd certainly defer to you as the new maintainer! Anyhow, attached below fwiw in case it's of any help. Rgds Anthony --- mkshortcut.c.orig 2015-10-17 21:57:08.000000000 -0400 +++ mkshortcut.c 2015-10-17 23:52:50.723030500 -0400 @@ -421,6 +421,7 @@ IShellLink *shell_link; IPersistFile *persist_file; WCHAR widepath[MAX_PATH]; + char link_path[MAX_PATH]; /* If there's a colon in the TARGET, it should be a URL */ if (strchr (opts.target_arg, ':') != NULL) @@ -596,6 +598,14 @@ free (buf_str); } + hres = GetFullPathName(link_name, sizeof(link_path), link_path, 0); + if (hres == 0) { + fprintf (stderr, "%s: Could not qualify link name\n", program_name); + return 2; + } + free (link_name); + link_name = xstrndup(link_path, strlen(link_path)); + /* Setup description text */ if (opts.desc_arg != NULL) { -- 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