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