Bug 113665
Summary: | Make includes of types.h and time.h more consistent | ||
---|---|---|---|
Product: | WebKit | Reporter: | Eric Gregory <eric> |
Component: | WebKitGTK | Assignee: | Nobody <webkit-unassigned> |
Status: | UNCONFIRMED | ||
Severity: | Normal | CC: | bugs-noreply |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Eric Gregory
(Note: I'm not entirely sure where to file this one; I'm putting it under WebKitGTK since I'm building WebKitGTK 1.8.3, but feel free to change the component if there's a better fit.)
The strategy for including time.h and types.h seems inconsistent. For example, in JavaScriptCore/jsc.cpp time.h is included like this:
> #if HAVE(SYS_TIME_H)
> #include <sys/time.h>
> #endif
As far as I'm aware, that's the most platform-independent way to include time.h because the build script sets SYS_TIME_H correctly. But on the other hand, look at WebCore/page/page.h:
> #if OS(SOLARIS)
> #include <sys/time.h> // For time_t structure.
> #endif
This isn't the right way to go; someone probably added that #if because they wanted it to work on Solaris, without realizing other platforms could be affected as well.
The usage of types.h has similar issues, although it doesn't appear the build scripts are setting a #define for types.h.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |