This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: lftp 4.7.2 build fails in Cygwin


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]