Mercurial > hg > octave-nkf > gnulib-hg
changeset 17128:dd67af45a631
gethrxtime: port to C++
* lib/gethrxtime.h, lib/xtime.h [__cplusplus]: Add extern "C".
author | Alexandre Duret-Lutz <adl@lrde.epita.fr> |
---|---|
date | Mon, 08 Oct 2012 14:46:18 -0700 |
parents | b2e34813288d |
children | 7d6610cfd2cc |
files | ChangeLog lib/gethrxtime.h lib/xtime.h |
diffstat | 3 files changed, 21 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-10-08 Alexandre Duret-Lutz <adl@lrde.epita.fr> (tiny change) + + gethrxtime: port to C++ + * lib/gethrxtime.h, lib/xtime.h [__cplusplus]: Add extern "C". + 2012-10-04 Paul Eggert <eggert@cs.ucla.edu> ptsname: fix macro-name typo
--- a/lib/gethrxtime.h +++ b/lib/gethrxtime.h @@ -22,6 +22,10 @@ # include "xtime.h" +#ifdef __cplusplus +extern "C" { +#endif + /* Get the current time, as a count of the number of nanoseconds since an arbitrary epoch (e.g., the system boot time). Prefer a high-resolution clock that is not subject to resetting or @@ -34,4 +38,8 @@ xtime_t gethrxtime (void); # endif +#ifdef __cplusplus +} #endif + +#endif
--- a/lib/xtime.h +++ b/lib/xtime.h @@ -37,6 +37,10 @@ # endif # endif +#ifdef __cplusplus +extern "C" { +#endif + /* Return an extended time value that contains S seconds and NS nanoseconds, without any overflow checking. */ static inline xtime_t @@ -83,4 +87,8 @@ return ns; } +#ifdef __cplusplus +} #endif + +#endif