From 1a56eb400a72d56a160d6d3f1c3a7577b7019cb0 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 4 Apr 2010 10:32:19 +0200 Subject: [PATCH] ioctl: Fix C++ test error on mingw. --- ChangeLog | 7 +++++++ lib/ioctl.c | 2 +- lib/sys_ioctl.in.h | 4 +++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index b80dfea29..0bb6e2164 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-04-04 Bruno Haible + + 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 wcwidth: Fix C++ test error on mingw. diff --git a/lib/ioctl.c b/lib/ioctl.c index 1d409c671..91eb3be1b 100644 --- a/lib/ioctl.c +++ b/lib/ioctl.c @@ -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; diff --git a/lib/sys_ioctl.in.h b/lib/sys_ioctl.in.h index 6066ecf72..8b0e2361a 100644 --- 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_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 -- 2.11.0