1
0
mirror of synced 2025-07-17 17:40:57 +03:00
* Fix #2148

* Removed 32bit environment

* buld-error-check-on-32bit

* Use 32bit depedency from Windows
This commit is contained in:
yhirose
2025-07-07 21:30:08 -04:00
committed by GitHub
parent af7a69bcf6
commit 52163ed982
2 changed files with 38 additions and 9 deletions

View File

@ -10,6 +10,21 @@
#define CPPHTTPLIB_VERSION "0.22.0"
/*
* Platform compatibility check
*/
#if defined(_WIN32) && !defined(_WIN64)
#error \
"cpp-httplib doesn't support 32-bit Windows. Please use a 64-bit compiler."
#elif defined(__SIZEOF_POINTER__) && __SIZEOF_POINTER__ < 8
#error \
"cpp-httplib doesn't support 32-bit platforms. Please use a 64-bit compiler."
#elif defined(__SIZEOF_SIZE_T__) && __SIZEOF_SIZE_T__ < 8
#error \
"cpp-httplib doesn't support platforms where size_t is less than 64 bits."
#endif
/*
* Configuration
*/
@ -177,11 +192,7 @@
#pragma comment(lib, "ws2_32.lib")
#ifdef _WIN64
using ssize_t = __int64;
#else
using ssize_t = long;
#endif
#endif // _MSC_VER
#ifndef S_ISREG