changeset 13136:2241c7e2a3f8

ioctl: Fix C++ test error on mingw.
author Bruno Haible <bruno@clisp.org>
date Sun, 04 Apr 2010 10:32:19 +0200
parents 3500e68d2a04
children fd3c9fa89efe
files ChangeLog lib/ioctl.c lib/sys_ioctl.in.h
diffstat 3 files changed, 11 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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.
--- a/lib/ioctl.c
+++ b/lib/ioctl.c
@@ -50,7 +50,7 @@
 # include "w32sock.h"
 
 int
-rpl_ioctl (int fd, int req, ...)
+ioctl (int fd, int req, ...)
 {
   void *buf;
   va_list args;
--- a/lib/sys_ioctl.in.h
+++ b/lib/sys_ioctl.in.h
@@ -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_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