Hi,


I shall happily rewrite the code to remove those declarations. However, I'll 
need to check MSDN on a case-by-case basis to replace only API calls that are 
standard from Vista on.



Do you still maintain 2.3 branch for Windows XP? You do know, that replacing 
GetProcAddr() with statically linked Vista+ API calls would break 
compatibility with Windows XP.



Best regards,

Simon



From: Selva [mailto:selva.n...@gmail.com]
Sent: Wednesday, October 11, 2017 3:21 PM
To: Simon Rozman
Cc: openvpn-devel@lists.sourceforge.net
Subject: Re: [Openvpn-devel] [PATCH 05/13] Function prototypes are declared as 
"typedef <return type> (<calling convention> *type_name)(<arguments>)" in 
MSVC.



Hi,



Thanks for these patches.



On Tue, Oct 10, 2017 at 7:11 PM, <si...@rozman.si> wrote:

From: Simon Rozman <si...@rozman.si>

Note: NETIOAPI_API is defined as:
#define NETIOAPI_API NETIO_STATUS NETIOAPI_API_
#define NETIOAPI_API_ WINAPI

I am not sure whether interactive.c will compile using mingw with this patch. 
If not:
1. We can introduce some
   #ifdef _MSC_VER
   #else
   #endif
2. Since NTDDI_VERSION=NTDDI_VISTA, most of the dynamic API loading by 
GetProcAddress() could be simplified to statically linked API calls, avoiding 
function prototype declarations altogether. I suggest we do this anyway to 
clean-up the code in the future.



Yes, those declarations and run-time lookup were slated for removal but 
somehow never happened. Its a good idea to get rid of those -- no point in 
tweaking them to suit MSVC.



IIRC, at least the versions of mingw that I use (gcc 4.9.3 or later) will 
build with those stripped but I can test again if you replace this patch with 
one removing those declarations.



Selva

Attachment: smime.p7s
Description: S/MIME cryptographic signature

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to