Add __DECONST, __DEVOLATILE and __DEQUALIFY macros to sys/cdefs.h

Import from FreeBSD.
This commit is contained in:
Guillem Jover 2014-11-01 00:20:23 +01:00
parent a6fe103c1b
commit 0e4e3ab269

View File

@ -138,4 +138,16 @@
# define __COPYRIGHT(x)
#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