]> Savannah Git Hosting - gnulib.git/commitdiff
ioctl: Override non-POSIX declaration on Haiku.
authorBruno Haible <bruno@clisp.org>
Sun, 29 Oct 2017 00:22:19 +0000 (02:22 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 29 Oct 2017 00:22:19 +0000 (02:22 +0200)
* 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.

ChangeLog
doc/glibc-headers/sys_ioctl.texi
doc/posix-functions/ioctl.texi
lib/sys_ioctl.in.h
m4/ioctl.m4

index ddaa32ccfbb5753216406fe75a77f334c974c5b2..533038d7ed2d6a511931bd7c8e7fda71a6352491 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+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.
index a4cb740ad39440bc0797063c08aac63d85e4cede..5685b896f9046810b49cc65eb5b2e3a355669e4b 100644 (file)
@@ -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:
index e4a1ddec1345840591b7cfe247f368842442dd25..b146c0ac755ead6d1e61835c8d5f4e02abee5525 100644 (file)
@@ -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:
index 9763a6ce777fa324b4bb415b978e5ac82d54fca0..b4f7e7d031ff6a11f4961cf10f62a4700128b98b 100644 (file)
@@ -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>
index 30209dd646e27893883db255970815e64b4d3153..57ca2a32acdb151ec67e38c9ba46038913fb8ec6 100644 (file)
@@ -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"