Bug 158470 - [GTK] Fail to build on FreeBSD because locale.h is not included
Summary: [GTK] Fail to build on FreeBSD because locale.h is not included
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-07 02:47 PDT by Ting-Wei Lan
Modified: 2016-06-07 09:35 PDT (History)
5 users (show)

See Also:


Attachments
Patch (1.00 KB, patch)
2016-06-07 02:49 PDT, Ting-Wei Lan
no flags Details | Formatted Diff | Diff
Patch (1.05 KB, patch)
2016-06-07 09:03 PDT, Ting-Wei Lan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.