]> git.ipfire.org Git - thirdparty/libbsd.git/commitdiff
Add __DECONST, __DEVOLATILE and __DEQUALIFY macros to sys/cdefs.h
authorGuillem Jover <guillem@hadrons.org>
Fri, 31 Oct 2014 23:20:23 +0000 (00:20 +0100)
committerGuillem Jover <guillem@hadrons.org>
Wed, 23 Sep 2015 05:59:24 +0000 (07:59 +0200)
Import from FreeBSD.

include/bsd/sys/cdefs.h

index c08d68dfc6c69b9fae496d239f8794c406e055ed..c1567be42faf79f0cf62a9c6926b6c5904c1c199 100644 (file)
 # 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