Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/cdefs.h
Show First 20 Lines • Show All 235 Lines • ▼ Show 20 Lines | |||||
#else | #else | ||||
#define __alloc_align(x) | #define __alloc_align(x) | ||||
#endif | #endif | ||||
#if !__GNUC_PREREQ__(2, 95) | #if !__GNUC_PREREQ__(2, 95) | ||||
#define __alignof(x) __offsetof(struct { char __a; x __b; }, __b) | #define __alignof(x) __offsetof(struct { char __a; x __b; }, __b) | ||||
#endif | #endif | ||||
#ifndef COMPACT | |||||
kib: This header is also used for userspace, and COMPACT is clearly is in user namespace.
Perhaps we… | |||||
mjgAuthorUnsubmitted Done Inline Actionsso that would be __COMPACT put in the config? Looks like some form of prefixing would be warranted for cases like this. I don't think the COMPACT option (with whatever name) is worth introducing at this time if it goes beyond the few lines (+ fixups) I posted here. mjg: so that would be __COMPACT put in the config? Looks like some form of prefixing would be… | |||||
kibUnsubmitted Not Done Inline ActionsI think it should go somewhere in systm.h or similar. Then it could be COMPACT without prefix. I do think that COMPAT is worth it, even if such small for now. It is first step, and I expect that it will be taken from this quite fast. It is long overdue. kib: I think it should go somewhere in systm.h or similar. Then it could be COMPACT without prefix. | |||||
#define __aligned_if_not_compact(x) __aligned(x) | |||||
#else | |||||
#define __aligned_if_not_compact(x) | |||||
#endif | |||||
/* | /* | ||||
* Keywords added in C11. | * Keywords added in C11. | ||||
*/ | */ | ||||
#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112L | #if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112L | ||||
#if !__has_extension(c_alignas) | #if !__has_extension(c_alignas) | ||||
#if (defined(__cplusplus) && __cplusplus >= 201103L) || \ | #if (defined(__cplusplus) && __cplusplus >= 201103L) || \ | ||||
▲ Show 20 Lines • Show All 636 Lines • Show Last 20 Lines |
This header is also used for userspace, and COMPACT is clearly is in user namespace.
Perhaps we need to use protected name for the option, like __COMPACT.