]> Savannah Git Hosting - gnulib.git/commitdiff
stat-time, timespec: Support use of the header files in C++ mode.
authorBruno Haible <bruno@clisp.org>
Fri, 17 Mar 2017 23:43:36 +0000 (00:43 +0100)
committerBruno Haible <bruno@clisp.org>
Fri, 17 Mar 2017 23:43:36 +0000 (00:43 +0100)
* lib/stat-time.h: Add "C" linkage declaration.
* lib/timespec.h: Likewise.

ChangeLog
lib/stat-time.h
lib/timespec.h

index 7087aaf5f8c9f4591661731df13772cb256abdf2..b0529b58dd82b48891b1092986f2b871a0c39e6b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2017-03-17  Bruno Haible  <bruno@clisp.org>
+
+       stat-time, timespec: Support use of the header files in C++ mode.
+       * lib/stat-time.h: Add "C" linkage declaration.
+       * lib/timespec.h: Likewise.
+
 2017-03-17  Bruno Haible  <bruno@clisp.org>
 
        stdalign: Make it work with HP-UX cc.
index 9402b3fc1c05325bf2eab999daf4ba5f54ae5cb3..47469892ee2728778b12bed6cdcee2c055d696ea 100644 (file)
@@ -31,6 +31,10 @@ _GL_INLINE_HEADER_BEGIN
 # define _GL_STAT_TIME_INLINE _GL_INLINE
 #endif
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* STAT_TIMESPEC (ST, ST_XTIM) is the ST_XTIM member for *ST of type
    struct timespec, if available.  If not, then STAT_TIMESPEC_NS (ST,
    ST_XTIM) is the nanosecond component of the ST_XTIM member for *ST,
@@ -194,6 +198,10 @@ get_stat_birthtime (struct stat const *st)
   return t;
 }
 
+#ifdef __cplusplus
+}
+#endif
+
 _GL_INLINE_HEADER_END
 
 #endif
index a5eca797ce3b5eda275594605022c7485fee4c48..f5d823aefe916649a16d741d7873028b4047b81a 100644 (file)
@@ -29,6 +29,10 @@ _GL_INLINE_HEADER_BEGIN
 # define _GL_TIMESPEC_INLINE _GL_INLINE
 #endif
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* Resolution of timespec timestamps (in units per second), and log
    base 10 of the resolution.  */
 
@@ -107,6 +111,10 @@ timespectod (struct timespec a)
 void gettime (struct timespec *);
 int settime (struct timespec const *);
 
+#ifdef __cplusplus
+}
+#endif
+
 _GL_INLINE_HEADER_END
 
 #endif