]> Savannah Git Hosting - gnulib.git/commitdiff
sys_time: Fix errors in C++ mode on mingw.
authorBruno Haible <bruno@clisp.org>
Sun, 24 Nov 2019 19:11:28 +0000 (20:11 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 24 Nov 2019 19:11:28 +0000 (20:11 +0100)
* 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'.

ChangeLog
lib/sys_select.in.h
lib/sys_time.in.h

index 356edcbb83e6850b21e4262bd74fa63dc116fa1d..573946e02d6415849eb55abef7d53bb7e54e50ea 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+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.
index e264257daf9a903ac8e964feefa16459e798d52f..19205cba2eccc2bc1b8417d49a45f5204f0fec83 100644 (file)
@@ -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,
index 2bc2bb3b2f2a80363bc2c3f6c99cc7be40a1c447..6859af39de398cdf261c9e86576a09ac14d5a9c6 100644 (file)
@@ -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