Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/sys add cast-through-void * macros



details:   https://anonhg.NetBSD.org/src/rev/f9fecfc5301c
branches:  trunk
changeset: 805950:f9fecfc5301c
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Jan 24 18:07:37 2015 +0000

description:
add cast-through-void * macros

diffstat:

 sys/sys/cdefs.h |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (19 lines):

diff -r 30647b47a080 -r f9fecfc5301c sys/sys/cdefs.h
--- a/sys/sys/cdefs.h   Sat Jan 24 17:17:01 2015 +0000
+++ b/sys/sys/cdefs.h   Sat Jan 24 18:07:37 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cdefs.h,v 1.122 2014/09/05 05:44:50 matt Exp $ */
+/*     $NetBSD: cdefs.h,v 1.123 2015/01/24 18:07:37 christos Exp $     */
 
 /* * Copyright (c) 1991, 1993
  *     The Regents of the University of California.  All rights reserved.
@@ -580,6 +580,9 @@
 #define __CAST(__dt, __st)     ((__dt)(__st))
 #endif
 
+#define __CASTV(__dt, __st)    __CAST(__dt, __CAST(void *, __st))
+#define __CASTCV(__dt, __st)   __CAST(__dt, __CAST(const void *, __st))
+
 #define __USE(a) ((void)(a))
 
 #define __type_mask(t) (/*LINTED*/sizeof(t) < sizeof(intmax_t) ? \



Home | Main Index | Thread Index | Old Index