Date: Fri, 7 Jul 2006 18:49:47 GMT From: John Birrell <jb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 100914 for review Message-ID: <200607071849.k67Inl8n060090@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607071849.k67Inl8n060090>