diff options
author | Kirill Ponomarev <krion@FreeBSD.org> | 2004-03-04 19:29:05 +0000 |
---|---|---|
committer | Kirill Ponomarev <krion@FreeBSD.org> | 2004-03-04 19:29:05 +0000 |
commit | 9d51d547e26d57b7e489b3abaeb87ed16a1a068e (patch) | |
tree | f1f6e379f63b6eaad0a84ae4d1175b3400d92e81 /net/xmlrpc-c/files/patch-examples::interop-client::interop-client.cc | |
parent | This does not work with ruby 1.6, but requires ruby 1.8 or later. (diff) |
- Fix build on -current
PR: ports/63752
Submitted by: Ports Fury
Diffstat (limited to 'net/xmlrpc-c/files/patch-examples::interop-client::interop-client.cc')
-rw-r--r-- | net/xmlrpc-c/files/patch-examples::interop-client::interop-client.cc | 108 |
1 files changed, 108 insertions, 0 deletions
diff --git a/net/xmlrpc-c/files/patch-examples::interop-client::interop-client.cc b/net/xmlrpc-c/files/patch-examples::interop-client::interop-client.cc new file mode 100644 index 000000000000..a8bde406790b --- /dev/null +++ b/net/xmlrpc-c/files/patch-examples::interop-client::interop-client.cc @@ -0,0 +1,108 @@ +--- examples/interop-client/interop-client.cc.orig Thu Jun 28 11:54:08 2001 ++++ examples/interop-client/interop-client.cc Tue Mar 2 23:39:39 2004 +@@ -1,8 +1,8 @@ + // Run various interop test cases against a list of servers. + // This code is incomplete. + +-#include <iostream.h> +-#include <fstream.h> ++#include <iostream> ++#include <fstream> + #include <stdexcept> + + #include <XmlRpcCpp.h> +@@ -17,13 +17,13 @@ + //========================================================================= + + class TestResults { +- string m_server_name; +- string m_server_url; ++ std::string m_server_name; ++ std::string m_server_url; + XmlRpcValue m_toolkit_info; + XmlRpcValue m_test_results; + + public: +- TestResults(string server_name, string server_url); ++ TestResults(std::string server_name, std::string server_url); + + }; + +@@ -33,24 +33,24 @@ + //========================================================================= + + static void +-run_interop_tests(const string& server_url_file, +- const string& output_html_file) ++run_interop_tests(const std::string& server_url_file, ++ const std::string& output_html_file) + { +- ifstream urls(server_url_file.c_str()); +- ofstream out(output_html_file.c_str()); ++ std::ifstream urls(server_url_file.c_str()); ++ std::ofstream out(output_html_file.c_str()); + + while (!urls.eof()) { +- string url_info; ++ std::string url_info; + getline(urls, url_info); + size_t comma = url_info.find(','); +- if (comma == string::npos) +- throw domain_error("Lines of " + server_url_file + ++ if (comma == std::string::npos) ++ throw std::domain_error("Lines of " + server_url_file + + " must be of the form \"name,url\""); +- string server_name(url_info, 0, comma); +- string server_url(url_info, comma + 1); ++ std::string server_name(url_info, 0, comma); ++ std::string server_url(url_info, comma + 1); + +- cout << "Name: " << server_name << endl; +- cout << "URL: " << server_url << endl << endl; ++ std::cout << "Name: " << server_name << std::endl; ++ std::cout << "URL: " << server_url << std::endl << std::endl; + } + } + +@@ -62,8 +62,8 @@ + // Print out a usage message. + static void usage (void) + { +- cerr << "Usage: interop-client <server-url-file> <output-html-file>"; +- cerr << endl; ++ std::cerr << "Usage: interop-client <server-url-file> <output-html-file>"; ++ std::cerr << std::endl; + exit(1); + } + +@@ -73,8 +73,8 @@ + // Parse our command-line arguments. + if (argc != 3) + usage(); +- string server_url_file(argv[1]); +- string output_html_file(argv[2]); ++ std::string server_url_file(argv[1]); ++ std::string output_html_file(argv[2]); + + // Start up our client library. + XmlRpcClient::Initialize(NAME, VERSION); +@@ -83,14 +83,14 @@ + try { + run_interop_tests(server_url_file, output_html_file); + } catch (XmlRpcFault& fault) { +- cerr << argv[0] << ": XML-RPC fault #" << fault.getFaultCode() +- << ": " << fault.getFaultString() << endl; ++ std::cerr << argv[0] << ": XML-RPC fault #" << fault.getFaultCode() ++ << ": " << fault.getFaultString() << std::endl; + status = 1; +- } catch (logic_error& err) { +- cerr << argv[0] << ": " << err.what() << endl; ++ } catch (std::logic_error& err) { ++ std::cerr << argv[0] << ": " << err.what() << std::endl; + status = 1; + } catch (...) { +- cerr << argv[0] << ": Unknown exception" << endl; ++ std::cerr << argv[0] << ": Unknown exception" << std::endl; + status = 1; + } + |