Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid direct <os2.h> inclusion #11

Closed
dmik opened this issue Jun 10, 2020 · 2 comments
Closed

Avoid direct <os2.h> inclusion #11

dmik opened this issue Jun 10, 2020 · 2 comments
Assignees

Comments

@dmik
Copy link
Contributor

dmik commented Jun 10, 2020

A known problem. Groups of declarations in <os2.h> are driven by #define INCL_xxx statements that control which groups should be included. Also, <os2.h> has a typical guard that prevents its repeated inclusion. As a result, if multiple headers including <os2.h> disagreeing about their INCL_ statements end up in a single compilation unit, some groups will not be declared because of the previous inclusion of <os2.h>.

A typical solution to that is use an intermediate file which cumulatively enables all groups needed anywhere in the code. The resulting header parsing overhead is really minor compared to the number and size of other headers (1000s, some of them might be bigger than <os2.h>) and can be completely ignored.

@dmik dmik self-assigned this Jun 10, 2020
@dmik
Copy link
Contributor Author

dmik commented Jun 10, 2020

This is needed for #3.

@dmik
Copy link
Contributor Author

dmik commented Jun 10, 2020

Note that normally this rule does not apply to third_party sources as they are usually projects on their own so they won't have access to this chromium wrapper. If a similar problem arises there, it should be solved using their own similar wrappers.

@dmik dmik closed this as completed in 375c925 Jun 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant