Source-Changes-HG archive

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

[src/trunk]: src/tools/compat Provide a definition for __UNCONST since there'...



details:   https://anonhg.NetBSD.org/src/rev/eb5e464b496f
branches:  trunk
changeset: 571933:eb5e464b496f
user:      jmc <jmc%NetBSD.org@localhost>
date:      Sat Dec 11 09:34:08 2004 +0000

description:
Provide a definition for __UNCONST since there's no guarentee our sys/cdefs.h
gets pulled in

diffstat:

 tools/compat/compat_defs.h |  8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diffs (22 lines):

diff -r 025156ff047b -r eb5e464b496f tools/compat/compat_defs.h
--- a/tools/compat/compat_defs.h        Sat Dec 11 09:31:42 2004 +0000
+++ b/tools/compat/compat_defs.h        Sat Dec 11 09:34:08 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: compat_defs.h,v 1.44 2004/11/28 06:57:14 jmc Exp $     */
+/*     $NetBSD: compat_defs.h,v 1.45 2004/12/11 09:34:08 jmc Exp $     */
 
 #ifndef        __NETBSD_COMPAT_DEFS_H__
 #define        __NETBSD_COMPAT_DEFS_H__
@@ -66,6 +66,12 @@
 #error _NETBSD_SOURCE is *not* to be defined.
 #endif
 
+/* Need this since we can't depend on NetBSD's version to be around */
+#ifdef __UNCONST
+#undef __UNCONST
+#endif
+#define __UNCONST(a)   ((void *)(unsigned long)(const void *)(a))
+
 /* We don't include <pwd.h> here, so that "compat_pwd.h" works. */
 struct passwd;
 



Home | Main Index | Thread Index | Old Index