History

uapi: stddef.h: Provide UAPI macros for __counted_by_{le, be}

This commit can be considered an addition to commit ca7e324e8ad3 ("compiler_types: add Endianness-dependent __counted_by_{le,be}") [1]. In the commit referenced above the __counted_by_{le,be}() attributes were defined based on platform's endianness with the goal to that the structures contain flexible arrays at the end, and the counter for, can be annotated with these attributes. So, this commit only provide UAPI macros for UAPI structs that will gain annotations for __counted_by_{le, be} attributes. And it is the previous step to be able to use these attributes in UAPI.

Erick Archer committed 2 years ago

Commit 6d305cb1 parent 0e148d31 file · +8 −0Browse files

Showing the changes to include/uapi (1 of 1 file). Show all

Unified · Split

include/uapi/linux/stddef.h+8−0
@@ -55,4 +55,12 @@ · 54 unmodified lines
5555 #define __counted_by(m)
5656 #endif
5757
58+#ifndef __counted_by_le
59+#define __counted_by_le(m)
60+#endif
61+
62+#ifndef __counted_by_be
63+#define __counted_by_be(m)
64+#endif
65+
5866 #endif /* _UAPI_LINUX_STDDEF_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t