changeset 13564:1b02c6324dca

fts: allow compilation with C++ * lib/fts_.h: Specify extern "C" linkage with C++.
author Giuseppe Scrivano <gscrivano@gnu.org>
date Sun, 22 Aug 2010 10:20:42 -0400
parents fc7c1efec893
children 69913822a0f7
files ChangeLog lib/fts_.h
diffstat 2 files changed, 12 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-08-22  Giuseppe Scrivano  <gscrivano@gnu.org>
+
+	fts: allow compilation with C++
+	* lib/fts_.h: Specify extern "C" linkage with C++.
+
 2010-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
 	Fix gnulib-tool sed script de-commentation for AIX sed.
--- a/lib/fts_.h
+++ b/lib/fts_.h
@@ -55,9 +55,14 @@
 #  undef __THROW
 #  define __THROW
 #  undef __BEGIN_DECLS
-#  define __BEGIN_DECLS
 #  undef __END_DECLS
-#  define __END_DECLS
+#  ifdef __cplusplus
+#   define __BEGIN_DECLS extern "C" {
+#   define __END_DECLS }
+#  else
+#   define __BEGIN_DECLS
+#   define __END_DECLS
+#  endif
 # endif
 
 # include <stddef.h>