Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external DTrace: Get DTrace to build on OS X platforms.
details: https://anonhg.NetBSD.org/src/rev/e6592d3b7032
branches: trunk
changeset: 752646:e6592d3b7032
user: darran <darran%NetBSD.org@localhost>
date: Tue Mar 02 21:08:36 2010 +0000
description:
DTrace: Get DTrace to build on OS X platforms.
diffstat:
external/bsd/libelf/dist/_libelf.h | 6 ++++-
external/cddl/osnet/dist/lib/libdtrace/common/dtrace.h | 1 -
external/cddl/osnet/dist/lib/libdtrace/common/mkerrtags.sh | 2 +-
external/cddl/osnet/dist/lib/libdtrace/common/mknames.sh | 4 +-
external/cddl/osnet/sys/sys/sysmacros.h | 11 +++++++--
external/cddl/osnet/sys/sys/types.h | 16 +++++++-------
6 files changed, 24 insertions(+), 16 deletions(-)
diffs (158 lines):
diff -r a658d63935f2 -r e6592d3b7032 external/bsd/libelf/dist/_libelf.h
--- a/external/bsd/libelf/dist/_libelf.h Tue Mar 02 21:07:21 2010 +0000
+++ b/external/bsd/libelf/dist/_libelf.h Tue Mar 02 21:08:36 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: _libelf.h,v 1.4 2009/12/20 23:23:46 thorpej Exp $ */
+/* $NetBSD: _libelf.h,v 1.5 2010/03/02 21:08:36 darran Exp $ */
/*-
* Copyright (c) 2006 Joseph Koshy
@@ -37,6 +37,10 @@
#define NULL ((void *) 0)
#endif
+#ifndef roundup2
+#define roundup2(x, m) (((x) + (m) - 1) & ~((m) - 1))
+#endif
+
/*
* Library-private data structures.
*/
diff -r a658d63935f2 -r e6592d3b7032 external/cddl/osnet/dist/lib/libdtrace/common/dtrace.h
--- a/external/cddl/osnet/dist/lib/libdtrace/common/dtrace.h Tue Mar 02 21:07:21 2010 +0000
+++ b/external/cddl/osnet/dist/lib/libdtrace/common/dtrace.h Tue Mar 02 21:08:36 2010 +0000
@@ -30,7 +30,6 @@
#pragma ident "%Z%%M% %I% %E% SMI"
#include <sys/dtrace.h>
-typedef processorid_t test_processor_id_t;
#include <stdarg.h>
#include <stdio.h>
#include <gelf.h>
diff -r a658d63935f2 -r e6592d3b7032 external/cddl/osnet/dist/lib/libdtrace/common/mkerrtags.sh
--- a/external/cddl/osnet/dist/lib/libdtrace/common/mkerrtags.sh Tue Mar 02 21:07:21 2010 +0000
+++ b/external/cddl/osnet/dist/lib/libdtrace/common/mkerrtags.sh Tue Mar 02 21:08:36 2010 +0000
@@ -26,7 +26,7 @@
#
#ident "%Z%%M% %I% %E% SMI"
-BSDECHO=-e
+BSDECHO=
echo ${BSDECHO} "\
/*\n\
diff -r a658d63935f2 -r e6592d3b7032 external/cddl/osnet/dist/lib/libdtrace/common/mknames.sh
--- a/external/cddl/osnet/dist/lib/libdtrace/common/mknames.sh Tue Mar 02 21:07:21 2010 +0000
+++ b/external/cddl/osnet/dist/lib/libdtrace/common/mknames.sh Tue Mar 02 21:08:36 2010 +0000
@@ -26,7 +26,7 @@
#
#ident "%Z%%M% %I% %E% SMI"
-BSDECHO=-e
+BSDECHO=
echo ${BSDECHO} "\
/*\n\
@@ -44,7 +44,7 @@
{\n\
switch (subr) {"
-nawk '
+awk '
/^#define[ ]*DIF_SUBR_/ && $2 != "DIF_SUBR_MAX" {
printf("\tcase %s: return (\"%s\");\n", $2, tolower(substr($2, 10)));
}'
diff -r a658d63935f2 -r e6592d3b7032 external/cddl/osnet/sys/sys/sysmacros.h
--- a/external/cddl/osnet/sys/sys/sysmacros.h Tue Mar 02 21:07:21 2010 +0000
+++ b/external/cddl/osnet/sys/sys/sysmacros.h Tue Mar 02 21:08:36 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sysmacros.h,v 1.3 2010/02/21 01:46:36 darran Exp $ */
+/* $NetBSD: sysmacros.h,v 1.4 2010/03/02 21:08:36 darran Exp $ */
/*
* CDDL HEADER START
@@ -44,7 +44,9 @@
/*
* Disk blocks (sectors) and bytes.
*/
+#ifndef dtob
#define dtob(DD) ((DD) << DEV_BSHIFT)
+#endif
#define btod(BB) (((BB) + DEV_BSIZE - 1) >> DEV_BSHIFT)
#define btodt(BB) ((BB) >> DEV_BSHIFT)
#define lbtod(BB) (((offset_t)(BB) + DEV_BSIZE - 1) >> DEV_BSHIFT)
@@ -140,16 +142,18 @@
/* major part of a device external from the kernel (same as emajor below) */
+#undef major
#define major(x) (major_t)((((unsigned)(x)) >> O_BITSMINOR) & O_MAXMAJ)
/* minor part of a device external from the kernel (same as eminor below) */
-
+#undef minor
#define minor(x) (minor_t)((x) & O_MAXMIN)
#endif /* _KERNEL */
/* create old device number */
+#undef makedev
#define makedev(x, y) (unsigned short)(((x) << O_BITSMINOR) | ((y) & O_MAXMIN))
/* make an new device number */
@@ -224,6 +228,7 @@
/*
* Macros for counting and rounding.
*/
+#undef howmany
#define howmany(x, y) (((x)+((y)-1))/(y))
#define roundup(x, y) ((((x)+((y)-1))/(y))*(y))
@@ -342,7 +347,7 @@
* because if a field crosses a byte boundary it's not likely to be meaningful
* without reassembly in its nonnative endianness.
*/
-#ifndef __NetBSD__
+#if !defined(__NetBSD__) && !defined(__APPLE__)
#if defined(_BIT_FIELDS_LTOH)
#define DECL_BITFIELD2(_a, _b) \
uint8_t _a, _b
diff -r a658d63935f2 -r e6592d3b7032 external/cddl/osnet/sys/sys/types.h
--- a/external/cddl/osnet/sys/sys/types.h Tue Mar 02 21:07:21 2010 +0000
+++ b/external/cddl/osnet/sys/sys/types.h Tue Mar 02 21:08:36 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: types.h,v 1.7 2010/03/01 11:19:40 darran Exp $ */
+/* $NetBSD: types.h,v 1.8 2010/03/02 21:08:36 darran Exp $ */
/*-
* Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -64,14 +64,8 @@
* This is a bag of dirty hacks to keep things compiling.
*/
-#include <sys/stdint.h>
-#ifndef _NETBSD_SOURCE
-#define _NETBSD_SOURCE /* XXX TBD fix this */
+#include <stdint.h>
#include_next <sys/types.h>
-#undef _NETBSD_SOURCE
-#else
-#include_next <sys/types.h>
-#endif
#include_next <sys/ccompile.h>
#ifndef _KERNEL
@@ -83,6 +77,12 @@
#define MAXNAMELEN 256
#define FMNAMESZ 8
+#ifdef __APPLE__
+typedef int64_t longlong_t;
+typedef uint64_t u_longlong_t;
+typedef unsigned long vsize_t;
+#endif
+
typedef unsigned int size32_t;
typedef unsigned int caddr32_t;
Home |
Main Index |
Thread Index |
Old Index