1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-14 09:37:34 -05:00

Stop using GLOBAL Windows API function pointers.

The declarations in header files now use ordinary 'extern'. That means
I have to arrange to put definitions matching those declarations in
the appropriate modules; so I've made a macro DEFINE_WINDOWS_FUNCTION
which performs a definition matching a prior DECLARE_WINDOWS_FUNCTION
(and reusing the typedef made by the latter).

This applies not only to the batch of functions that were marked
GLOBAL in winstuff.h, but also the auxiliary sets marked
WINCAPI_GLOBAL and WINSECUR_GLOBAL in wincapi.h and winsecur.h
respectively.
This commit is contained in:
Simon Tatham
2020-02-02 10:00:43 +00:00
parent 3bbbdaad60
commit 25f7f8c025
6 changed files with 30 additions and 30 deletions

View File

@ -9,9 +9,10 @@
#include "putty.h"
#include "ssh.h"
#define WINCAPI_GLOBAL
#include "wincapi.h"
DEF_WINDOWS_FUNCTION(CryptProtectMemory);
bool got_crypt(void)
{
static bool attempted = false;