From: "Hans-Bernhard Bröker" <HBBroeker@t-online.de>
To: cygwin@cygwin.com
Subject: Re: lftp 4.7.2 build fails in Cygwin
Date: Fri, 27 May 2016 16:33:00 -0000 [thread overview]
Message-ID: <8ab7b89b-e0e6-9fd2-b926-574971238750@t-online.de> (raw)
In-Reply-To: <v2bekbhfa5mjbe3rasddujjrbh6bjauaff@4ax.com>
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
next prev parent reply other threads:[~2016-05-27 8:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-26 18:21 Andrew Schulman
2016-05-27 16:33 ` Hans-Bernhard Bröker [this message]
2016-05-27 18:00 ` Andrew Schulman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8ab7b89b-e0e6-9fd2-b926-574971238750@t-online.de \
--to=hbbroeker@t-online.de \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).