From 8ba52e2530f2e31abb68efaade26d3aba587f0e4 Mon Sep 17 00:00:00 2001 From: Alug Date: Sun, 3 Aug 2025 14:40:01 +0100 Subject: [PATCH] check if __THROW is defined Windows does not have it at all, so we gotta check this otherwise compile may fail --- src/md5.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/md5.h b/src/md5.h index be730a60a..f09d865ab 100644 --- a/src/md5.h +++ b/src/md5.h @@ -35,15 +35,21 @@ typedef uint32_t md5_uint32; typedef uintptr_t md5_uintptr; +#if defined (__THROW) +#define THROWFUNC __THROW +#else +#define THROWFUNC +#endif + /* Compute MD5 message digest for bytes read from STREAM. The resulting message digest number will be written into the 16 bytes beginning at RESBLOCK. */ -int md5_stream(FILE *stream, void *resblock) __THROW; +int md5_stream(FILE *stream, void *resblock) THROWFUNC; /* Compute MD5 message digest for LEN bytes beginning at BUFFER. The result is always in little endian byte order, so that a byte-wise output yields to the wanted ASCII representation of the message digest. */ -extern void *md5_buffer(const char *buffer, size_t len, void *resblock) __THROW; +extern void *md5_buffer(const char *buffer, size_t len, void *resblock) THROWFUNC; #endif /* md5.h */