On 5/20/09, Alon Bar-Lev <[email protected]> wrote:
> On 5/20/09, James Yonan <[email protected]> wrote:
> > 5. In cryptoapi.c, renamed CryptAcquireCertificatePrivateKey to
> > OpenVPNCryptAcquireCertificatePrivateKey to work around
> > a symbol conflict in MinGW-5.1.4.
>
>
> Too much rename.
> Please revert at GetProcAddress and ERR_PACK.
>
You also forgot the following patch.
This avoid clash with MS constant, exists in psdk and mingw64.
Instead of #undef it, use another name.
Alon.
Index: a/ssl.c
===================================================================
--- a/ssl.c (revision 3450)
+++ b/ssl.c (working copy)
@@ -1653,8 +1653,8 @@
return "S_GOT_KEY";
case S_ACTIVE:
return "S_ACTIVE";
- case S_NORMAL:
- return "S_NORMAL";
+ case S_NORMAL_OP:
+ return "S_NORMAL_OP";
case S_ERROR:
return "S_ERROR";
default:
@@ -3564,8 +3564,8 @@
}
else /* assume that ks->state == S_ACTIVE */
{
- dmsg (D_TLS_DEBUG_MED, "STATE S_NORMAL");
- ks->state = S_NORMAL;
+ dmsg (D_TLS_DEBUG_MED, "STATE S_NORMAL_OP");
+ ks->state = S_NORMAL_OP;
ks->must_negotiate = 0;
}
}
Index: a/ssl.h
===================================================================
--- a/ssl.h (revision 3450)
+++ b/ssl.h (working copy)
@@ -230,7 +230,7 @@
#define S_SENT_KEY 4 /* client does S_SENT_KEY -> S_GOT_KEY */
#define S_GOT_KEY 5 /* server does S_GOT_KEY -> S_SENT_KEY */
#define S_ACTIVE 6 /* ready to exchange data channel packets */
-#define S_NORMAL 7 /* normal operations */
+#define S_NORMAL_OP 7 /* normal operations */
/*
* Are we ready to receive data channel packets?
Index: a/config-win32.h.in
===================================================================
--- a/config-win32.h.in (revision 3450)
+++ b/config-win32.h.in (working copy)
@@ -318,7 +318,6 @@
#define S_IRUSR 0
#define S_IWUSR 0
typedef int intptr_t;
-#undef S_NORMAL
/* Visual Studio 2005 supports vararg macros */
#if _MSC_VER >= 1400
#define HAVE_CPP_VARARG_MACRO_ISO 1