mirror of
https://gitlab.freedesktop.org/libbsd/libbsd.git
synced 2025-01-09 19:27:42 +01:00
Add new __packed, __aligned and __nonnull attributes
This commit is contained in:
parent
87dd203c26
commit
e1f2a6f869
@ -65,6 +65,22 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef __packed
|
||||
# if LIBBSD_GCC_VERSION >= 0x0207
|
||||
# define __packed __attribute__((__packed__))
|
||||
# else
|
||||
# define __packed
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef __aligned
|
||||
# if LIBBSD_GCC_VERSION >= 0x0207
|
||||
# define __aligned(x) __attribute__((__aligned__(x)))
|
||||
# else
|
||||
# define __aligned(x)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Linux headers define a struct with a member names __unused.
|
||||
* Debian bugs: #522773 (linux), #522774 (libc).
|
||||
* Disable for now. */
|
||||
@ -86,6 +102,14 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef __nonnull
|
||||
# if LIBBSD_GCC_VERSION >= 0x0302
|
||||
# define __nonnull(x) __attribute__((__nonnull__(x)))
|
||||
# else
|
||||
# define __nonnull(x)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef __bounded__
|
||||
# define __bounded__(x, y, z)
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user