We shouldn't have to include the whole defs.h to get them.
* defs.h (MIN, MAX, CLAMP): Move ...
* macros.h: ... here.
extern char *stpcpy(char *dst, const char *src);
#endif
-/* macros */
-#ifndef MAX
-# define MAX(a, b) (((a) > (b)) ? (a) : (b))
-#endif
-#ifndef MIN
-# define MIN(a, b) (((a) < (b)) ? (a) : (b))
-#endif
-#define CLAMP(val, min, max) MIN(MAX(min, val), max)
-
/* Glibc has an efficient macro for sigemptyset
* (it just does one or two assignments of 0 to internal vector of longs).
*/
#define STRINGIFY(...) #__VA_ARGS__
#define STRINGIFY_VAL(...) STRINGIFY(__VA_ARGS__)
+#ifndef MAX
+# define MAX(a, b) (((a) > (b)) ? (a) : (b))
+#endif
+#ifndef MIN
+# define MIN(a, b) (((a) < (b)) ? (a) : (b))
+#endif
+#define CLAMP(val, min, max) MIN(MAX(min, val), max)
+
#ifndef offsetofend
# define offsetofend(type_, member_) \
(offsetof(type_, member_) + sizeof(((type_ *)0)->member_))