cmake/Utilities/cmcurl/lib/system_win32.h

78 lines
2.7 KiB
C
Raw Normal View History

2016-09-11 17:22:32 +02:00
#ifndef HEADER_CURL_SYSTEM_WIN32_H
#define HEADER_CURL_SYSTEM_WIN32_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
2023-07-02 19:51:09 +02:00
* Copyright (C) Steve Holme, <steve_holme@hotmail.com>.
2016-09-11 17:22:32 +02:00
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
2021-09-14 00:13:48 +02:00
* are also available at https://curl.se/docs/copyright.html.
2016-09-11 17:22:32 +02:00
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the COPYING file.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
2022-11-16 20:14:03 +01:00
* SPDX-License-Identifier: curl
*
2016-09-11 17:22:32 +02:00
***************************************************************************/
#include "curl_setup.h"
2024-04-14 22:45:38 +02:00
#ifdef _WIN32
2016-09-11 17:22:32 +02:00
2019-11-11 23:01:05 +01:00
extern LARGE_INTEGER Curl_freq;
extern bool Curl_isVistaOrGreater;
2024-04-14 22:45:38 +02:00
extern bool Curl_isWindows8OrGreater;
2019-11-11 23:01:05 +01:00
CURLcode Curl_win32_init(long flags);
void Curl_win32_cleanup(long init_flags);
2020-08-30 11:54:41 +02:00
/* We use our own typedef here since some headers might lack this */
typedef unsigned int(WINAPI *IF_NAMETOINDEX_FN)(const char *);
/* This is used instead of if_nametoindex if available on Windows */
extern IF_NAMETOINDEX_FN Curl_if_nametoindex;
2024-04-14 22:45:38 +02:00
/* Identical copy of addrinfoexW/ADDRINFOEXW */
typedef struct addrinfoexW_
{
int ai_flags;
int ai_family;
int ai_socktype;
int ai_protocol;
size_t ai_addrlen;
PWSTR ai_canonname;
struct sockaddr *ai_addr;
void *ai_blob;
size_t ai_bloblen;
LPGUID ai_provider;
struct addrinfoexW_ *ai_next;
} ADDRINFOEXW_;
typedef void (CALLBACK *LOOKUP_COMPLETION_FN)(DWORD, DWORD, LPWSAOVERLAPPED);
typedef void (WSAAPI *FREEADDRINFOEXW_FN)(ADDRINFOEXW_*);
typedef int (WSAAPI *GETADDRINFOEXCANCEL_FN)(LPHANDLE);
typedef int (WSAAPI *GETADDRINFOEXW_FN)(PCWSTR, PCWSTR, DWORD, LPGUID,
const ADDRINFOEXW_*, ADDRINFOEXW_**, struct timeval*, LPOVERLAPPED,
LOOKUP_COMPLETION_FN, LPHANDLE);
extern FREEADDRINFOEXW_FN Curl_FreeAddrInfoExW;
extern GETADDRINFOEXCANCEL_FN Curl_GetAddrInfoExCancel;
extern GETADDRINFOEXW_FN Curl_GetAddrInfoExW;
2016-09-11 17:22:32 +02:00
/* This is used to dynamically load DLLs */
HMODULE Curl_load_library(LPCTSTR filename);
2024-04-14 22:45:38 +02:00
#else /* _WIN32 */
2023-12-07 09:12:54 +01:00
#define Curl_win32_init(x) CURLE_OK
2024-04-14 22:45:38 +02:00
#endif /* !_WIN32 */
2016-09-11 17:22:32 +02:00
#endif /* HEADER_CURL_SYSTEM_WIN32_H */