Bug 92531

Summary: Build fails because of missing header in GregorianDateTime.h
Product: WebKit Reporter: tuxator
Component: PlatformAssignee: Nobody <webkit-unassigned>
Severity: Normal CC: paroga
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Windows XP   
Description Flags
proposed patch
paroga: review-
update paroga: review-

Description tuxator 2012-07-27 12:09:27 PDT
WebKit fails to build with MinGW compiler with the following error:

In file included from Source/JavaScriptCore/runtime/DateConversion.h:45:0,
                 from Source/JavaScriptCore/runtime/DateConversion.cpp:44:
./Source/WTF/wtf/GregorianDateTime.h:71:14: error: expected type-specifier before 'tm'
Source/JavaScriptCore/runtime/DateConversion.cpp: In function 'void JSC::formatTime(const WTF::GregorianDateTime&, char (&)[100])':
Source/JavaScriptCore/runtime/DateConversion.cpp:76:21: error: conversion from 'const WTF::GregorianDateTime' to non-scalar type 'tm' requested
make[1]: *** [Source/JavaScriptCore/runtime/libjavascriptcoregtk_3_0_la-DateConversion.lo] Error 1
make[1]: Leaving directory `/home/pawel/src/webkit'
make: *** [all] Error 2
Comment 1 tuxator 2012-07-27 12:16:24 PDT
Created attachment 155016 [details]
proposed patch
Comment 2 Patrick R. Gansterer 2012-07-27 13:50:57 PDT
Comment on attachment 155016 [details]
proposed patch

View in context: https://bugs.webkit.org/attachment.cgi?id=155016&action=review

> Source/WTF/wtf/GregorianDateTime.h:30
> +#if OS(WINDOWS)

OS(WINDOWS) isn't needed. time.h should get included everywhere
Comment 3 tuxator 2012-07-27 14:03:22 PDT
Created attachment 155045 [details]
Comment 4 Patrick R. Gansterer 2012-07-27 14:07:45 PDT
Comment on attachment 155045 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=155045&action=review

i'll fix the two issues and land this patch

> Source/WTF/ChangeLog:3
> +        Build fails because of missing header in GregorianDateTime.h

since this happens only with mingw this should be mentioned here

> Source/WTF/wtf/GregorianDateTime.h:28
>  #include <wtf/text/CString.h>

1) sort order
2) <wtf/text/CString.h> can be replaced with <wtf/Noncopyable.h>
Comment 5 Patrick R. Gansterer 2012-07-27 14:41:18 PDT
Committed r123917: <http://trac.webkit.org/changeset/123917>