From a754a22680c4381d6623d6340cac832cb17a9ff6 Mon Sep 17 00:00:00 2001 From: baiyfcu Date: Fri, 17 Mar 2023 01:31:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9C=A8WINDOWS=E4=B8=8Acpu?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E6=97=A0=E6=B3=95=E5=88=A4=E6=96=ADBUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Http/HttpRequester.cpp | 52 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/src/Http/HttpRequester.cpp b/src/Http/HttpRequester.cpp index 6833e44f..8fd9807e 100644 --- a/src/Http/HttpRequester.cpp +++ b/src/Http/HttpRequester.cpp @@ -72,6 +72,58 @@ static std::string httpBody() { os = "unknow"; #endif +#if (defined(_WIN32) && !defined(WIN32)) +#define WIN32 _WIN32 +#elif (defined(WIN32) && !defined(_WIN32)) +#define _WIN32 WIN32 +#endif + +#if (defined(_WIN32) && !defined(_MSC_VER) && !defined(_WIN64)) +#ifndef __i386__ +#define __i386__ +#endif +#elif defined(_MSC_VER) +#if (defined(_M_IX86) && !defined(__i386__)) +#define __i386__ +#endif +#endif + +#ifndef __i386__ +#if (defined(__386__) || defined(__I386__) || _M_IX86) +#define __i386__ +#endif +#endif + +#if (defined(__i386__) && !defined(__I386__)) +#define __I386__ +#endif + +#if (defined(__x86_64__) && !defined(__x86_64)) +#define __x86_64 +#endif + +#if (defined(__x86_64) && !defined(__x86_64__)) +#define __x86_64__ +#endif + +#if (defined(_M_AMD64)) && (!defined(__amd64__)) +#define __amd64__ +#endif + +#if (defined(__amd64) && !defined(__amd64__)) +#define __amd64__ +#endif + +#if (defined(__amd64__) && !defined(__amd64)) +#define __amd64 +#endif + +#if (defined(__i386__) || defined(__amd64__)) && (!defined(__x86__)) +#if !(defined(_MSC_VER) && defined(__amd64__)) +#define __x86__ // MSVC doesn't support inline assembly in x64 +#endif +#endif + auto &arch = args["arch"]; #if defined(__x86_64__) || defined(__amd64__) arch = "x86_64";