changeset 12604:cb14b3e81bd7

glob: Fix C++ compilation.
author John W. Eaton <jwe@octave.org>
date Fri, 08 Jan 2010 10:11:07 +0100
parents 6737875eb0da
children c7910f932a31
files ChangeLog lib/glob.in.h
diffstat 2 files changed, 13 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-01-07  John W. Eaton  <jwe@octave.org>  (tiny change)
+
+	glob: Fix C++ compilation.
+	* lib/glob.in.h [__cplusplus]: Define __BEGIN_DECLS and __END_DECLS for
+	C++.
+
 2010-01-07  Bruno Haible  <bruno@clisp.org>
 
 	Fix indentation of wctype.in.h, broken since 2007-01-06.
--- a/lib/glob.in.h
+++ b/lib/glob.in.h
@@ -33,8 +33,13 @@
 #include <sys/stat.h>
 
 #ifndef __BEGIN_DECLS
-# define __BEGIN_DECLS
-# define __END_DECLS
+# ifdef __cplusplus
+#  define __BEGIN_DECLS  extern "C" {
+#  define __END_DECLS    }
+# else
+#  define __BEGIN_DECLS
+#  define __END_DECLS
+# endif
 #endif
 #ifndef __THROW
 # define __THROW