From owner-p4-projects@FreeBSD.ORG Fri Jul 7 18:49:48 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 822FB16A4E2; Fri, 7 Jul 2006 18:49:48 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5EA3816A4E0 for ; Fri, 7 Jul 2006 18:49:48 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D80C243D53 for ; Fri, 7 Jul 2006 18:49:47 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k67Inl0d060093 for ; Fri, 7 Jul 2006 18:49:47 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k67Inl8n060090 for perforce@freebsd.org; Fri, 7 Jul 2006 18:49:47 GMT (envelope-from jb@freebsd.org) Date: Fri, 7 Jul 2006 18:49:47 GMT Message-Id: <200607071849.k67Inl8n060090@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 100914 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jul 2006 18:49:48 -0000 http://perforce.freebsd.org/chv.cgi?CH=100914 Change 100914 by jb@jb_freebsd2 on 2006/07/07 18:48:50 On sparc64 gcc is sign-extending the value passed to dt_ioctl despite the fact that it's declared as long and the _IOC macro is typed as unsigned long. Affected files ... .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_subr.c#9 edit Differences ... ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_subr.c#9 (text) ==== @@ -471,10 +471,19 @@ } int +#if defined(sun) dt_ioctl(dtrace_hdl_t *dtp, int val, void *arg) +#else +dt_ioctl(dtrace_hdl_t *dtp, u_long val, void *arg) +#endif { const dtrace_vector_t *v = dtp->dt_vector; +#if !defined(sun) + /* XXX Avoid sign extension. This shouldn't be necessary. */ + val &= 0xffffffff; +#endif + if (v != NULL) return (v->dtv_ioctl(dtp->dt_varg, val, arg));