glob: Fix C++ compilation.
[pspp] / lib / glob.in.h
index 562f1c52d2f449e5913774ad8bf1b4277fc690e5..8f32a792901067dc561fd79915440a4e2c914399 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