bitwiseworks / qtwebengine-chromium-os2

Port of Chromium and related tools to OS/2
9 stars 2 forks source link

Avoid direct <os2.h> inclusion #11

Closed dmik closed 4 years ago

dmik commented 4 years ago

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

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 ) and can be completely ignored.

dmik commented 4 years ago

This is needed for #3.

dmik commented 4 years ago

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.