Commit 5f8ec0f5 authored by thakis@chromium.org's avatar thakis@chromium.org

Revert of Unconditionally include <string> and <iostream> in json_reader.cpp...

Revert of Unconditionally include <string> and <iostream> in json_reader.cpp (https://codereview.chromium.org/291803003/)

Reason for revert:
This adds a static initializer.

Original issue's description:
> Unconditionally include <string> and <iostream> in json_reader.cpp
> Non-PNaCl builds that use libc++ also require these headers.
> 
> BUG=None
> R=mallinath@chromium.org
> 
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=271429

TBR=mallinath@chromium.org,ronghuawu@chromium.org,glider@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=None

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271446 0039d316-1c4b-4281-b951-d872f2087c98
parent 9d80c82b
......@@ -14,14 +14,16 @@
#include <cassert>
#include <cstring>
#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 builds that use libc++ (including PNaCl),
// because libc++ declares getline in <string> (as per the C++ standard)
// 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 <iostream>
#endif
#if _MSC_VER >= 1400 // VC++ 8.0
#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