]> Savannah Git Hosting - gnulib.git/commitdiff
sys_time: add gnulib::timeval for C++
authorPedro Alves <palves@redhat.com>
Tue, 15 Nov 2016 02:36:00 +0000 (02:36 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 15 Nov 2016 17:23:54 +0000 (09:23 -0800)
* lib/sys_time.in.h [__cplusplus && defined GNULIB_NAMESPACE]:
Define "timeval" in the GNULIB_NAMESPACE namespace, and #undef any
timeval macro.

ChangeLog
lib/sys_time.in.h

index e0490bd523d5e3a02d654d9d0dfe85905ba83bf6..c0851b2bddf09fde9e4a69a030d2de44815368b5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2016-11-15  Pedro Alves  <palves@redhat.com>
+
+       sys_time: add gnulib::timeval for C++
+       * lib/sys_time.in.h [__cplusplus && defined GNULIB_NAMESPACE]:
+       Define "timeval" in the GNULIB_NAMESPACE namespace, and #undef any
+       timeval macro.
+
 2016-11-14  Pedro Alves  <palves@redhat.com>
 
        snippet/c++defs: fix real-floating arg functions in C++ mode
index 4dc0cc40664ef06557e5b12e6034be0dd09c5cf3..d3adf586b1777d956b78513fb9e4a26381637cbe 100644 (file)
@@ -109,6 +109,13 @@ _GL_CXXALIAS_SYS_CAST (gettimeofday, int,
                        (struct timeval *restrict, void *restrict));
 # endif
 _GL_CXXALIASWARN (gettimeofday);
+# if defined __cplusplus && defined GNULIB_NAMESPACE
+namespace GNULIB_NAMESPACE {
+  typedef ::timeval
+#undef timeval
+    timeval;
+}
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef gettimeofday
 # if HAVE_RAW_DECL_GETTIMEOFDAY