X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:from:subject:date:message-id:references :mime-version:content-type:content-transfer-encoding; q=dns; s= default; b=Q0YGwP/cKCNWskW0gLLhVaKf03BBmf012Yxbm6NsHscVBDJ/AdxXZ k2awd47BvGSAJ2mQdNNjwSqkKG9CJrmnMhwZrdDbwlq7S8oaW8UlrsnFkJSAesYI f+KARkcAoolnp2nUu5Eo7coX+nFN5JSLGPHd2Tiug9zIllmLMzaJRg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:from:subject:date:message-id:references :mime-version:content-type:content-transfer-encoding; s=default; bh=yg5pudEh0My3Nmgwy42Y2p4Jog4=; b=slHIh/rlFgoHnqbjcb5Wkwmgp9qk AWPggqD3kh6pZaYoZIEW59dFkGSWWyEvxsni3/8M9tn6g89rs6Li6Dk21bOD40zQ h4EYPMt6h6hkNNQevz5fHOTJ19f+9gOw4d/DtGgipwbi0YKGnC4AV5x0lTvQ2X2G PGQ1ppma9ZRq6qI= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=H*MI:sk:8ab7b89, configh, config.h, H*f:sk:8ab7b89 X-HELO: plane.gmane.org To: cygwin AT cygwin DOT com From: Andrew Schulman Subject: Re: lftp 4.7.2 build fails in Cygwin Date: Fri, 27 May 2016 05:37:03 -0400 Lines: 41 Message-ID: References: <8ab7b89b-e0e6-9fd2-b926-574971238750 AT t-online DOT de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive: encrypt X-IsSubscribed: yes > Am 26.05.2016 um 19:20 schrieb Andrew Schulman: > > Cygwin 2.5.1 x86_64 > > g++ 5.3.0 > > > > In Cygwin, build of lftp 4.7.2 fails in two places: > > > > (1) > > > > /home/andrex/dev/cygwin/lftp/lftp-4.7.2-1.x86_64/src/lftp-4.7.2/src/xmalloc.h:31:38: > > error: expected ';', ',' or ')' before '=' token > > char *xstrdup(const char *s,int spare=0); > > ^ > > > > g++ seems not to like the default value 'spare=0' in the function declaration. > > I'm convinced g++ actually likes that just fine. The problem is that > this header is being pulled in by a plain C source file: lftp_rl.c. But > C does no have default arguments; those only exist in C++. > > The underlying reason appearst to be that there is a conflict between > src/History.h and /usr/include/readline/history.h. > > This file wants to include readline's history.h, but "thanks" to > Windows's harebrained handling of filename cases, gets src/History.h > instead. Which is a C++ header file, and new with 4.7.2. Thanks, Hans-Bernard! You nailed it. I wasn't close to figuring that out. The patch below solves the problem. Andrew diff -urN lftp-4.7.2.orig/src/lftp_rl.c lftp-4.7.2/src/lftp_rl.c --- lftp-4.7.2.orig/src/lftp_rl.c 2016-02-20 08:57:53.000000000 -0500 +++ lftp-4.7.2/src/lftp_rl.c 2016-05-27 05:23:06.893807600 -0400 @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include "lftp_rl.h" -- 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