From: nishi Date: Sun, 7 Apr 2024 13:51:29 +0000 (+0000) Subject: better user-agent X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=06e0b007cec0a6fa2f63e86ef320d328fd595092;p=libw3.git better user-agent git-svn-id: file:///raid/svn-main/nishi-libw3/trunk@287 d27a3e52-49c5-7645-884c-6793ebffc270 --- 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}}, {{/**