We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4a7a81e commit 17abe22Copy full SHA for 17abe22
httplib.h
@@ -218,7 +218,7 @@ using socket_t = int;
218
219
#ifdef CPPHTTPLIB_OPENSSL_SUPPORT
220
// these are defined in wincrypt.h and it breaks compilation if BoringSSL is used
221
-#if defined(_WIN32)
+#ifdef _WIN32
222
#undef X509_NAME
223
#undef X509_CERT_PAIR
224
#undef X509_EXTENSIONS
@@ -1950,8 +1950,12 @@ inline std::string base64_encode(const std::string &in) {
1950
}
1951
1952
inline bool is_file(const std::string &path) {
1953
1954
+ return (_access_s(path.c_str(), 0 ) == 0);
1955
+#else
1956
struct stat st;
1957
return stat(path.c_str(), &st) >= 0 && S_ISREG(st.st_mode);
1958
+#endif
1959
1960
1961
inline bool is_dir(const std::string &path) {
0 commit comments