ioctl: Fix C++ test error on mingw.
authorBruno Haible <bruno@clisp.org>
Sun, 4 Apr 2010 08:32:19 +0000 (10:32 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 4 Apr 2010 08:32:19 +0000 (10:32 +0200)
ChangeLog
lib/ioctl.c
lib/sys_ioctl.in.h

index b80dfea..0bb6e21 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-04-04  Bruno Haible  <bruno@clisp.org>
+
+       ioctl: Fix C++ test error on mingw.
+       * lib/ioctl.c (ioctl): Renamed from rpl_ioctl.
+       * lib/sys_ioctl.in.h (ioctl): When SYS_IOCTL_H_HAVE_WINSOCK2_H is 1,
+       use _GL_FUNCDECL_SYS, not _GL_FUNCDECL_RPL.
+
 2010-04-03  Bruno Haible  <bruno@clisp.org>
 
        wcwidth: Fix C++ test error on mingw.
index 1d409c6..91eb3be 100644 (file)
@@ -50,7 +50,7 @@ rpl_ioctl (int fd, int request, ... /* {void *,char *} arg */)
 # include "w32sock.h"
 
 int
-rpl_ioctl (int fd, int req, ...)
+ioctl (int fd, int req, ...)
 {
   void *buf;
   va_list args;
index 6066ecf..8b0e236 100644 (file)
@@ -44,7 +44,7 @@
 /* Declare overridden functions.  */
 
 #if @GNULIB_IOCTL@
-# if @SYS_IOCTL_H_HAVE_WINSOCK2_H@ || @REPLACE_IOCTL@
+# if @REPLACE_IOCTL@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   undef ioctl
 #   define ioctl rpl_ioctl
@@ -54,8 +54,10 @@ _GL_FUNCDECL_RPL (ioctl, int,
 _GL_CXXALIAS_RPL (ioctl, int,
                   (int fd, int request, ... /* {void *,char *} arg */));
 # else
+#  if @SYS_IOCTL_H_HAVE_WINSOCK2_H@ || 1
 _GL_FUNCDECL_SYS (ioctl, int,
                   (int fd, int request, ... /* {void *,char *} arg */));
+#  endif
 _GL_CXXALIAS_SYS (ioctl, int,
                   (int fd, int request, ... /* {void *,char *} arg */));
 # endif