cURL / Mailing Lists / curl-library / Single Mail

curl-library

Conflicting lines 273 and 317 in /lib/urldata.h

From: Jan Ehrhardt <phpdev_at_ehrhardt.nl>
Date: Sat, 28 Jul 2012 04:00:59 +0200

line 273 in urldata.h
  ssl_connect_state connecting_state;
becomes active #ifdef USE_SSLEAY

line 317 in urldata.h
  ssl_connect_state connecting_state;
becomes active #ifdef USE_SCHANNEL

USE_SSLEAY is defined WITH_SSL=static
USE_SCHANNEL is defined WITH_SSH2=static

If you combine both options, compilation fails:

cl.exe /O2 /DNDEBUG /MD /DCURL_STATICLIB /I. /I../include /nologo /W3
        /EHsc /DWIN32 /FD /c /DBUILDING_LIBCURL
        /I"../../win32build/include" /DUSE_WIN32_IDN
        /DWANT_IDN_PROTOTYPES /DUSE_SSLEAY
        /I"../../win32build/include/openssl" /DHAVE_LIBSSH2
        /DHAVE_LIBSSH2_H /DLIBSSH2_WIN32 /DLIBSSH2_LIBRARY /DUSE_LIBSSH2
        /I../../win32build/include/libssh2 /DUSE_IPV6
        /DUSE_WINDOWS_SSPI /DUSE_SCHANNEL /Fo

"..\builds\libcurl-release-static-ssl-static-ssh2-static-ipv6-sspi-winssl-obj-lib/file.obj"
        ..\lib\file.c
c:\php-sdk\curl-src\lib\urldata.h(317) : error C2020:
        'connecting_state': 'struct' member redefinition

If I remove either line 273 or line 317 in urldata.h compilation
continues. A possible patch is to surround line 317 with #ifndef
USE_SSLEAY

#ifndef USE_SSLEAY
  ssl_connect_state connecting_state;
#endif

After this pathch compilation still fails for me, with all kinds of
errors starting at ../../win32build/include/openssl/x509v3.h(192) while
compiling ssluse.c into ssluse.obj, but that seems more like an issue
with OpenSSL.

Jan

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-07-28