This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 12/14] FreeBSD update of __DECONST, etc.


newlib/ChangeLog
2013-04-17  Sebastian Huber <sebastian.huber@embedded-brains.de>

	* libc/include/sys/cdefs.h (__DEQUALIFY): Move define.
	(__DECONST): New define.
	(__DEVOLATILE): Likewise.
---
 newlib/libc/include/sys/cdefs.h |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/newlib/libc/include/sys/cdefs.h b/newlib/libc/include/sys/cdefs.h
index 0ef9cc7..d943161 100644
--- a/newlib/libc/include/sys/cdefs.h
+++ b/newlib/libc/include/sys/cdefs.h
@@ -457,10 +457,6 @@
 #define	__printf0like(fmtarg, firstvararg)
 #endif
 
-#ifndef	__DEQUALIFY
-#define	__DEQUALIFY(type, var)	((type)(uintptr_t)(const volatile void *)(var))
-#endif
-
 #if defined(__GNUC__) || defined(__INTEL_COMPILER)
 #ifndef __INTEL_COMPILER
 #define	__strong_reference(sym,aliassym)	\
@@ -531,4 +527,16 @@
 #define	__COPYRIGHT(s)	struct __hack
 #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 /* !_SYS_CDEFS_H_ */
-- 
1.7.7


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]