delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/05/27/04:19:15

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:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=WuBS5Iq+aRNkVn93
NI/fTYphQCokax1xuZKItQ3/Fb8PnZ+rWfxCC28aGos/aGfLgHN8VlLMNCsI+sc7
Qfa49FpdCLjftvZgk5YDmwAhpIh9Uqw7oAhJ2aLO86oq9yibjHGd+imcpk1Dt//n
0ArdHu0ej+PnQ3UVXy8oD4t4Y8k=
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:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=Q3oNutvzDqwFlCTFoRIAs5
bGcX4=; b=gpC8qTZI2TxSWrLrr7PQ1Ebx7RZI7FkN4wI1X+3u/+5SzMfHuPJah0
TPMvoHDCjLK6qQheEw7hou83dcBPbWALOd9LE8mVDCLF4XUOCsIZ/hyZ0ib9aict
KdRmYGyZTGEwxuUkS/cFlFosMiRJceX1JGUoMmofMjOFoAVcYxW+0=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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=-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
Subject: Re: lftp 4.7.2 build fails in Cygwin
To: cygwin AT cygwin DOT com
References: <v2bekbhfa5mjbe3rasddujjrbh6bjauaff AT 4ax DOT com>
From: =?UTF-8?Q?Hans-Bernhard_Br=c3=b6ker?= <HBBroeker AT t-online DOT de>
Message-ID: <8ab7b89b-e0e6-9fd2-b926-574971238750@t-online.de>
Date: Fri, 27 May 2016 10:18:46 +0200
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: <v2bekbhfa5mjbe3rasddujjrbh6bjauaff@4ax.com>
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.

> (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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019