Commit 6455c698 authored by pbos's avatar pbos Committed by Commit bot

Include <string> and <istream> outside __pnacl__.

Fixes webrtc/ Debug build with libc++ which failed to link std::getline
as this is defined in <istream>. <iostream> causes static initializers
and shouldn't be necessary.

Also adds to README.chromium that the overrides are used too get rid of
static initializers and to build on libc++.

R=thakis@chromium.org
TBR=ronghuawu@chromium.org
BUG=webrtc:3739

Review URL: https://codereview.chromium.org/552013004

Cr-Commit-Position: refs/heads/master@{#293954}
parent 00d842af
...@@ -6,5 +6,9 @@ License File: LICENSE ...@@ -6,5 +6,9 @@ License File: LICENSE
Security Critical: yes Security Critical: yes
Description: Description:
The libjingle/webrtc/liblouis_nacl uses jsoncpp for signaling message serialization and deserialization. The libjingle/webrtc/liblouis_nacl uses jsoncpp for signaling message
serialization and deserialization.
Local modifications:
The overrides are used to eliminate static initializers in json_value.cpp and
json_reader.cpp adds includes for <string> and <istream> to build on libc++.
...@@ -14,16 +14,8 @@ ...@@ -14,16 +14,8 @@
#include <cassert> #include <cassert>
#include <cstring> #include <cstring>
#include <stdexcept> #include <stdexcept>
#ifdef __pnacl__
// This file uses the following headers (at least in Reader::parse), but
// the upstream version doesn't include them because iostream pulls in
// static initializers. This breaks the PNaCl build because it uses
// libc++ which declares getline in <string> (as per the C++ standard)
// but defines it in <iostream>. The code therefore fails linking, which
// these includes fix.
#include <string> #include <string>
#include <iostream> #include <istream>
#endif
#if _MSC_VER >= 1400 // VC++ 8.0 #if _MSC_VER >= 1400 // VC++ 8.0
#pragma warning( disable : 4996 ) // disable warning about strdup being deprecated. #pragma warning( disable : 4996 ) // disable warning about strdup being deprecated.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment