restrict crypt32 hack to mingw.org
Roumen Petrov <[email protected]> Sat, 10 Jun 2017 19:07:19 +0300
| Newsgroups | gmane.text.xml.xmlsec |
|---|---|
| Message-ID | <[email protected]> |
Hi, Using custom def-file and header is work-around for mingw.org. It is not required for mingw-w64.org . Attached patch "0003-restrict-crypt32-hack-to-mingw.org.patch" limits scope of "hack". Regards, Roumen _______________________________________________ xmlsec mailing list [email protected] http://www.aleksey.com/mailman/listinfo/xmlsec
0003-restrict-crypt32-hack-to-mingw.org.patch
(text/x-diff, 1.4 KB)
From 0e9012a982a2d393d9714cc8c3bd41baa6099eea Mon Sep 17 00:00:00 2001 From: Roumen Petrov <[email protected]> Date: Sat, 10 Jun 2017 11:21:42 -0400 Subject: [PATCH 3/3] restrict crypt32 hack to mingw.org --- configure.ac | 7 +++++-- src/mscrypto/private.h | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index e8a8c9a..902573b 100644 --- a/configure.ac +++ b/configure.ac @@ -986,9 +986,12 @@ if test "z$MSCRYPTO_ENABLE" = "zyes" ; then MSCRYPTO_CFLAGS="$MSCRYPTO_CFLAGS -DXMLSEC_CRYPTO_MSCRYPTO=1" case $host in + *-w64-mingw*) + MSCRYPTO_LIBS="-lcrypt32";; *-*-mingw*) - dnl since mingw crypt32 library is limited - dnl we use own def-file + dnl use own def-file and header as mingw.org crypt32 + dnl is limited (library and header) + XMLSEC_DEFINES="$XMLSEC_DEFINES -DXMLSEC_CUSTOM_CRYPT32=1" MSCRYPTO_LIBS='-Wl,$(srcdir)/mingw-crypt32.def';; *) MSCRYPTO_LIBS="-lcrypt32";; diff --git a/src/mscrypto/private.h b/src/mscrypto/private.h index 2ba8776..cd18c0b 100644 --- a/src/mscrypto/private.h +++ b/src/mscrypto/private.h @@ -16,7 +16,7 @@ #error "private.h file contains private xmlsec definitions and should not be used outside xmlsec or xmlsec-$crypto libraries" #endif /* XMLSEC_PRIVATE */ -#if defined(__MINGW32__) +#if defined(__MINGW32__) && defined(XMLSEC_CUSTOM_CRYPT32) # include "xmlsec-mingw.h" #endif -- 1.8.3.1