On 02/22/2011 12:34 PM, Markus Gothe wrote: > Please see attached patch for ioctl() on FreeBSD and Darwin. Their definition > differ from (int, int, ...) and the gnulib variant doesn't work well on > 64-bit Darwin with this proto.
Can you please convince your mailer to send patches with MIME type
text/plain, rather than encoded as application/octet-stream?
> --- lib/ioctl.c.old 2011-02-22 20:21:11.000000000 +0100
> +++ lib/ioctl.c 2011-02-22 20:24:38.000000000 +0100
> @@ -28,7 +28,11 @@
> /* Provide a wrapper with the POSIX prototype. */
> # undef ioctl
> int
> +#if __FreeBSD__ || __Darwin__
> +rpl_ioctl (int fd, unsigned long request, ... /* {void *,char *} arg */)
> +#else
> rpl_ioctl (int fd, int request, ... /* {void *,char *} arg */)
> +#endif
This part is wrong - the replacement should ALWAYS match the POSIX
signature, and the type munging take place within the replacement,
rather than declaring the replacement with the wrong type.
> +++ m4/ioctl.m4 2011-02-22 20:26:10.000000000 +0100
> @@ -24,7 +24,13 @@
> [AC_COMPILE_IFELSE(
> [AC_LANG_PROGRAM(
> [[#include <sys/ioctl.h>]],
> - [[extern int ioctl (int, int, ...);]])
> + [[
> + #if __FreeBSD__ || __Darwin__
> + extern int ioctl (int, unsigned long, ...);
> + #else
> + extern int ioctl (int, int, ...);
> + #endif
> + ]])
> ],
> [gl_cv_func_ioctl_posix_signature=yes],
> [gl_cv_func_ioctl_posix_signature=no])
This is wrong as well - the whole point of this test is to reject the
FreeBSD/Darwin ioctl signature as non-compliant, so that the rest of the
code will provide a correct signature wrapper in the form of rpl_ioctl.
What is the exact failure you are seeing, and on which project?
--
Eric Blake [email protected] +1-801-349-2682
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
