Date: Wed, 3 May 2006 22:33:47 GMT From: John Birrell <jb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 96624 for review Message-ID: <200605032233.k43MXlet003038@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=96624 Change 96624 by jb@jb_freebsd2 on 2006/05/03 22:33:42 Don't hard code paths to executables. Let the user's PATH determine which ones are executed. On FreeBSD cpp has definitions built into it. We don't need to add any more. Affected files ... .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_open.c#10 edit Differences ... ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_open.c#10 (text) ==== @@ -611,11 +611,20 @@ { DTRACE_STABILITY_UNSTABLE, DTRACE_STABILITY_UNSTABLE, DTRACE_CLASS_COMMON }, }; +#if defined(sun) const char *_dtrace_defcpp = "/usr/ccs/lib/cpp"; /* default cpp(1) to invoke */ const char *_dtrace_defld = "/usr/ccs/bin/ld"; /* default ld(1) to invoke */ +#else +const char *_dtrace_defcpp = "cpp"; /* default cpp(1) to invoke */ +const char *_dtrace_defld = "ld"; /* default ld(1) to invoke */ +#endif const char *_dtrace_libdir = "/usr/lib/dtrace"; /* default library directory */ +#if defined(sun) const char *_dtrace_provdir = "/dev/dtrace/provider"; /* provider directory */ +#else +const char *_dtrace_provdir = "/dev/dtrace"; /* provider directory */ +#endif int _dtrace_strbuckets = 211; /* default number of hash buckets (prime) */ int _dtrace_intbuckets = 256; /* default number of integer buckets (Pof2) */ @@ -1003,10 +1012,10 @@ dtp->dt_cpp_argv[0] = (char *)strbasename(dtp->dt_cpp_path); +#if defined(sun) (void) snprintf(isadef, sizeof (isadef), "-D__SUNW_D_%u", (uint_t)(sizeof (void *) * NBBY)); -#if defined(sun) (void) snprintf(utsdef, sizeof (utsdef), "-D__%s_%s", dt_get_sysinfo(SI_SYSNAME, s1, sizeof (s1)), dt_get_sysinfo(SI_RELEASE, s2, sizeof (s2))); @@ -1018,8 +1027,6 @@ dt_cpp_add_arg(dtp, isadef) == NULL || dt_cpp_add_arg(dtp, utsdef) == NULL) return (set_open_errno(dtp, errp, EDT_NOMEM)); -#else -printf("%s:%s(%d): need to set FreeBSD specific CPP defines\n",__FUNCTION__,__FILE__,__LINE__); #endif if (flags & DTRACE_O_NODEV)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200605032233.k43MXlet003038>