Re: [Openvpn-devel] [PATCH 1/3] add MinGW WinHTTP compatibility layer

2011-08-17 Thread Heiko Hund
On Wednesday 17 August 2011 16:28:42 Gisle Vanem wrote: > "Alon Bar-Lev" wrote: > > These macros are s ugly! > > I tend to agree; had to read the code closely. I tend to disagree. =) Using macros here makes the code more readable. And managable. Imaging if there'll be another 20 funct

Re: [Openvpn-devel] [PATCH 1/3] add MinGW WinHTTP compatibility layer

2011-08-17 Thread Gisle Vanem
"Alon Bar-Lev" wrote: These macros are s ugly! I tend to agree; had to read the code closely. But this hack was cool: union { FUNC ## _fn *type; FARPROC *ptr; } u = { .type = &(LIB ## _ ## FUNC) }; ... *(u.ptr) = GetProcAddress (lib, (#FUNC)); Where did you get that Heiko?

Re: [Openvpn-devel] [PATCH 1/3] add MinGW WinHTTP compatibility layer

2011-08-17 Thread Alon Bar-Lev
These macros are s ugly! why not do this simply like other examples in OpenVPN code, if I recall correctly in CryptoAPI module. On Wed, Aug 17, 2011 at 4:42 PM, Heiko Hund wrote: > MinGW is missing support for winhttp.dll which will be used for automatic > proxy server detection in Window