summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
14319bf)
Harry Thijssen <pspp@sjpaes.nl> reported the following errors
with recent Gnulib on Win32:
src/language/lexer/lexer.c: In function 'lex_source_destroy':
src/language/lexer/lexer.c:1455: error: 'const struct
lex_reader_class' has no member named 'rpl_close'
src/language/lexer/lexer.c:1456: error: 'const struct
lex_reader_class' has no member named 'rpl_close'
The problem was that the Gnulib substitute for <unistd.h>
defines close to rpl_close, but this macro definition wasn't
visible when lexer.c included lexer.h and became visible later.
This commit fixes the problem by making sure that the macro
definition is always visible in lexer.h.
A better solution would probably be to rename the 'close'
member to something other than a standard POSIX function name.
The change to control-stack.h is just precautionary; Harry
didn't report the same problem there.
/* PSPP - a program for statistical analysis.
/* PSPP - a program for statistical analysis.
- Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1997-9, 2000, 2011 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
+/* 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
+ * ctl_class.) */
+#include <unistd.h>
+
struct ctl_class
{
const char *start_name; /* e.g. LOOP. */
struct ctl_class
{
const char *start_name; /* e.g. LOOP. */
#include <stdbool.h>
#include <stddef.h>
#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"
#include "data/identifier.h"
#include "data/variable.h"
#include "libpspp/compiler.h"