From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 86849 invoked by alias); 27 May 2016 09:37:22 -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 86835 invoked by uid 89); 27 May 2016 09:37:21 -0000 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 Received: from plane.gmane.org (HELO plane.gmane.org) (80.91.229.3) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Fri, 27 May 2016 09:37:20 +0000 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1b6ECi-0004Mb-5j for cygwin@cygwin.com; Fri, 27 May 2016 11:37:16 +0200 Received: from c-69-140-37-22.hsd1.md.comcast.net ([69.140.37.22]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 27 May 2016 11:37:16 +0200 Received: from schulman.andrew by c-69-140-37-22.hsd1.md.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 27 May 2016 11:37:16 +0200 To: cygwin@cygwin.com From: Andrew Schulman Subject: Re: lftp 4.7.2 build fails in Cygwin Date: Fri, 27 May 2016 18:00:00 -0000 Message-ID: References: <8ab7b89b-e0e6-9fd2-b926-574971238750@t-online.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive: encrypt X-IsSubscribed: yes X-SW-Source: 2016-05/txt/msg00349.txt.bz2 > 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