bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

extern "C" for strftime.h?


From: John W. Eaton
Subject: extern "C" for strftime.h?
Date: Sat, 14 Nov 2009 00:06:09 -0500

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?

Thanks,

jwe

commit bf7fb16a0253f59bb1ec31e61bc92b1574e78633
Author: John W. Eaton <address@hidden>
Date:   Sat Nov 14 00:02:23 2009 -0500

    strftime.h: wrap funtion declaration in extern "C" block

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]