From ad8dc9e41d12be3b74f7fe0a05605880d7dc6cdf Mon Sep 17 00:00:00 2001 From: nishi Date: Sun, 7 Apr 2024 13:56:50 +0000 Subject: [PATCH] better user-agent git-svn-id: file:///raid/svn-main/nishi-libw3/trunk@288 d27a3e52-49c5-7645-884c-6793ebffc270 --- Library/Util.c | 11 ++++++----- W3Version.h.m4 | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Library/Util.c b/Library/Util.c index cfb0bea..0d9d452 100644 --- a/Library/Util.c +++ b/Library/Util.c @@ -41,6 +41,7 @@ #ifdef __MINGW32__ #include +#include #include #else #include @@ -150,12 +151,12 @@ bool __W3_Have_Header(struct W3* w3, const char* name) { char* __W3_Get_Platform(void) { #ifdef __MINGW32__ - OSVERSIONINFOEX info; - ZeroMemory(&info, sizeof(OSVERSIONINFOEX)); - info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); - GetVersionEx(&info); + RTL_OSVERSIONINFOEXW info; + ZeroMemory(&info, sizeof(RTL_OSVERSIONINFOEXW)); + info.dwOSVersionInfoSize = sizeof(RTL_OSVERSIONINFOEXW); + RtlGetVersionEx(&info); char* result = malloc(33); - sprintf(result, "Windows %u.%u.%u", info.dwMajorVersion, info.dwMinorVersion, info.dwBuildNumber); + sprintf(result, "Windows %lu.%lu.%lu", info.dwMajorVersion, info.dwMinorVersion, info.dwBuildNumber); return result; #else struct utsname un; diff --git a/W3Version.h.m4 b/W3Version.h.m4 index 6745075..f2a3066 100644 --- a/W3Version.h.m4 +++ b/W3Version.h.m4 @@ -60,7 +60,7 @@ const char* W3_Get_Version(void); * @note W3_Get_Version を使用することを検討してください。 * */ -#define LIBW3_VERSION "2.22B" \ +#define LIBW3_VERSION "2.22C" \ SUFFIX ifdef({{HTTP_SUPPORT}}, {{/** -- 2.43.0