* m4/ioctl.m4 (gl_FUNC_IOCTL): Include also <unistd.h>.
* lib/sys_ioctl.in.h: Add comment about Haiku.
* doc/posix-functions/ioctl.texi: Mention Haiku problem.
* doc/glibc-headers/sys_ioctl.texi: Likewise.
+2017-10-28 Bruno Haible <bruno@clisp.org>
+
+ ioctl: Override non-POSIX declaration on Haiku.
+ * m4/ioctl.m4 (gl_FUNC_IOCTL): Include also <unistd.h>.
+ * lib/sys_ioctl.in.h: Add comment about Haiku.
+ * doc/posix-functions/ioctl.texi: Mention Haiku problem.
+ * doc/glibc-headers/sys_ioctl.texi: Likewise.
+
2017-10-28 Bruno Haible <bruno@clisp.org>
crypto/sm3: Add overview documentation to the .h file.
mingw, MSVC 14.
@item
This header file does not declare the @code{ioctl} function on some platforms:
-AIX 5.1, Solaris 11.3.
+AIX 5.1, Solaris 11.3, Haiku 2017.
@end itemize
Portability problems not fixed by Gnulib:
@item
The second parameter is of type @code{unsigned long} rather than @code{int}
on some platforms:
-glibc 2.26, Mac OS X 10.5, FreeBSD 11.0, NetBSD 7.0, OpenBSD 6.0, BeOS.
+glibc 2.26, Mac OS X 10.5, FreeBSD 11.0, NetBSD 7.0, OpenBSD 6.0, BeOS, Haiku 2017.
@end itemize
Portability problems not fixed by Gnulib:
/* AIX 5.1 and Solaris 10 declare ioctl() in <unistd.h> and in <stropts.h>,
but not in <sys/ioctl.h>.
+ Haiku declares ioctl() in <unistd.h>, but not in <sys/ioctl.h>.
But avoid namespace pollution on glibc systems. */
#ifndef __GLIBC__
# include <unistd.h>
-# ioctl.m4 serial 4
+# ioctl.m4 serial 5
dnl Copyright (C) 2008-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
[gl_cv_func_ioctl_posix_signature],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
- [[#include <sys/ioctl.h>]],
+ [[#include <sys/ioctl.h>
+ /* On some platforms, ioctl() is declared in <unistd.h>. */
+ #include <unistd.h>
+ ]],
[[extern
#ifdef __cplusplus
"C"