OLD | NEW |
---|---|
1 // Copyright 2007-2011 Baptiste Lepilleur | 1 // Copyright 2007-2011 Baptiste Lepilleur |
2 // Distributed under MIT license, or public domain if desired and | 2 // Distributed under MIT license, or public domain if desired and |
3 // recognized in your jurisdiction. | 3 // recognized in your jurisdiction. |
4 // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE | 4 // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE |
5 | 5 |
6 #if !defined(JSON_IS_AMALGAMATION) | 6 #if !defined(JSON_IS_AMALGAMATION) |
7 # include <json/assertions.h> | 7 # include <json/assertions.h> |
8 # include <json/reader.h> | 8 # include <json/reader.h> |
9 # include <json/value.h> | 9 # include <json/value.h> |
10 # include "json_tool.h" | 10 # include "json_tool.h" |
11 #endif // if !defined(JSON_IS_AMALGAMATION) | 11 #endif // if !defined(JSON_IS_AMALGAMATION) |
12 #include <utility> | 12 #include <utility> |
13 #include <cstdio> | 13 #include <cstdio> |
14 #include <cassert> | 14 #include <cassert> |
15 #include <cstring> | 15 #include <cstring> |
16 #include <stdexcept> | 16 #include <stdexcept> |
17 #ifdef __pnacl__ | |
18 // This file uses the following headers (at least in Reader::parse), but | 17 // This file uses the following headers (at least in Reader::parse), but |
19 // the upstream version doesn't include them because iostream pulls in | 18 // the upstream version doesn't include them because iostream pulls in |
20 // static initializers. This breaks the PNaCl build because it uses | 19 // static initializers. This breaks builds that use libc++ (including PNaCl), |
21 // libc++ which declares getline in <string> (as per the C++ standard) | 20 // because libc++ declares getline in <string> (as per the C++ standard) |
22 // but defines it in <iostream>. The code therefore fails linking, which | 21 // but defines it in <iostream>. The code therefore fails linking, which |
Nico
2014/05/19 19:23:04
As iostream causes static initializers, that seems
| |
23 // these includes fix. | 22 // these includes fix. |
24 #include <string> | 23 #include <string> |
25 #include <iostream> | 24 #include <iostream> |
26 #endif | |
27 | 25 |
28 #if _MSC_VER >= 1400 // VC++ 8.0 | 26 #if _MSC_VER >= 1400 // VC++ 8.0 |
29 #pragma warning( disable : 4996 ) // disable warning about strdup being deprec ated. | 27 #pragma warning( disable : 4996 ) // disable warning about strdup being deprec ated. |
30 #endif | 28 #endif |
31 | 29 |
32 namespace Json { | 30 namespace Json { |
33 | 31 |
34 // Implementation of class Features | 32 // Implementation of class Features |
35 // //////////////////////////////// | 33 // //////////////////////////////// |
36 | 34 |
(...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
919 "Error from reader: %s", | 917 "Error from reader: %s", |
920 reader.getFormattedErrorMessages().c_str()); | 918 reader.getFormattedErrorMessages().c_str()); |
921 | 919 |
922 JSON_FAIL_MESSAGE("reader error"); | 920 JSON_FAIL_MESSAGE("reader error"); |
923 } | 921 } |
924 return sin; | 922 return sin; |
925 } | 923 } |
926 | 924 |
927 | 925 |
928 } // namespace Json | 926 } // namespace Json |
OLD | NEW |