Commit bd9ccb8c authored by Björn Svensson's avatar Björn Svensson Committed by Michael Grunder
Browse files

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
parent 5392adc2
...@@ -35,9 +35,11 @@ ...@@ -35,9 +35,11 @@
#define SDS_MAX_PREALLOC (1024*1024) #define SDS_MAX_PREALLOC (1024*1024)
#ifdef _MSC_VER #ifdef _MSC_VER
#define __attribute__(x)
typedef long long ssize_t; typedef long long ssize_t;
#define SSIZE_MAX (LLONG_MAX >> 1) #define SSIZE_MAX (LLONG_MAX >> 1)
#ifndef __clang__
#define __attribute__(x)
#endif
#endif #endif
#include <sys/types.h> #include <sys/types.h>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment