mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 10:52:08 +02:00
Windows: pre-basic msvc support
This commit is contained in:
@@ -14,6 +14,10 @@
|
||||
#include "3rdparty/yyjson/yyjson.h"
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define __attribute__(x)
|
||||
#endif
|
||||
|
||||
#include "util/FFstrbuf.h"
|
||||
#include "util/FFlist.h"
|
||||
#include "util/platform/FFPlatform.h"
|
||||
|
||||
@@ -3,8 +3,14 @@
|
||||
#ifndef FASTFETCH_INCLUDED_FFCHECKMACROS
|
||||
#define FASTFETCH_INCLUDED_FFCHECKMACROS
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <sal.h>
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) || defined(__clang__)
|
||||
#define FF_C_NODISCARD __attribute__((warn_unused_result))
|
||||
#elif defined(_MSC_VER)
|
||||
#define FF_C_NODISCARD _Check_return_
|
||||
#else
|
||||
#define FF_C_NODISCARD
|
||||
#endif
|
||||
|
||||
+5
-1
@@ -5,6 +5,10 @@
|
||||
|
||||
static inline void ffUnused(int dummy, ...) { (void) dummy; }
|
||||
#define FF_UNUSED(...) ffUnused(0, __VA_ARGS__);
|
||||
#define FF_MAYBE_UNUSED __attribute__ ((__unused__))
|
||||
#if defined(__GNUC__) || defined(__clang__)
|
||||
#define FF_MAYBE_UNUSED __attribute__ ((__unused__))
|
||||
#else
|
||||
#define FF_MAYBE_UNUSED
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user