summaryrefslogtreecommitdiff
path: root/src/transports
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2016-01-19 11:13:23 -0600
committerEdward Thomson <ethomson@edwardthomson.com>2016-01-19 11:13:23 -0600
commit5c7f2f01886f95b796770bf1cdf62ee3dd701862 (patch)
tree1d3096e5424bbd04fb9f96013dd184ca131050ca /src/transports
parent0f9d15493d5d8ad4353dd7beed52c9567334f6e5 (diff)
downloadlibgit2-5c7f2f01886f95b796770bf1cdf62ee3dd701862.tar.gz
winhttp: name mangle class / iid on mingw
Standard Windows type systems define CLSID_InternetSecurityManager and IID_IInternetSecurityManager, but MinGW lacks these definitions. As a result, we must hardcode these definitions ourselves. However, we should not use a public struct with those names, lest another library do the same thing and consumers cannot link to both.
Diffstat (limited to 'src/transports')
-rw-r--r--src/transports/winhttp.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/transports/winhttp.c b/src/transports/winhttp.c
index 9e97a279d..3750f6e32 100644
--- a/src/transports/winhttp.c
+++ b/src/transports/winhttp.c
@@ -53,10 +53,15 @@ static const int no_check_cert_flags = SECURITY_FLAG_IGNORE_CERT_CN_INVALID |
SECURITY_FLAG_IGNORE_UNKNOWN_CA;
#if defined(__MINGW32__)
-const CLSID CLSID_InternetSecurityManager = { 0x7B8A2D94, 0x0AC9, 0x11D1,
+static const CLSID CLSID_InternetSecurityManager_mingw =
+ { 0x7B8A2D94, 0x0AC9, 0x11D1,
{ 0x89, 0x6C, 0x00, 0xC0, 0x4F, 0xB6, 0xBF, 0xC4 } };
-const IID IID_IInternetSecurityManager = { 0x79EAC9EE, 0xBAF9, 0x11CE,
+static const IID IID_IInternetSecurityManager_mingw =
+ { 0x79EAC9EE, 0xBAF9, 0x11CE,
{ 0x8C, 0x82, 0x00, 0xAA, 0x00, 0x4B, 0xA9, 0x0B } };
+
+# define CLSID_InternetSecurityManager CLSID_InternetSecurityManager_mingw
+# define IID_IInternetSecurityManager IID_IInternetSecurityManager_mingw
#endif
#define OWNING_SUBTRANSPORT(s) ((winhttp_subtransport *)(s)->parent.subtransport)