delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/05/27/05:37:41

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: <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=-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 <schulman DOT andrew AT epa DOT gov>
Subject: Re: lftp 4.7.2 build fails in Cygwin
Date: Fri, 27 May 2016 05:37:03 -0400
Lines: 41
Message-ID: <e25gkb5597uo9uuukm24t96c6bhitqnun1@4ax.com>
References: <v2bekbhfa5mjbe3rasddujjrbh6bjauaff AT 4ax DOT com> <8ab7b89b-e0e6-9fd2-b926-574971238750 AT t-online DOT de>
Mime-Version: 1.0
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 <config.h>
 #include <stdio.h>
 #include <readline.h>
-#include <history.h>
+#include <readline/history.h>
 #include <stdlib.h>
 #include <string.h>
 #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

- Raw text -


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