summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2017-10-29 02:22:19 +0200
committerBruno Haible <bruno@clisp.org>2017-10-29 02:22:19 +0200
commit0469a4539552c2d81dff0377bbffc133352f7a3e (patch)
tree495e88e69d5703abf565ba5c9cb95ab5c07e67cb
parent9b41ec9be365ebe3065d64ddb4e91f61bd84dc72 (diff)
downloadgnulib-0469a4539552c2d81dff0377bbffc133352f7a3e.tar.gz
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.
-rw-r--r--ChangeLog8
-rw-r--r--doc/glibc-headers/sys_ioctl.texi2
-rw-r--r--doc/posix-functions/ioctl.texi2
-rw-r--r--lib/sys_ioctl.in.h1
-rw-r--r--m4/ioctl.m47
5 files changed, 16 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index ddaa32ccfb..533038d7ed 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
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.
* lib/sm3.h: Add comments.
diff --git a/doc/glibc-headers/sys_ioctl.texi b/doc/glibc-headers/sys_ioctl.texi
index a4cb740ad3..5685b896f9 100644
--- a/doc/glibc-headers/sys_ioctl.texi
+++ b/doc/glibc-headers/sys_ioctl.texi
@@ -25,7 +25,7 @@ This header file is missing on some platforms:
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:
diff --git a/doc/posix-functions/ioctl.texi b/doc/posix-functions/ioctl.texi
index e4a1ddec13..b146c0ac75 100644
--- a/doc/posix-functions/ioctl.texi
+++ b/doc/posix-functions/ioctl.texi
@@ -15,7 +15,7 @@ On Windows platforms (excluding Cygwin), @code{ioctl} is called
@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:
diff --git a/lib/sys_ioctl.in.h b/lib/sys_ioctl.in.h
index 9763a6ce77..b4f7e7d031 100644
--- a/lib/sys_ioctl.in.h
+++ b/lib/sys_ioctl.in.h
@@ -31,6 +31,7 @@
/* 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>
diff --git a/m4/ioctl.m4 b/m4/ioctl.m4
index 30209dd646..57ca2a32ac 100644
--- a/m4/ioctl.m4
+++ b/m4/ioctl.m4
@@ -1,4 +1,4 @@
-# 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,
@@ -23,7 +23,10 @@ AC_DEFUN([gl_FUNC_IOCTL],
[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"