John W. Eaton wrote: > Is there any reason that the strftime.h header in gnulib does not use > extern "C"? If not, then would the following patch be OK?
No one asked for it. I've pushed this: >From ee8909a98bbfffc6317e1e9273e1cb8d6341ea25 Mon Sep 17 00:00:00 2001 From: John W. Eaton <j...@gnu.org> Date: Sat, 14 Nov 2009 08:24:25 +0100 Subject: [PATCH] strftime.h: wrap funtion declaration in extern "C" block * lib/strftime.h (nstrftime) [__cplusplus]: Wrap declaration. --- ChangeLog | 5 +++++ lib/strftime.h | 8 ++++++++ 2 files changed, 13 insertions(+), 0 deletions(-) diff --git a/ChangeLog b/ChangeLog index fdb892b..e23f285 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-11-14 John W. Eaton <j...@gnu.org> + + strftime.h: wrap funtion declaration in extern "C" block + * lib/strftime.h (nstrftime) [__cplusplus]: Wrap declaration. + 2009-11-13 Eric Blake <e...@byu.net> getgroups: avoid compiler warning diff --git a/lib/strftime.h b/lib/strftime.h index c3c183e..1937d40 100644 --- a/lib/strftime.h +++ b/lib/strftime.h @@ -17,6 +17,10 @@ #include <time.h> +#ifdef __cplusplus +extern "C" { +#endif + /* Just like strftime, but with two more arguments: POSIX requires that strftime use the local timezone information. When __UTC is nonzero and tm->tm_zone is NULL or the empty string, @@ -24,3 +28,7 @@ %N directive. */ size_t nstrftime (char *, size_t, char const *, struct tm const *, int __utc, int __ns); + +#ifdef __cplusplus +} +#endif -- 1.6.5.2.372.gc0502