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 | |
19 // the upstream version doesn't include them because iostream pulls in | |
20 // static initializers. This breaks the PNaCl build because it uses | |
21 // libc++ which declares getline in <string> (as per the C++ standard) | |
22 // but defines it in <iostream>. The code therefore fails linking, which | |
23 // these includes fix. | |
24 #include <string> | 17 #include <string> |
25 #include <iostream> | 18 #include <istream> |
26 #endif | |
27 | 19 |
28 #if _MSC_VER >= 1400 // VC++ 8.0 | 20 #if _MSC_VER >= 1400 // VC++ 8.0 |
29 #pragma warning( disable : 4996 ) // disable warning about strdup being deprec
ated. | 21 #pragma warning( disable : 4996 ) // disable warning about strdup being deprec
ated. |
30 #endif | 22 #endif |
31 | 23 |
32 namespace Json { | 24 namespace Json { |
33 | 25 |
34 // Implementation of class Features | 26 // Implementation of class Features |
35 // //////////////////////////////// | 27 // //////////////////////////////// |
36 | 28 |
(...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
919 "Error from reader: %s", | 911 "Error from reader: %s", |
920 reader.getFormattedErrorMessages().c_str()); | 912 reader.getFormattedErrorMessages().c_str()); |
921 | 913 |
922 JSON_FAIL_MESSAGE("reader error"); | 914 JSON_FAIL_MESSAGE("reader error"); |
923 } | 915 } |
924 return sin; | 916 return sin; |
925 } | 917 } |
926 | 918 |
927 | 919 |
928 } // namespace Json | 920 } // namespace Json |
OLD | NEW |