Marc Hoersken wrote:
> On 12.03.2014 20:44, Daniel Stenberg wrote:
> > Can you summerize for us what the outstanding issues/patches are?
> 
> I think the outstanding issues / possible areas of improvement are:
> - reducing the ifdef-backend-logic within pem.c, at least that was a
> suggestion by Peter in his mail from the 13th November:
> > I think we need to figure something better out here. Is there a reason
> > not to simply always compile those first few functions in pem.c?

Yes, we should find a solution for this. Marc, did you notice if
there *is* a reason not to always compile those first functions?
Let's see if we can hammer this one out.


> - not directly related to the WinCNG backend, but rather Peter's changes
> to the backend selection logic: fixing the non-autotools based
> buildsystem to compile again.

Yes, I overlooked the define. :( Please have a look at the attached
patch. If you think it's OK I'll push it.

Then it's just the pem.c thing left.


//Peter
>From 8c77d7d640c795806afc827ed5133af430c5db0c Mon Sep 17 00:00:00 2001
From: Peter Stuge <pe...@stuge.se>
Date: Thu, 13 Mar 2014 20:30:32 +0100
Subject: [PATCH] Fix non-autotools builds: Always define the LIBSSH2_OPENSSL
 CPP macro
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Commit d512b25f69a1b6778881f6b4b5ff9cfc6023be42 introduced a crypto
library abstraction in the autotools build system, to allow us to more
easily support new crypto libraries. In that process it was found that
all other build system which we support are hard-coded to build with
OpenSSL. Commit f5c1a0d98bd51aeb24aca3d49c7c81dcf8bd858d fixes automake
introduced into non-autotools build systems but still overlooked the
CPP macro saying that we are using OpenSSL.

Thanks to Marc Hörsken for identifying this issue and proposing a fix
for win32/{GNUmakefile,config.mk}. This commit uses a slightly different
approach but the end result is the same.
---
 nw/GNUmakefile        |  1 +
 win32/GNUmakefile     |  1 +
 win32/Makefile.Watcom |  1 +
 win32/config.mk       |  2 +-
 win32/msvcproj.head   | 17 +++++++++--------
 5 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/nw/GNUmakefile b/nw/GNUmakefile
index e666e29..0fde45a 100644
--- a/nw/GNUmakefile
+++ b/nw/GNUmakefile
@@ -214,6 +214,7 @@ endif
 vpath %.c . ../src
 
 # only OpenSSL is supported with this build system
+CFLAGS += -DLIBSSH2_OPENSSL
 include ../Makefile.OpenSSL.inc
 
 # include Makefile.inc to get CSOURCES define
diff --git a/win32/GNUmakefile b/win32/GNUmakefile
index c0cc20a..90e06d4 100644
--- a/win32/GNUmakefile
+++ b/win32/GNUmakefile
@@ -180,6 +180,7 @@ CFLAGS      += $(INCLUDES)
 vpath %.c . ../src
 
 # only OpenSSL is supported with this build system
+CFLAGS += -DLIBSSH2_OPENSSL
 include ../Makefile.OpenSSL.inc
 
 # include Makefile.inc to get CSOURCES define
diff --git a/win32/Makefile.Watcom b/win32/Makefile.Watcom
index 5847cf7..f0f0408 100644
--- a/win32/Makefile.Watcom
+++ b/win32/Makefile.Watcom
@@ -94,6 +94,7 @@ LIB_ARG  = $(OBJ_BASE)\stat\wlib.arg
 !error You MUST call wmake with the -u switch!
 !else
 # only OpenSSL is supported with this build system
+CFLAGS += -dLIBSSH2_OPENSSL
 !include ..\Makefile.OpenSSL.inc
 !include ..\Makefile.inc
 !endif
diff --git a/win32/config.mk b/win32/config.mk
index 4c8eb2a..f0e514a 100644
--- a/win32/config.mk
+++ b/win32/config.mk
@@ -29,7 +29,7 @@ CPPFLAGS=/Oi /O2 /Oy /GF /Y- /MD /DNDEBUG
 DLLFLAGS=/DEBUG /LD
 !endif
 
-CPPFLAGS=/nologo /GL /Zi /EHsc $(CPPFLAGS) /Iwin32 /Iinclude /I$(OPENSSLINC) 
$(ZLIBINC)
+CPPFLAGS=/nologo /GL /Zi /EHsc $(CPPFLAGS) /Iwin32 /Iinclude /DLIBSSH2_OPENSSL 
/I$(OPENSSLINC) $(ZLIBINC)
 CFLAGS=$(CPPFLAGS)
 RCFLAGS=/Iinclude
 DLLFLAGS=$(CFLAGS) $(DLLFLAGS)
diff --git a/win32/msvcproj.head b/win32/msvcproj.head
index ded6343..6b39740 100644
--- a/win32/msvcproj.head
+++ b/win32/msvcproj.head
@@ -1,6 +1,7 @@
 # Microsoft Developer Studio Project File - Name="libssh2" - Package Owner=<4>
 # Microsoft Developer Studio Generated Build File, Format Version 6.00
 # ** DO NOT EDIT **
+# only OpenSSL is supported with this build system
 
 # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
 # TARGTYPE "Win32 (x86) Static Library" 0x0104
@@ -45,8 +46,8 @@ RSC=rc.exe
 # PROP Intermediate_Dir "Release_dll"
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "LIBSSH2_WIN32" 
/D "_MBCS" /D "_LIB" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\win32" /I "..\include" /D "WIN32" /D 
"NDEBUG" /D "LIBSSH2_WIN32" /D "_MBCS" /D "_LIB" /YX /FD /c
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "LIBSSH2_WIN32" 
/D "LIBSSH2_OPENSSL" /D "_MBCS" /D "_LIB" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\win32" /I "..\include" /D "WIN32" /D 
"NDEBUG" /D "LIBSSH2_WIN32" /D "LIBSSH2_OPENSSL" /D "_MBCS" /D "_LIB" /YX /FD /c
 # SUBTRACT CPP /YX
 # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
@@ -72,8 +73,8 @@ LINK32=link.exe
 # PROP Intermediate_Dir "Debug_dll"
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D 
"LIBSSH2_WIN32" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD CPP /nologo /MD /W3 /Gm /GX /ZI /Od /I "..\win32" /I "..\include" /D 
"WIN32" /D "_DEBUG" /D "LIBSSH2_WIN32" /D "_MBCS" /D "_LIB" /D "LIBSSH2DEBUG" 
/YX /FD /GZ /c
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D 
"LIBSSH2_WIN32" /D "LIBSSH2_OPENSSL" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
+# ADD CPP /nologo /MD /W3 /Gm /GX /ZI /Od /I "..\win32" /I "..\include" /D 
"WIN32" /D "_DEBUG" /D "LIBSSH2_WIN32" /D "LIBSSH2_OPENSSL" /D "_MBCS" /D 
"_LIB" /D "LIBSSH2DEBUG" /YX /FD /GZ /c
 # SUBTRACT CPP /WX /YX
 # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
@@ -99,8 +100,8 @@ LINK32=link.exe
 # PROP Output_Dir "Release_lib"
 # PROP Intermediate_Dir "Release_lib"
 # PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "LIBSSH2_WIN32" 
/D "_MBCS" /D "_LIB" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\win32" /I "..\include" /D "WIN32" /D 
"NDEBUG" /D "LIBSSH2_WIN32" /D "_MBCS" /D "_LIB" /YX /FD /c
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "LIBSSH2_WIN32" 
/D "LIBSSH2_OPENSSL" /D "_MBCS" /D "_LIB" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\win32" /I "..\include" /D "WIN32" /D 
"NDEBUG" /D "LIBSSH2_WIN32" /D "LIBSSH2_OPENSSL" /D "_MBCS" /D "_LIB" /YX /FD /c
 # ADD BASE RSC /l 0x409 /d "NDEBUG"
 # ADD RSC /l 0x409 /d "NDEBUG"
 BSC32=bscmake.exe
@@ -123,8 +124,8 @@ LIB32=link.exe -lib
 # PROP Output_Dir "Debug_lib"
 # PROP Intermediate_Dir "Debug_lib"
 # PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D 
"LIBSSH2_WIN32" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD CPP /nologo /MD /W3 /Gm /GX /ZI /Od /I "..\win32" /I "..\include" /D 
"WIN32" /D "_DEBUG" /D "LIBSSH2_WIN32" /D "_MBCS" /D "_LIB" /D "LIBSSH2DEBUG" 
/YX /FD /GZ /c
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D 
"LIBSSH2_WIN32" /D "LIBSSH2_OPENSSL" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
+# ADD CPP /nologo /MD /W3 /Gm /GX /ZI /Od /I "..\win32" /I "..\include" /D 
"WIN32" /D "_DEBUG" /D "LIBSSH2_WIN32" /D "LIBSSH2_OPENSSL" /D "_MBCS" /D 
"_LIB" /D "LIBSSH2DEBUG" /YX /FD /GZ /c
 # ADD BASE RSC /l 0x409 /d "_DEBUG"
 # ADD RSC /l 0x409 /d "_DEBUG"
 BSC32=bscmake.exe
-- 
1.8.1.rc0.2.gfb4c622.dirty

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

Reply via email to