Robert Shearman rob@codeweavers.com writes:
If we do need it, we can include it in the .l file after config.h and with an appropriate include guard.
You should instead put a %option in the files that need it.
Alexandre Julliard wrote:
Robert Shearman rob@codeweavers.com writes:
If we do need it, we can include it in the .l file after config.h and with an appropriate include guard.
You should instead put a %option in the files that need it.
The point is that all of the files need it. Only tools/widl/parser.l needs to include unistd.h and it already does so manually.
Robert Shearman rob@codeweavers.com writes:
The point is that all of the files need it. Only tools/widl/parser.l needs to include unistd.h and it already does so manually.
Then you should put the option in all the files. That sort of thing doesn't belong in the global make rules.
Alexandre Julliard wrote:
Robert Shearman rob@codeweavers.com writes:
The point is that all of the files need it. Only tools/widl/parser.l needs to include unistd.h and it already does so manually.
Then you should put the option in all the files. That sort of thing doesn't belong in the global make rules.
I disagree. The global make rules, among other things, should enforce policies whether this be telling the C compiler to error on certain non-portable constructs like declarations after statements or telling flex not to output code that includes headers that might not be present, like unistd.h.
However, I've sent a patch that turns the option on individually for each file so that you can choose which route to take.
Robert Shearman rob@codeweavers.com writes:
I disagree. The global make rules, among other things, should enforce policies whether this be telling the C compiler to error on certain non-portable constructs like declarations after statements or telling flex not to output code that includes headers that might not be present, like unistd.h.
Yes, but policies about headers don't always apply globally. Some parts of the project, like the server, are Unix-only, and using unistd.h in those parts is perfectly legitimate.