Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP curl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CYBER - Cyber Security
TS 103 523 MSP
TLMSP
TLMSP curl
Commits
6020ce5f
Commit
6020ce5f
authored
8 years ago
by
Steve Holme
Browse files
Options
Downloads
Patches
Plain Diff
win32: Introduced centralised verify windows version function
parent
584d0121
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/system_win32.c
+39
-3
39 additions, 3 deletions
lib/system_win32.c
lib/system_win32.h
+22
-0
22 additions, 0 deletions
lib/system_win32.h
with
61 additions
and
3 deletions
lib/system_win32.c
+
39
−
3
View file @
6020ce5f
...
...
@@ -24,9 +24,6 @@
#if defined(WIN32)
#if defined(USE_WINDOWS_SSPI) || (!defined(CURL_DISABLE_TELNET) && \
defined(USE_WINSOCK))
#include
<curl/curl.h>
#include
"system_win32.h"
...
...
@@ -34,6 +31,10 @@
#include
"curl_memory.h"
#include
"memdebug.h"
#if defined(USE_WINDOWS_SSPI) || (!defined(CURL_DISABLE_TELNET) && \
defined(USE_WINSOCK))
#if !defined(LOAD_WITH_ALTERED_SEARCH_PATH)
#define LOAD_WITH_ALTERED_SEARCH_PATH 0x00000008
#endif
...
...
@@ -56,6 +57,41 @@ typedef HMODULE (APIENTRY *LOADLIBRARYEX_FN)(LPCTSTR, HANDLE, DWORD);
# define LOADLIBARYEX "LoadLibraryExA"
#endif
#endif
/* USE_WINDOWS_SSPI || (!CURL_DISABLE_TELNET && USE_WINSOCK) */
/*
* Curl_verify_windows_version()
*
* This is used to verify if we are running on a specific windows version.
*
* Parameters:
*
* majorVersion [in] - The major version number.
* minorVersion [in] - The minor version number.
* platform [in] - The optional platform identifer.
* condition [in] - The test condition used to specifier whether we are
* checking a version less then, equal to or greater than
* what is specified in the major and minor version
* numbers.
*
* Returns TRUE if matched; otherwise FALSE.
*/
bool
Curl_verify_windows_version
(
const
unsigned
int
majorVersion
,
const
unsigned
int
minorVersion
,
const
PlatformIdentifier
platform
,
const
VersionCondition
condition
)
{
(
void
)
majorVersion
;
(
void
)
minorVersion
;
(
void
)
platform
;
(
void
)
condition
;
return
FALSE
;
}
#if defined(USE_WINDOWS_SSPI) || (!defined(CURL_DISABLE_TELNET) && \
defined(USE_WINSOCK))
/*
* Curl_load_library()
*
...
...
This diff is collapsed.
Click to expand it.
lib/system_win32.h
+
22
−
0
View file @
6020ce5f
...
...
@@ -26,6 +26,28 @@
#if defined(WIN32)
/* Version condition */
typedef
enum
{
VERSION_LESS_THAN
,
VERSION_LESS_THAN_EQUAL
,
VERSION_EQUAL
,
VERSION_GREATER_THAN_EQUAL
,
VERSION_GREATER_THAN
}
VersionCondition
;
/* Platform identifier */
typedef
enum
{
PLATFORM_DONT_CARE
,
PLATFORM_WINDOWS
,
PLATFORM_WINNT
}
PlatformIdentifier
;
/* This is used to verify if we are running on a specific windows version */
bool
Curl_verify_windows_version
(
const
unsigned
int
majorVersion
,
const
unsigned
int
minorVersion
,
const
PlatformIdentifier
platform
,
const
VersionCondition
condition
);
#if defined(USE_WINDOWS_SSPI) || (!defined(CURL_DISABLE_TELNET) && \
defined(USE_WINSOCK))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment