/* See the end of this file for copyright, license, and warranty information. */ #pragma once #include #ifndef offsetof /** * Calculate the byte offset of a struct member relative to the struct itself. * * @param type: The structure type. * @param member: The member inside the struct to the offset of. * @returns The offset of `member` reelative to `type`, casted to a `size_t`. */ #define offsetof(type, member) __builtin_offsetof(type, member) #endif /* offsetof */ #ifndef typeof /** * @brief Get the type `expr` evaluates to (for generic macros). * * @param expr Expression to get the type of */ #define typeof(expr) __typeof(expr) #endif #ifndef NULL /** The `NULL` pointer. */ #define NULL ((void *)0) #endif /* NULL */ #include /* * This file is part of Ardix. * Copyright (c) 2020, 2021 Felix Kopp . * * Ardix is non-violent software: you may only use, redistribute, * and/or modify it under the terms of the CNPLv6+ as found in * the LICENSE file in the source code root directory or at * . * * Ardix comes with ABSOLUTELY NO WARRANTY, to the extent * permitted by applicable law. See the CNPLv6+ for details. */