1 /* SPDX-License-Identifier: MIT */
2 /* SPDX-FileCopyrightText: 2016-2022 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> */
14 #ifndef rseq_sizeof_field
15 #define rseq_sizeof_field(TYPE, MEMBER) sizeof((((TYPE *)0)->MEMBER))
18 #ifndef rseq_offsetofend
19 #define rseq_offsetofend(TYPE, MEMBER) \
20 (offsetof(TYPE, MEMBER) + rseq_sizeof_field(TYPE, MEMBER))
23 #define __rseq_str_1(x) #x
24 #define __rseq_str(x) __rseq_str_1(x)
26 #define rseq_log(fmt, ...) \
27 fprintf(stderr, fmt "(in %s() at " __FILE__ ":" __rseq_str(__LINE__)"\n", \
28 ## __VA_ARGS__, __func__)
30 #define rseq_bug(fmt, ...) \
32 rseq_log(fmt, ## __VA_ARGS__); \
36 #endif /* _RSEQ_UTILS_H */
This page took 0.031117 seconds and 5 git commands to generate.