mirror of
https://github.com/djhackersdev/saltytools.git
synced 2026-03-21 17:54:11 -05:00
15 lines
335 B
C
15 lines
335 B
C
#pragma once
|
|
|
|
#include <stddef.h>
|
|
|
|
#ifdef __GNUC__
|
|
#define gcc_attribute(x) __attribute__(x)
|
|
#else
|
|
#define gcc_attribute(x)
|
|
#endif
|
|
|
|
#define containerof(member, outer_type, outer_member) \
|
|
((outer_type *)(((char *)member) - offsetof(outer_type, outer_member)))
|
|
|
|
#define lengthof(x) (sizeof(x) / sizeof(x[0]))
|