diff options
author | Björn Svensson <bjorn.a.svensson@est.tech> | 2022-09-14 22:36:10 +0200 |
---|---|---|
committer | Michael Grunder <michael.grunder@gmail.com> | 2022-09-14 16:56:41 -0700 |
commit | bd9ccb8c47e6a021ebd67fca1ba832e4bb0d387f (patch) | |
tree | 9735528ac8961954335021f4c1a3c96764a13a82 | |
parent | 5392adc26515e4ac26ebd612eb88282bdb23a1a4 (diff) |
Use __attribute__ when building with clang on windows
Since clang supports __attribute__ we can avoid disabling
it and use packed sdshdr structs. This also make sure we dont
affect subsequent header files that require __attribute__.
Note:
Clang attempts to be compatible with MSVC and defines _MSC_VER
-rw-r--r-- | sds.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -35,9 +35,11 @@ #define SDS_MAX_PREALLOC (1024*1024) #ifdef _MSC_VER -#define __attribute__(x) typedef long long ssize_t; #define SSIZE_MAX (LLONG_MAX >> 1) +#ifndef __clang__ +#define __attribute__(x) +#endif #endif #include <sys/types.h> |