mirror of
https://gitlab.freedesktop.org/libbsd/libbsd.git
synced 2025-04-25 03:02:49 +02:00
Add __DECONST, __DEVOLATILE and __DEQUALIFY macros to sys/cdefs.h
Import from FreeBSD.
This commit is contained in:
parent
a6fe103c1b
commit
0e4e3ab269
@ -138,4 +138,16 @@
|
|||||||
# define __COPYRIGHT(x)
|
# define __COPYRIGHT(x)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __DECONST
|
||||||
|
#define __DECONST(type, var) ((type)(__uintptr_t)(const void *)(var))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __DEVOLATILE
|
||||||
|
#define __DEVOLATILE(type, var) ((type)(__uintptr_t)(volatile void *)(var))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __DEQUALIFY
|
||||||
|
#define __DEQUALIFY(type, var) ((type)(__uintptr_t)(const volatile void *)(var))
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user