mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-18 19:41:01 -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:
@ -224,12 +224,11 @@ static bool sk_startup(int hi, int lo)
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Actually define this function pointer, which won't have been
|
||||
* defined alongside all the others by PUTTY_DO_GLOBALS because of the
|
||||
* annoying winelib header-ordering issue. (See comment in winstuff.h.) */
|
||||
DECL_WINDOWS_FUNCTION(/* empty */, int, select,
|
||||
(int, fd_set FAR *, fd_set FAR *,
|
||||
fd_set FAR *, const struct timeval FAR *));
|
||||
DEF_WINDOWS_FUNCTION(WSAAsyncSelect);
|
||||
DEF_WINDOWS_FUNCTION(WSAEventSelect);
|
||||
DEF_WINDOWS_FUNCTION(WSAGetLastError);
|
||||
DEF_WINDOWS_FUNCTION(WSAEnumNetworkEvents);
|
||||
DEF_WINDOWS_FUNCTION(select);
|
||||
|
||||
void sk_init(void)
|
||||
{
|
||||
|
Reference in New Issue
Block a user