From 0469a4539552c2d81dff0377bbffc133352f7a3e Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 29 Oct 2017 02:22:19 +0200 Subject: ioctl: Override non-POSIX declaration on Haiku. * m4/ioctl.m4 (gl_FUNC_IOCTL): Include also . * lib/sys_ioctl.in.h: Add comment about Haiku. * doc/posix-functions/ioctl.texi: Mention Haiku problem. * doc/glibc-headers/sys_ioctl.texi: Likewise. --- ChangeLog | 8 ++++++++ doc/glibc-headers/sys_ioctl.texi | 2 +- doc/posix-functions/ioctl.texi | 2 +- lib/sys_ioctl.in.h | 1 + m4/ioctl.m4 | 7 +++++-- 5 files changed, 16 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index ddaa32ccfb..533038d7ed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2017-10-28 Bruno Haible + + ioctl: Override non-POSIX declaration on Haiku. + * m4/ioctl.m4 (gl_FUNC_IOCTL): Include also . + * 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 crypto/sm3: Add overview documentation to the .h file. 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 and in , but not in . + Haiku declares ioctl() in , but not in . But avoid namespace pollution on glibc systems. */ #ifndef __GLIBC__ # include 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 ]], + [[#include + /* On some platforms, ioctl() is declared in . */ + #include + ]], [[extern #ifdef __cplusplus "C" -- cgit v1.2.1