summaryrefslogtreecommitdiff
path: root/lib/system_win32.c
Commit message (Collapse)AuthorAgeFilesLines
* copyright: update all copyright lines and remove year rangesDaniel Stenberg2023-01-031-1/+1
| | | | | | | | | | | | - they are mostly pointless in all major jurisdictions - many big corporations and projects already don't use them - saves us from pointless churn - git keeps history for us - the year range is kept in COPYING checksrc is updated to allow non-year using copyright statements Closes #10205
* copyright: make repository REUSE compliantmax.mehl2022-06-131-1/+3
| | | | | | | | | | | Add licensing and copyright information for all files in this repository. This either happens in the file itself as a comment header or in the file `.reuse/dep5`. This commit also adds a Github workflow to check pull requests and adapts copyright.pl to the changes. Closes #8869
* version_win32: Check build number and platform idWyatt O'Day2021-12-021-1/+1
| | | | | | | | | | | | | Prior to this change the build number was not checked during version comparison, and the platform id was supposed to be checked but wasn't. Checking the build number is required for enabling "evergreen" Windows 10/11 features (like TLS 1.3). Ref: https://github.com/curl/curl/pull/7784 Closes https://github.com/curl/curl/pull/7824 Closes https://github.com/curl/curl/pull/7867
* version_win32: use actual version instead of manifested versionJay Satiro2021-10-071-0/+2
| | | | | | | | | | | | | | | | | | - Use RtlVerifyVersionInfo instead of VerifyVersionInfo, when possible. Later versions of Windows have normal version functions that compare and return versions based on the way the application is manifested, instead of the actual version of Windows the application is running on. We prefer the actual version of Windows so we'll now call the Rtl variant of version functions (RtlVerifyVersionInfo) which does a proper comparison of the actual version. Reported-by: Wyatt O'Day Ref: https://github.com/curl/curl/pull/7727 Fixes https://github.com/curl/curl/issues/7742 Closes https://github.com/curl/curl/pull/7810
* tidy-up: make conditional checks more consistentDaniel Stenberg2021-04-221-2/+2
| | | | | | ... remove '== NULL' and '!= 0' Closes #6912
* misc: assorted typo fixesXhmikosR2020-12-261-1/+1
| | | | Closes #6375
* curl.se: new homeDaniel Stenberg2020-11-041-1/+1
| | | | Closes #6172
* win32: drop support for WinSock version 1, require version 2Marc Hoersken2020-09-021-8/+3
| | | | | | | | | | | | | | | IPv6, telnet and now also the multi API require WinSock version 2 which is available starting with Windows 95. Therefore we think it is time to drop support for version 1. Reviewed-by: Marcel Raad Reviewed-by: Jay Satiro Reviewed-by: Daniel Stenberg Reviewed-by: Viktor Szakats Follow up to #5634 Closes #5854
* win32: Add Curl_verify_windows_version() to curlxCameron Cawley2020-08-021-194/+3
| | | | Closes https://github.com/curl/curl/pull/5754
* nit: Copyright year out of dateDaniel Stenberg2020-02-191-1/+1
| | | | Follow-up to 1fc0617dcc
* tool_util: Improve Windows version of tvnow()Jay Satiro2020-02-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | - Change tool_util.c tvnow() for Windows to match more closely to timeval.c Curl_now(). - Create a win32 init function for the tool, since some initialization is required for the tvnow() changes. Prior to this change the monotonic time function used by curl in Windows was determined at build-time and not runtime. That was a problem because when curl was built targeted for compatibility with old versions of Windows (eg _WIN32_WINNT < 0x0600) it would use GetTickCount which wraps every 49.7 days that Windows has been running. This change makes curl behave similar to libcurl's tvnow function, which determines at runtime whether the OS is Vista+ and if so calls QueryPerformanceCounter instead. (Note QueryPerformanceCounter is used because it has higher resolution than the more obvious candidate GetTickCount64). The changes to tvnow are basically a copy and paste but the types in some cases are different. Ref: https://github.com/curl/curl/issues/3309 Closes https://github.com/curl/curl/pull/4847
* win32: make DLL loading a no-op for UWPDaniel Stenberg2019-06-251-1/+6
| | | | | | Reported-by: Michael Brehm Fixes #4060 Closes #4072
* url: Load if_nametoindex() dynamically from iphlpapi.dll on WindowsSteve Holme2019-05-291-12/+24
| | | | | | | | | | This fixes the static dependency on iphlpapi.lib and allows curl to build for targets prior to Windows Vista. This partially reverts 170bd047. Fixes #3960 Closes #3958
* system_win32: move win32_init here from easy.cJay Satiro2019-03-021-0/+82
| | | | | | | | | | .. since system_win32 is a more appropriate location for the functions and to extern the globals. Ref: https://github.com/curl/curl/commit/ca597ad#r32446578 Reported-by: Gisle Vanem Closes https://github.com/curl/curl/pull/3625
* Silence GCC 8 cast-function-type warningsMarcel Raad2018-08-111-1/+4
| | | | | | | | | | On Windows, casting between unrelated function types is fine and sometimes even necessary, so just use an intermediate cast to (void (*) (void)) to silence the warning as described in [0]. [0] https://gcc.gnu.org/onlinedocs/gcc-8.1.0/gcc/Warning-Options.html Closes https://github.com/curl/curl/pull/2860
* system_win32: fix version checkingdjelinski2018-07-251-4/+6
| | | | | | | In the current version, VERSION_GREATER_THAN_EQUAL 6.3 will return false when run on windows 10.0. This patch addresses that error. Closes https://github.com/curl/curl/pull/2792
* spelling fixesklemens2017-03-261-2/+2
| | | | Closes #1356
* win: fix Universal Windows Platform buildMarcel Raad2016-10-161-1/+33
| | | | | | | | | | | | | | | This fixes a merge error in commit 7f3df80 caused by commit 332e8d6. Additionally, this changes Curl_verify_windows_version for Windows App builds to assume to always be running on the target Windows version. There seems to be no way to determine the Windows version from a UWP app. Neither GetVersion(Ex), nor VerifyVersionInfo, nor the Version Helper functions are supported. Bug: https://github.com/curl/curl/pull/820#issuecomment-250889878 Reported-by: Paul Joyce Closes https://github.com/curl/curl/pull/1048
* Curl_verify_windows_version: minor edit to avoid compiler warningsDaniel Stenberg2016-08-271-1/+4
| | | | | | ... instead of if() before the switch(), add a default to the switch so that the compilers don't warn on "warning: enumeration value 'PLATFORM_DONT_CARE' not handled in switch" anymore.
* win32: fix a potential memory leak in Curl_load_libraryMartin Vejnár2016-08-011-1/+1
| | | | | | | | If a call to GetSystemDirectory fails, the `path` pointer that was previously allocated would be leaked. This makes sure that `path` is always freed. Closes #938
* checksrc: Add LoadLibrary to the banned functions listJay Satiro2016-06-051-1/+4
| | | | | LoadLibrary was supplanted by Curl_load_library for security reasons in 6df916d.
* win32: Added verify windows version functionalitySteve Holme2016-06-041-5/+130
|
* win32: Introduced centralised verify windows version functionSteve Holme2016-06-041-3/+39
|
* loadlibrary: Only load system DLLs from the system directorySteve Holme2016-05-301-0/+130
Inspiration provided by: Daniel Stenberg and Ray Satiro Bug: https://curl.haxx.se/docs/adv_20160530.html Ref: Windows DLL hijacking with curl, CVE-2016-4802