Date: Fri, 14 Apr 2006 05:35:09 GMT From: John Birrell <jb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 95226 for review Message-ID: <200604140535.k3E5Z9iC027649@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=95226 Change 95226 by jb@jb_freebsd2 on 2006/04/14 05:34:54 Only include Solaris-specific headers on Solaris. A bucket load of hacks to get this stuff to compile. Affected files ... .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_aggregate.c#2 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_buf.c#2 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_cg.c#2 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_consume.c#2 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_decl.c#2 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_handle.c#2 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_ident.c#2 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_impl.h#2 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_link.c#2 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_open.c#2 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_options.c#2 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_parser.c#2 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_pid.h#2 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_pragma.c#2 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_printf.c#2 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_program.c#2 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_provider.c#2 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_regset.c#2 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_regset.h#2 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_strtab.c#2 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_strtab.h#2 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_subr.c#2 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_work.c#2 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/mkerrtags.sh#2 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/mknames.sh#2 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libgen/common/gmatch.c#2 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libproc/common/libproc.h#2 edit .. //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/sys/dtrace.h#2 edit Differences ... ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_aggregate.c#2 (text) ==== @@ -32,7 +32,9 @@ #include <unistd.h> #include <dt_impl.h> #include <assert.h> +#if defined(sun) #include <alloca.h> +#endif #include <limits.h> #define DTRACE_AHASHSIZE 32779 /* big 'ol prime */ @@ -254,6 +256,7 @@ static void dt_aggregate_umod(dtrace_hdl_t *dtp, uint64_t *data) { +#ifdef DOODAD uint64_t pid = data[0]; uint64_t *pc = &data[1]; struct ps_prochandle *P; @@ -272,6 +275,7 @@ dt_proc_unlock(dtp, P); dt_proc_release(dtp, P); +#endif } static void @@ -967,8 +971,10 @@ assert(agp->dtat_ncpu == 0); assert(agp->dtat_cpus == NULL); +#ifdef DOODAD agp->dtat_maxcpu = dt_sysconf(dtp, _SC_CPUID_MAX) + 1; agp->dtat_ncpu = dt_sysconf(dtp, _SC_NPROCESSORS_MAX); +#endif agp->dtat_cpus = malloc(agp->dtat_ncpu * sizeof (processorid_t)); if (agp->dtat_cpus == NULL) ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_buf.c#2 (text) ==== @@ -39,7 +39,9 @@ * to check for errors and then perform a single check before using the buffer. */ +#if defined(sun) #include <sys/sysmacros.h> +#endif #include <strings.h> #include <dt_impl.h> ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_cg.c#2 (text) ==== @@ -27,7 +27,9 @@ #pragma ident "@(#)dt_cg.c 1.13 05/07/31 SMI" #include <sys/types.h> +#if defined(sun) #include <sys/sysmacros.h> +#endif #include <sys/isa_defs.h> #include <strings.h> ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_consume.c#2 (text) ==== @@ -33,7 +33,9 @@ #include <limits.h> #include <assert.h> #include <ctype.h> +#if defined(sun) #include <alloca.h> +#endif #include <dt_impl.h> /* @@ -521,7 +523,7 @@ return (dt_set_errno(dtp, EDT_BADSTACKPC)); } - if (pc == NULL) + if (pc == 0) break; addr += size; @@ -609,8 +611,10 @@ if (P != NULL) dt_proc_lock(dtp, P); /* lock handle while we perform lookups */ - for (i = 0; i < depth && pc[i] != NULL; i++) { + for (i = 0; i < depth && pc[i] != 0; i++) { +#ifdef DOODAD const prmap_t *map; +#endif if ((err = dt_printf(dtp, fp, "%*s", indent, "")) < 0) break; @@ -627,6 +631,7 @@ (void) snprintf(c, sizeof (c), "%s`%s", dt_basename(objname), name); } +#ifdef DOODAD } else if (str != NULL && str[0] != '\0' && str[0] != '@' && (P != NULL && ((map = Paddr_to_map(P, pc[i])) == NULL || (map->pr_mflags & MA_WRITE)))) { @@ -644,9 +649,10 @@ * case and we refuse to use the string. */ (void) snprintf(c, sizeof (c), "%s", str); +#endif } else { if (P != NULL && Pobjname(P, pc[i], objname, - sizeof (objname)) != NULL) { + sizeof (objname)) != 0) { (void) snprintf(c, sizeof (c), "%s`0x%llx", dt_basename(objname), (u_longlong_t)pc[i]); } else { @@ -758,7 +764,7 @@ if (P != NULL) dt_proc_lock(dtp, P); /* lock handle while we perform lookups */ - if (P != NULL && Pobjname(P, pc, objname, sizeof (objname)) != NULL) { + if (P != NULL && Pobjname(P, pc, objname, sizeof (objname)) != 0) { (void) snprintf(c, sizeof (c), "%s", dt_basename(objname)); } else { (void) snprintf(c, sizeof (c), "0x%llx", (u_longlong_t)pc); @@ -1783,8 +1789,10 @@ if ((nbuf.dtbd_data = malloc(size)) == NULL) return (dt_set_errno(dtp, EDT_NOMEM)); +#ifdef DOODAD if (max_ncpus == 0) max_ncpus = dt_sysconf(dtp, _SC_CPUID_MAX) + 1; +#endif for (i = 0; i < max_ncpus; i++) { nbuf.dtbd_cpu = i; @@ -1861,8 +1869,10 @@ if (!dtp->dt_active) return (dt_set_errno(dtp, EINVAL)); +#ifdef DOODAD if (max_ncpus == 0) max_ncpus = dt_sysconf(dtp, _SC_CPUID_MAX) + 1; +#endif if (pf == NULL) pf = (dtrace_consume_probe_f *)dt_nullprobe; ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_decl.c#2 (text) ==== @@ -29,7 +29,9 @@ #include <strings.h> #include <stdlib.h> #include <limits.h> +#if defined(sun) #include <alloca.h> +#endif #include <assert.h> #include <dt_decl.h> ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_handle.c#2 (text) ==== @@ -32,7 +32,9 @@ #include <errno.h> #include <unistd.h> #include <assert.h> +#if defined(sun) #include <alloca.h> +#endif #include <dt_impl.h> #include <dt_program.h> ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_ident.c#2 (text) ==== @@ -26,14 +26,20 @@ #pragma ident "@(#)dt_ident.c 1.15 06/02/22 SMI" +#if defined(sun) #include <sys/sysmacros.h> +#endif #include <strings.h> #include <stdlib.h> +#if defined(sun) #include <alloca.h> +#endif #include <assert.h> #include <errno.h> #include <ctype.h> +#if defined(sun) #include <sys/procfs_isa.h> +#endif #include <limits.h> #include <dt_ident.h> ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_impl.h#2 (text) ==== @@ -29,7 +29,13 @@ #pragma ident "@(#)dt_impl.h 1.20 06/03/24 SMI" #include <sys/param.h> +#if defined(sun) #include <sys/objfs.h> +#else +#include <opensolaris/compat/sys/time.h> +#include <opensolaris/compat/sys/bitmap.h> +#include <sys/utsname.h> +#endif #include <setjmp.h> #include <libctf.h> #include <dtrace.h> @@ -105,7 +111,9 @@ struct dt_module *dm_next; /* pointer to next module in hash chain */ const dt_modops_t *dm_ops; /* pointer to data model's ops vector */ Elf *dm_elf; /* libelf handle for module object */ +#if defined(sun) objfs_info_t dm_info; /* object filesystem private info */ +#endif ctf_sect_t dm_symtab; /* symbol table for module */ ctf_sect_t dm_strtab; /* string table for module */ ctf_sect_t dm_ctdata; /* CTF data for module */ ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_link.c#2 (text) ==== @@ -30,18 +30,24 @@ #include <elf.h> #include <sys/types.h> +#if defined(sun) #include <sys/sysmacros.h> +#endif #include <unistd.h> #include <strings.h> +#if defined(sun) #include <alloca.h> +#endif #include <limits.h> #include <stddef.h> #include <stdlib.h> #include <stdio.h> #include <fcntl.h> #include <errno.h> +#if defined(sun) #include <wait.h> +#endif #include <assert.h> #include <sys/ipc.h> @@ -390,6 +396,7 @@ s = &dofs[dofrh->dofr_tgtsec]; for (j = 0; j < nrel; j++) { +#ifdef DOODAD #if defined(__i386) || defined(__amd64) rel->r_offset = s->dofs_offset + dofr[j].dofr_offset; @@ -403,6 +410,7 @@ #else #error unknown ISA #endif +#endif sym->st_name = base + dofr[j].dofr_name - 1; sym->st_value = 0; @@ -1368,10 +1376,12 @@ * already been processed by an earlier link * invocation. */ +#ifdef DOODAD if (rsym.st_shndx != SHN_SUNW_IGNORE) { rsym.st_shndx = SHN_SUNW_IGNORE; (void) gelf_update_sym(data_sym, ndx, &rsym); } +#endif } /* ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_open.c#2 (text) ==== @@ -27,13 +27,17 @@ #pragma ident "@(#)dt_open.c 1.30 06/04/03 SMI" #include <sys/types.h> +#if defined(sun) #include <sys/modctl.h> #include <sys/systeminfo.h> +#endif #include <sys/resource.h> #include <libelf.h> #include <strings.h> +#if defined(sun) #include <alloca.h> +#endif #include <limits.h> #include <unistd.h> #include <stdlib.h> @@ -620,7 +624,9 @@ int _dtrace_debug = 0; /* debug messages enabled (off) */ const char *const _dtrace_version = DT_VERS_STRING; /* API version string */ +#ifdef DOODAD int _dtrace_rdvers = RD_VERSION; /* rtld_db feature version */ +#endif typedef struct dt_fdlist { int *df_fds; /* array of provider driver file descriptors */ @@ -628,6 +634,7 @@ uint_t df_size; /* size of df_fds[] */ } dt_fdlist_t; +#ifdef DOODAD #pragma init(_dtrace_init) void _dtrace_init(void) @@ -639,6 +646,7 @@ break; } } +#endif static dtrace_hdl_t * set_open_errno(dtrace_hdl_t *dtp, int *errp, int err) @@ -899,9 +907,11 @@ (void) snprintf(isadef, sizeof (isadef), "-D__SUNW_D_%u", (uint_t)(sizeof (void *) * NBBY)); +#ifdef DOODAD (void) snprintf(utsdef, sizeof (utsdef), "-D__%s_%s", dt_get_sysinfo(SI_SYSNAME, s1, sizeof (s1)), dt_get_sysinfo(SI_RELEASE, s2, sizeof (s2))); +#endif if (dt_cpp_add_arg(dtp, "-D__sun") == NULL || dt_cpp_add_arg(dtp, "-D__unix") == NULL || ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_options.c#2 (text) ==== @@ -34,7 +34,9 @@ #include <stdlib.h> #include <unistd.h> #include <limits.h> +#if defined(sun) #include <alloca.h> +#endif #include <errno.h> #include <fcntl.h> ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_parser.c#2 (text) ==== @@ -100,7 +100,9 @@ #include <setjmp.h> #include <strings.h> #include <assert.h> +#if defined(sun) #include <alloca.h> +#endif #include <stdlib.h> #include <stdarg.h> #include <stdio.h> ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_pid.h#2 (text) ==== @@ -31,7 +31,9 @@ #pragma ident "@(#)dt_pid.h 1.7 06/02/08 SMI" #include <libproc.h> +#if defined(sun) #include <sys/fasttrap.h> +#endif #include <dt_impl.h> #ifdef __cplusplus @@ -45,6 +47,7 @@ dt_pcb_t *pcb); extern int dt_pid_create_probes_module(dtrace_hdl_t *, dt_proc_t *); +#ifdef DOODAD extern int dt_pid_create_entry_probe(struct ps_prochandle *, dtrace_hdl_t *, fasttrap_probe_spec_t *, const GElf_Sym *); @@ -56,6 +59,7 @@ extern int dt_pid_create_glob_offset_probes(struct ps_prochandle *, dtrace_hdl_t *, fasttrap_probe_spec_t *, const GElf_Sym *, const char *); +#endif #ifdef __cplusplus } ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_pragma.c#2 (text) ==== @@ -27,7 +27,9 @@ #pragma ident "@(#)dt_pragma.c 1.5 05/06/08 SMI" #include <strings.h> +#if defined(sun) #include <alloca.h> +#endif #include <stdlib.h> #include <stdio.h> ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_printf.c#2 (text) ==== @@ -27,10 +27,14 @@ #pragma ident "@(#)dt_printf.c 1.19 06/01/07 SMI" +#if defined(sun) #include <sys/sysmacros.h> +#endif #include <strings.h> #include <stdlib.h> +#if defined(sun) #include <alloca.h> +#endif #include <assert.h> #include <ctype.h> #include <errno.h> @@ -455,7 +459,11 @@ * Below, we turn this into the canonical adb/mdb /[yY] format, * "1973 Dec 3 17:20:00". */ +#if defined(sun) (void) ctime_r(&sec, src, sizeof (src)); +#else + (void) ctime_r(&sec, src); +#endif /* * Place the 4-digit year at the head of the string... @@ -1598,7 +1606,8 @@ * fails, we can fail the operation without destroying stdout. */ if ((nfp = fopen(filename, "aw")) == NULL) { - char *msg = strerror(errno), *faultstr; + char *msg = strerror(errno); + char *faultstr; int len = 80; len += strlen(msg) + strlen(filename); ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_program.c#2 (text) ==== @@ -32,7 +32,9 @@ #include <errno.h> #include <assert.h> #include <ctype.h> +#if defined(sun) #include <alloca.h> +#endif #include <dt_impl.h> #include <dt_program.h> ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_provider.c#2 (text) ==== @@ -27,13 +27,17 @@ #pragma ident "@(#)dt_provider.c 1.11 06/04/04 SMI" #include <sys/types.h> +#if defined(sun) #include <sys/sysmacros.h> +#endif #include <assert.h> #include <limits.h> #include <strings.h> #include <stdlib.h> +#if defined(sun) #include <alloca.h> +#endif #include <unistd.h> #include <errno.h> ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_regset.c#2 (text) ==== @@ -27,7 +27,11 @@ #pragma ident "@(#)dt_regset.c 1.2 05/06/08 SMI" #include <sys/types.h> +#if defined(sun) #include <sys/bitmap.h> +#else +#include <opensolaris/compat/sys/bitmap.h> +#endif #include <assert.h> #include <strings.h> #include <stdlib.h> ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_regset.h#2 (text) ==== @@ -30,6 +30,9 @@ #pragma ident "@(#)dt_regset.h 1.2 05/06/08 SMI" #include <sys/types.h> +#if !defined(sun) +#include <opensolaris/compat/sys/types.h> +#endif #ifdef __cplusplus extern "C" { ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_strtab.c#2 (text) ==== @@ -27,7 +27,9 @@ #pragma ident "@(#)dt_strtab.c 1.3 05/06/08 SMI" #include <sys/types.h> +#if defined(sun) #include <sys/sysmacros.h> +#endif #include <strings.h> #include <stdlib.h> #include <assert.h> ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_strtab.h#2 (text) ==== @@ -30,6 +30,9 @@ #pragma ident "@(#)dt_strtab.h 1.3 05/06/08 SMI" #include <sys/types.h> +#if !defined(sun) +#include <opensolaris/compat/sys/types.h> +#endif #ifdef __cplusplus extern "C" { ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_subr.c#2 (text) ==== @@ -26,7 +26,9 @@ #pragma ident "@(#)dt_subr.c 1.12 05/11/29 SMI" +#if defined(sun) #include <sys/sysmacros.h> +#endif #include <strings.h> #include <unistd.h> @@ -36,7 +38,9 @@ #include <stdio.h> #include <errno.h> #include <ctype.h> +#if defined(sun) #include <alloca.h> +#endif #include <assert.h> #include <libgen.h> #include <limits.h> @@ -486,8 +490,10 @@ { const dtrace_vector_t *v = dtp->dt_vector; +#ifdef DOODAD if (v == NULL) return (p_online(cpu, P_STATUS)); +#endif return (v->dtv_status(dtp->dt_varg, cpu)); } @@ -922,7 +928,7 @@ } else { (void) snprintf(c, sizeof (c), "%s`%s", obj, name); } - } else if (Pobjname(P, addr, objname, sizeof (objname)) != NULL) { + } else if (Pobjname(P, addr, objname, sizeof (objname)) != 0) { (void) snprintf(c, sizeof (c), "%s`0x%llx", dt_basename(objname), addr); } else { ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_work.c#2 (text) ==== @@ -32,14 +32,19 @@ #include <errno.h> #include <assert.h> #include <time.h> +#if !defined(sun) +#include <opensolaris/compat/sys/time.h> +#endif static const struct { int dtslt_option; size_t dtslt_offs; } _dtrace_sleeptab[] = { +#if defined(sun) { DTRACEOPT_STATUSRATE, offsetof(dtrace_hdl_t, dt_laststatus) }, { DTRACEOPT_AGGRATE, offsetof(dtrace_hdl_t, dt_lastagg) }, { DTRACEOPT_SWITCHRATE, offsetof(dtrace_hdl_t, dt_lastswitch) }, +#endif { DTRACEOPT_MAX, 0 } }; ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/mkerrtags.sh#2 (text) ==== @@ -26,7 +26,9 @@ # #ident "@(#)mkerrtags.sh 1.2 05/06/08 SMI" -echo "\ +BSDECHO=-e + +echo ${BSDECHO} "\ /*\n\ * Copyright 2003 Sun Microsystems, Inc. All rights reserved.\n\ * Use is subject to license terms.\n\ @@ -43,7 +45,7 @@ sed -n "s/$pattern/$replace/p" || exit 1 -echo "\ +echo ${BSDECHO} "\ };\n\ \n\ static const int _dt_ntag = sizeof (_dt_errtags) / sizeof (_dt_errtags[0]);\n\ ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/mknames.sh#2 (text) ==== @@ -26,7 +26,9 @@ # #ident "@(#)mknames.sh 1.1 05/07/31 SMI" -echo "\ +BSDECHO=-e + +echo ${BSDECHO} "\ /*\n\ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.\n\ * Use is subject to license terms.\n\ @@ -47,7 +49,7 @@ printf("\tcase %s: return (\"%s\");\n", $2, tolower(substr($2, 10))); }' -echo "\ +echo ${BSDECHO} "\ default: return (\"unknown\");\n\ }\n\ }" ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libgen/common/gmatch.c#2 (text) ==== @@ -32,15 +32,23 @@ /*LINTLIBRARY*/ +#if defined(sun) #pragma weak gmatch = _gmatch +#endif +#if defined(sun) #include "gen_synonyms.h" +#endif #include <sys/types.h> #include <libgen.h> #include <stdlib.h> #include <limits.h> +#if defined(sun) #include <widec.h> #include "_range.h" +#else +/* DOODAD */ static int multibyte = 0; +#endif #define Popwchar(p, c) \ n = mbtowc(&cl, p, MB_LEN_MAX); \ ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libproc/common/libproc.h#2 (text) ==== @@ -48,8 +48,11 @@ #include <unistd.h> #include <fcntl.h> #include <nlist.h> +#if defined(sun) #include <door.h> +#endif #include <gelf.h> +#if defined(sun) #include <proc_service.h> #include <rtld_db.h> #include <procfs.h> @@ -65,6 +68,7 @@ #if defined(__i386) || defined(__amd64) #include <sys/sysi86.h> #endif +#endif #ifdef __cplusplus extern "C" { @@ -200,6 +204,7 @@ extern void Prelease(struct ps_prochandle *, int); extern void Pfree(struct ps_prochandle *); +#if defined(sun) extern int Pasfd(struct ps_prochandle *); extern int Pctlfd(struct ps_prochandle *); extern int Pcreate_agent(struct ps_prochandle *); @@ -696,6 +701,7 @@ extern int proc_initstdio(void); extern int proc_flushstdio(void); extern int proc_finistdio(void); +#endif /* defined(sun) */ #ifdef __cplusplus } ==== //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/sys/dtrace.h#2 (text) ==== @@ -47,12 +47,20 @@ #ifndef _ASM #include <sys/types.h> +#if defined(sun) #include <sys/modctl.h> #include <sys/processor.h> #include <sys/systm.h> +#else +#include <opensolaris/compat/sys/processor.h> +#endif #include <sys/ctf_api.h> +#if defined(sun) #include <sys/cyclic.h> #include <sys/int_limits.h> +#else +#include <stdint.h> +#endif /* * DTrace Universal Constants and Typedefs
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200604140535.k3E5Z9iC027649>