glob: Fix C++ compilation.
authorJohn W. Eaton <jwe@octave.org>
Fri, 8 Jan 2010 09:11:07 +0000 (10:11 +0100)
committerIan Beckwith <ianb@erislabs.net>
Sun, 10 Jan 2010 00:34:02 +0000 (00:34 +0000)
(cherry picked from commit 0906b5f3d776d1a91b4c1f2c244cb01b2c6aabcd)

ChangeLog
lib/glob.in.h

index 18ca2b1..bd5565b 100644 (file)
--- 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.
index 562f1c5..8f32a79 100644 (file)
 #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