diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-12 04:59:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-12 04:59:58 +0000 |
commit | b8d375bcb1f462d5af5d1f480b32d7b0038417f6 (patch) | |
tree | 93d48ade79cc9d5892f17ff41c33753be6bb0879 /include/apr_general.h | |
parent | Adding upstream version 1.7.2. (diff) | |
download | apr-upstream/1.7.5.tar.xz apr-upstream/1.7.5.zip |
Adding upstream version 1.7.5.upstream/1.7.5upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | include/apr_general.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/apr_general.h b/include/apr_general.h index fa073c8..48d8b89 100644 --- a/include/apr_general.h +++ b/include/apr_general.h @@ -103,11 +103,18 @@ typedef int apr_signum_t; * @param field data field within the structure * @return offset */ +#if defined(__has_builtin) +#if __has_builtin(__builtin_offsetof) +#define APR_OFFSETOF(s_type,field) __builtin_offsetof(s_type,field) +#endif +#endif /* __has_builtin */ +#ifndef APR_OFFSETOF #if defined(offsetof) && !defined(__cplusplus) #define APR_OFFSETOF(s_type,field) offsetof(s_type,field) #else #define APR_OFFSETOF(s_type,field) APR_OFFSET(s_type*,field) #endif +#endif /* ndef APR_OFFSETOF */ #ifndef DOXYGEN |