PERFORCE change 100914 for review
John Birrell
jb at FreeBSD.org
Fri Jul 7 18:49:48 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=100914
Change 100914 by jb at 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));
More information about the p4-projects
mailing list