Bug 158470

Summary: [GTK] Fail to build on FreeBSD because locale.h is not included
Product: WebKit Reporter: Ting-Wei Lan <lantw44>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, keith_miller, mark.lam, msaboff, sbarati
Priority: P2    
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Ting-Wei Lan 2016-06-07 02:47:20 PDT
Here are the error messages:

/home/lantw44/webkit/source/WebKit/Source/JavaScriptCore/jsc.cpp:1955:20: error: use of undeclared identifier 'LC_ALL'
    if (!setlocale(LC_ALL, ""))
                   ^
1 error generated.
Source/JavaScriptCore/shell/CMakeFiles/jsc.dir/build.make:62: recipe for target 'Source/JavaScriptCore/shell/CMakeFiles/jsc.dir/__/jsc.cpp.o' failed
Comment 1 Ting-Wei Lan 2016-06-07 02:49:11 PDT
Created attachment 280685 [details]
Patch
Comment 2 Darin Adler 2016-06-07 08:57:36 PDT
Comment on attachment 280685 [details]
Patch

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

> Source/JavaScriptCore/jsc.cpp:114
> +#if PLATFORM(GTK)
> +#include <locale.h>
> +#endif

No reason to put that inside an #if. Should just include this header unconditionally.
Comment 3 Darin Adler 2016-06-07 08:58:13 PDT
Comment on attachment 280685 [details]
Patch

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

>> Source/JavaScriptCore/jsc.cpp:114
>> +#endif
> 
> No reason to put that inside an #if. Should just include this header unconditionally.

Sorry, I don’t mean "no reason", but still, lets include it unconditionally.
Comment 4 Ting-Wei Lan 2016-06-07 09:03:01 PDT
(In reply to comment #3)
> >> Source/JavaScriptCore/jsc.cpp:114
> >> +#endif
> > 
> > No reason to put that inside an #if. Should just include this header unconditionally.
> 
> Sorry, I don’t mean "no reason", but still, lets include it unconditionally.

OK, I did that because setlocale and LC_ALL are only used by PLATFORM(GTK).
Comment 5 Ting-Wei Lan 2016-06-07 09:03:26 PDT
Created attachment 280709 [details]
Patch
Comment 6 WebKit Commit Bot 2016-06-07 09:35:46 PDT
Comment on attachment 280709 [details]
Patch

Clearing flags on attachment: 280709

Committed r201755: <http://trac.webkit.org/changeset/201755>
Comment 7 WebKit Commit Bot 2016-06-07 09:35:50 PDT
All reviewed patches have been landed.  Closing bug.