Fix build error if "close" macro is not always visible.
[pspp-builds.git] / src / language / lexer / lexer.h
index b9e936bf994c67cdb7d6952950196f57170b3cf3..b35ea7f54e05d9da00ffbcc23b18d71ebb174b97 100644 (file)
 #include <stdbool.h>
 #include <stddef.h>
 
+/* The following #include avoids a potential problem when Gnulib substitutes
+ * for close() by putting "#define close rpl_close" into <unistd.h>, by
+ * ensuring that every source file that includes this one sees the #define.
+ * (It would probably be better to rename the 'close' member of struct
+ * lex_reader_class.)  */
+#include <unistd.h>
+
 #include "data/identifier.h"
 #include "data/variable.h"
 #include "libpspp/compiler.h"