From 06e0b007cec0a6fa2f63e86ef320d328fd595092 Mon Sep 17 00:00:00 2001 From: nishi Date: Sun, 7 Apr 2024 13:51:29 +0000 Subject: [PATCH] better user-agent git-svn-id: file:///raid/svn-main/nishi-libw3/trunk@287 d27a3e52-49c5-7645-884c-6793ebffc270 --- Library/Util.c | 8 +++++++- W3Version.h.m4 | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Library/Util.c b/Library/Util.c index 3d5786a..cfb0bea 100644 --- a/Library/Util.c +++ b/Library/Util.c @@ -150,7 +150,13 @@ bool __W3_Have_Header(struct W3* w3, const char* name) { char* __W3_Get_Platform(void) { #ifdef __MINGW32__ - return __W3_Strdup("Windows"); + OSVERSIONINFOEX info; + ZeroMemory(&info, sizeof(OSVERSIONINFOEX)); + info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); + GetVersionEx(&info); + char* result = malloc(33); + sprintf(result, "Windows %u.%u.%u", info.dwMajorVersion, info.dwMinorVersion, info.dwBuildNumber); + return result; #else struct utsname un; uname(&un); diff --git a/W3Version.h.m4 b/W3Version.h.m4 index a6cee93..6745075 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.22A" \ +#define LIBW3_VERSION "2.22B" \ SUFFIX ifdef({{HTTP_SUPPORT}}, {{/** -- 2.43.0