Bug 113665 - Make includes of types.h and time.h more consistent
Summary: Make includes of types.h and time.h more consistent
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-31 14:21 PDT by Eric Gregory
Modified: 2017-03-11 10:55 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Gregory 2013-03-31 14:21:54 PDT
(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.