From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 62114 invoked by alias); 27 May 2016 08:19:01 -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 62086 invoked by uid 89); 27 May 2016 08:19:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.4 required=5.0 tests=BAYES_20,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=Schulman, H*i:sk:v2bekbh, H*f:sk:v2bekbh, H*M:online X-HELO: mailout02.t-online.de Received: from mailout02.t-online.de (HELO mailout02.t-online.de) (194.25.134.17) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 27 May 2016 08:18:58 +0000 Received: from fwd03.aul.t-online.de (fwd03.aul.t-online.de [172.20.27.148]) by mailout02.t-online.de (Postfix) with SMTP id F0E0341A26F8 for ; Fri, 27 May 2016 10:18:54 +0200 (CEST) Received: from [192.168.2.28] (b7dN9aZlYh6nb7y-wb6JF1WMRbijPIbVjADVH+72xJ3yWdp7jDSHTtW6qLJm19iZOI@[91.59.25.90]) by fwd03.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-SHA encrypted) esmtp id 1b6Cyr-1kdPw80; Fri, 27 May 2016 10:18:53 +0200 Subject: Re: lftp 4.7.2 build fails in Cygwin To: cygwin@cygwin.com References: From: =?UTF-8?Q?Hans-Bernhard_Br=c3=b6ker?= Message-ID: <8ab7b89b-e0e6-9fd2-b926-574971238750@t-online.de> Date: Fri, 27 May 2016 16:33:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2016-05/txt/msg00348.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. > (2) > > /home/andrex/dev/cygwin/lftp/lftp-4.7.2-1.x86_64/src/lftp-4.7.2/src/xmalloc.h:32:21: > error: expected ';', ',' or ')' before '&' token > char *xstrset(char *&mem,const char *s); Same problem, same cause: that is not legal C code, so the C compiler is correct in rejecting it. -- 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