On Thu, Oct 14, 2010 at 08:38:18PM +0000, Hans Petter Selasky wrote:
> Author: hselasky
> Date: Thu Oct 14 20:38:18 2010
> New Revision: 213852
> URL: http://svn.freebsd.org/changeset/base/213852
> 
> Log:
>   - Add support for LibUSB in 32-bit compatibility mode.
>   
>   Approved by:    thompsa (mentor)
> 
> Modified:
>   head/lib/libusb/Makefile
>   head/lib/libusb/libusb20.c
>   head/lib/libusb/libusb20_int.h
>   head/lib/libusb/libusb20_ugen20.c
>   head/sys/dev/usb/usb_ioctl.h
> 
> Modified: head/lib/libusb/Makefile
> ==============================================================================
> --- head/lib/libusb/Makefile  Thu Oct 14 20:31:07 2010        (r213851)
> +++ head/lib/libusb/Makefile  Thu Oct 14 20:38:18 2010        (r213852)
> @@ -30,5 +30,9 @@ SRCS+=              libusb10.c
>  SRCS+=               libusb10_desc.c
>  SRCS+=               libusb10_io.c
>  
> +.if defined(COMPAT_32BIT)
> +CFLAGS+=     -DCOMPAT_32BIT
> +.endif
> +
>  .include <bsd.lib.mk>
The support is provided in a way that contradicts the established practice
of doing 32-bit compat. Very nice that the support is provided, thank you
for care about it. But, can it be changed so that the kernel emulates
32-bit ABI instead of library conforming to the kernel ABI ?

For COMPAT32, we aim in making the system where 32bit binaries and libraries
just work on the 64bit host. Your change does not allow to take 32bit host
into jail and run it on 64bit kernel, as example.

Please see numerous examples of ioctl translations under
#ifdef COMPAT_FREEBSD32 on how it is done.

Attachment: pgpd1nX10ENmW.pgp
Description: PGP signature

Reply via email to