summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--lib/sys_select.in.h2
-rw-r--r--lib/sys_time.in.h6
3 files changed, 15 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 356edcbb83..573946e02d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2019-11-24 Bruno Haible <bruno@clisp.org>
+ sys_time: Fix errors in C++ mode on mingw.
+ * lib/sys_time.in.h (timeval): Restore the redirection
+ '#define timeval rpl_timeval', for when the symbol timeval is being used
+ outside the 'gnulib' namespace.
+ * lib/sys_select.in.h (select): In C++, write 'timeval', not
+ 'struct timeval'.
+
+2019-11-24 Bruno Haible <bruno@clisp.org>
+
iswctype: Fix errors in C++ mode on mingw.
* lib/wctype.in.h (rpl_iswctype): Override if GNULIB_OVERRIDES_WINT_T
is 1.
diff --git a/lib/sys_select.in.h b/lib/sys_select.in.h
index e264257daf..19205cba2e 100644
--- a/lib/sys_select.in.h
+++ b/lib/sys_select.in.h
@@ -295,7 +295,7 @@ _GL_FUNCDECL_RPL (select, int,
struct timeval *restrict));
_GL_CXXALIAS_RPL (select, int,
(int, fd_set *restrict, fd_set *restrict, fd_set *restrict,
- struct timeval *restrict));
+ timeval *restrict));
# else
_GL_CXXALIAS_SYS (select, int,
(int, fd_set *restrict, fd_set *restrict, fd_set *restrict,
diff --git a/lib/sys_time.in.h b/lib/sys_time.in.h
index 2bc2bb3b2f..6859af39de 100644
--- a/lib/sys_time.in.h
+++ b/lib/sys_time.in.h
@@ -112,8 +112,12 @@ _GL_CXXALIASWARN (gettimeofday);
# if defined __cplusplus && defined GNULIB_NAMESPACE
namespace GNULIB_NAMESPACE {
typedef ::timeval
-#undef timeval
+# undef timeval
timeval;
+# if @REPLACE_STRUCT_TIMEVAL@
+# define timeval rpl_timeval
+ typedef ::timeval timeval;
+# endif
}
# endif
#elif defined GNULIB_POSIXCHECK