naett.c

Tiny cross-platform HTTP / HTTPS client library in C.
git clone git://git.finwo.net/lib/naett.c
Log | Files | Refs | README | LICENSE

commit ad077e6cbd23f4091318ed91da7abdf8e10ef653
parent 36292abf8188974f153401e68d4a85596453312c
Author: Henrik RydgÄrd <hrydgard@gmail.com>
Date:   Mon, 31 Jul 2023 13:33:41 +0200

Try shuffling things around.

Diffstat:
Mnaett.c | 6+++++-
Msrc/naett_internal.h | 6+++++-
2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/naett.c b/naett.c @@ -7,18 +7,22 @@ #ifdef _MSC_VER #define strcasecmp _stricmp - #define min(a,b) (((a)<(b))?(a):(b)) #undef strdup #define strdup _strdup #endif #ifdef _WIN32 #define WIN32_LEAN_AND_MEAN +#define NOMINMAX #include <windows.h> #include <winhttp.h> #define __WINDOWS__ 1 #endif +#ifdef _MSC_VER + #define min(a, b) (((a) < (b)) ? (a) : (b)) +#endif + #if __linux__ && !__ANDROID__ #define __LINUX__ 1 #include <curl/curl.h> diff --git a/src/naett_internal.h b/src/naett_internal.h @@ -3,18 +3,22 @@ #ifdef _MSC_VER #define strcasecmp _stricmp - #define min(a,b) (((a)<(b))?(a):(b)) #undef strdup #define strdup _strdup #endif #ifdef _WIN32 #define WIN32_LEAN_AND_MEAN +#define NOMINMAX #include <windows.h> #include <winhttp.h> #define __WINDOWS__ 1 #endif +#ifdef _MSC_VER + #define min(a,b) (((a)<(b))?(a):(b)) +#endif + #if __linux__ && !__ANDROID__ #define __LINUX__ 1 #include <curl/curl.h>