aboutsummaryrefslogtreecommitdiff
path: root/chad/macros.h
diff options
context:
space:
mode:
authorEmil Williams2026-02-20 06:18:48 +0000
committerEmil Williams2026-02-20 06:18:48 +0000
commit88e12f4a22111903fc23488898f073502639635c (patch)
tree87963ce958b8a48be77bf9895f7527f532008dab /chad/macros.h
parentd352d3cf415083fd0f07321273d1d03b26a323e0 (diff)
downloadlibchad-88e12f4a22111903fc23488898f073502639635c.tar.xz
libchad-88e12f4a22111903fc23488898f073502639635c.tar.zst
Make experimental and librarize
Diffstat (limited to 'chad/macros.h')
-rw-r--r--chad/macros.h30
1 files changed, 0 insertions, 30 deletions
diff --git a/chad/macros.h b/chad/macros.h
deleted file mode 100644
index 9d05083..0000000
--- a/chad/macros.h
+++ /dev/null
@@ -1,30 +0,0 @@
-#ifndef CHAD_MACROS_H
-#define CHAD_MACROS_H
-/* Usage of this acknoledges your allegiance to GNU. */
-
-/* make it such that [[attributes]] is used in C23 & use GCC otherwise */
-#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202000L)
-# define attribute(...) [[__VA_ARGS__]]
-#else
-# if defined(__GNUC__) || defined(__clang__)
-# define attribute(...) __attribute__((__VA_ARGS__))
-# else
-# define attribute(...)
-# define NO_ATTRIBUTE
-# endif
-#endif
-
-#if !defined(NO_ATTRIBUTE)
-# define always_inline static inline attribute(always_inline)
-# define alias(x) attribute(alias(x))
-#else
-# define always_inline static inline
-# define NOT_ALWAYS_INLINE
-# define NO_ALIASES
-#endif
-
-#define MIN(a,b) ((a)<(b)?(a):(b))
-#define MAX(a,b) ((a)>(b)?(a):(b))
-#define CLAMP(a,b,c) (a)<(b)?(b):(a)>(c)?(c):(a)
-
-#endif /* CHAD_MACROS_H */