Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 449058 Details for
Bug 596078
dev-cpp/pficommon-1.3.1.0 : ../.../server.cpp:164:33: error: template argument 1 is invalid
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
pficommon-1.3.1.0-gcc6.patch
pficommon-1.3.1.0-gcc6.patch (text/plain), 28.97 KB, created by
Peter Levine
on 2016-10-04 00:05:41 UTC
(
hide
)
Description:
pficommon-1.3.1.0-gcc6.patch
Filename:
MIME Type:
Creator:
Peter Levine
Created:
2016-10-04 00:05:41 UTC
Size:
28.97 KB
patch
obsolete
>diff -Naur pficommon-1.3.1.0.old/src/concurrent/pcbuf_test.cpp pficommon-1.3.1.0/src/concurrent/pcbuf_test.cpp >--- pficommon-1.3.1.0.old/src/concurrent/pcbuf_test.cpp 2016-10-03 19:57:38.869866515 -0400 >+++ pficommon-1.3.1.0/src/concurrent/pcbuf_test.cpp 2016-10-03 19:57:49.392789358 -0400 >@@ -151,7 +151,7 @@ > // start consumers > vector<shared_ptr<thread> > consumers(consumer_num); > for (size_t i = 0; i < consumers.size(); i++) { >- function<void(void)> f = bind(consumer_func, >+ pfi::lang::function<void(void)> f = bind(consumer_func, > &q, > &shutdown_flag, > &consumer_histgram, >@@ -163,7 +163,7 @@ > // start producers > vector<shared_ptr<thread> > producers(producer_num); > for (size_t i = 0; i < producers.size(); i++) { >- function<void(void)> f = bind(producer_func, >+ pfi::lang::function<void(void)> f = bind(producer_func, > &q, > produced_data_min, > produced_data_max, >diff -Naur pficommon-1.3.1.0.old/src/concurrent/thread.cpp pficommon-1.3.1.0/src/concurrent/thread.cpp >--- pficommon-1.3.1.0.old/src/concurrent/thread.cpp 2016-10-03 19:57:38.869866515 -0400 >+++ pficommon-1.3.1.0/src/concurrent/thread.cpp 2016-10-03 19:57:49.392789358 -0400 >@@ -44,7 +44,7 @@ > > class thread::impl : noncopyable{ > public: >- impl(const function<void()> &f); >+ impl(const pfi::lang::function<void()> &f); > ~impl(); > > bool start(); >@@ -57,10 +57,10 @@ > bool running; > pthread_t tid; > >- function<void()> f; >+ pfi::lang::function<void()> f; > }; > >-thread::thread(const function<void()> &f) >+thread::thread(const pfi::lang::function<void()> &f) > :pimpl(new impl(f)) > { > } >@@ -115,7 +115,7 @@ > #endif > } > >-thread::impl::impl(const function<void()> &f) >+thread::impl::impl(const pfi::lang::function<void()> &f) > : running(false) > , tid(0) > , f(f) >@@ -134,7 +134,7 @@ > if (running) return false; > > running=true; >- function<void()> *pf=new function<void()>(f); >+ pfi::lang::function<void()> *pf=new pfi::lang::function<void()>(f); > int res=pthread_create(&tid,NULL,start_routine,(void*)pf); > if (res!=0){ > delete pf; >@@ -177,7 +177,7 @@ > > void *thread::impl::start_routine(void *p) > { >- function<void()> *pf=reinterpret_cast<function<void()>*>(p); >+ pfi::lang::function<void()> *pf=reinterpret_cast<pfi::lang::function<void()>*>(p); > (*pf)(); > delete pf; > return NULL; >diff -Naur pficommon-1.3.1.0.old/src/data/serialization_test.cpp pficommon-1.3.1.0/src/data/serialization_test.cpp >--- pficommon-1.3.1.0.old/src/data/serialization_test.cpp 2016-10-03 19:57:38.869866515 -0400 >+++ pficommon-1.3.1.0/src/data/serialization_test.cpp 2016-10-03 19:57:49.392789358 -0400 >@@ -297,25 +297,25 @@ > > TEST(serialization, reflect) { > { >- shared_ptr<type_rep> t=get_type<vector<uint16_t> >(); >+ pfi::lang::shared_ptr<type_rep> t=get_type<vector<uint16_t> >(); > ostringstream oss; > t->print(oss); > EXPECT_EQ(oss.str(), "array<uint(2)>"); > } > { >- shared_ptr<type_rep> t=get_type<vector<int32_t> >(); >+ pfi::lang::shared_ptr<type_rep> t=get_type<vector<int32_t> >(); > ostringstream oss; > t->print(oss); > EXPECT_EQ(oss.str(), "array<int(4)>"); > } > { >- shared_ptr<type_rep> t=get_type<map<int, string> >(); >+ pfi::lang::shared_ptr<type_rep> t=get_type<map<int, string> >(); > ostringstream oss; > t->print(oss); > EXPECT_EQ(oss.str(), "map<int(4),string>"); > } > { >- shared_ptr<type_rep> t=get_type<vector<map<vector<int>, string> > >(); >+ pfi::lang::shared_ptr<type_rep> t=get_type<vector<map<vector<int>, string> > >(); > ostringstream oss; > t->print(oss); > EXPECT_EQ(oss.str(), "array<map<array<int(4)>,string>>"); >diff -Naur pficommon-1.3.1.0.old/src/database/mysql/connection.cpp pficommon-1.3.1.0/src/database/mysql/connection.cpp >--- pficommon-1.3.1.0.old/src/database/mysql/connection.cpp 2016-10-03 19:57:38.870866508 -0400 >+++ pficommon-1.3.1.0/src/database/mysql/connection.cpp 2016-10-03 19:57:49.392789358 -0400 >@@ -145,20 +145,20 @@ > } > > int mysql_connection::run(const string &sql, >- const vector<shared_ptr<sql_value> > &args) >+ const vector<pfi::lang::shared_ptr<sql_value> > &args) > { > if (conn->get() == NULL) reconnect(); > > // TODO: optimize > try { >- shared_ptr<statement> stat(prepare(sql)); >+ pfi::lang::shared_ptr<statement> stat(prepare(sql)); > return stat->execute(args); > } > catch (const connection_error &e) { > reconnect(); // this function rethrows an exception if necessary > } > >- shared_ptr<statement> stat(prepare(sql)); >+ pfi::lang::shared_ptr<statement> stat(prepare(sql)); > return stat->execute(args); > } > >diff -Naur pficommon-1.3.1.0.old/src/database/mysql/statement.cpp pficommon-1.3.1.0/src/database/mysql/statement.cpp >--- pficommon-1.3.1.0.old/src/database/mysql/statement.cpp 2016-10-03 19:57:38.870866508 -0400 >+++ pficommon-1.3.1.0/src/database/mysql/statement.cpp 2016-10-03 19:59:27.620233480 -0400 >@@ -48,7 +48,7 @@ > namespace database{ > namespace mysql{ > >-mysql_statement::mysql_statement(shared_ptr<mysql_connection_impl, >+mysql_statement::mysql_statement(pfi::lang::shared_ptr<mysql_connection_impl, > pfi::concurrent::threading_model::multi_thread> &conn, > const string &query) > :conn(conn),meta(NULL) >@@ -98,7 +98,7 @@ > mysql_stmt_close(stmt); > } > >-int mysql_statement::execute(const vector<shared_ptr<sql_value> > &args) >+int mysql_statement::execute(const vector<pfi::lang::shared_ptr<sql_value> > &args) > { > if (param_count!=args.size()){ > ostringstream msg; >@@ -146,7 +146,7 @@ > return 0; > } > >-bool mysql_statement::fetch_row(vector<shared_ptr<sql_value> > &row) >+bool mysql_statement::fetch_row(vector<pfi::lang::shared_ptr<sql_value> > &row) > { > static const size_t INIT_BUF_SIZE = 16*1024; > >diff -Naur pficommon-1.3.1.0.old/src/database/mysql/value.cpp pficommon-1.3.1.0/src/database/mysql/value.cpp >--- pficommon-1.3.1.0.old/src/database/mysql/value.cpp 2016-10-03 19:57:38.870866508 -0400 >+++ pficommon-1.3.1.0/src/database/mysql/value.cpp 2016-10-03 19:57:49.392789358 -0400 >@@ -88,14 +88,14 @@ > } > } > >-shared_ptr<sql_value> from_bind(MYSQL_BIND &bind) >+pfi::lang::shared_ptr<sql_value> from_bind(MYSQL_BIND &bind) > { > sql_value *p=from_bind_p(bind); >- if (!p) return shared_ptr<sql_value>(); >- return shared_ptr<sql_value>(p); >+ if (!p) return pfi::lang::shared_ptr<sql_value>(); >+ return pfi::lang::shared_ptr<sql_value>(p); > } > >-size_t bind_length(shared_ptr<sql_value> p) >+size_t bind_length(pfi::lang::shared_ptr<sql_value> p) > { > if (!p) return 0; > >@@ -119,7 +119,7 @@ > } > } > >-void to_bind(shared_ptr<sql_value> p, MYSQL_BIND &bind) >+void to_bind(pfi::lang::shared_ptr<sql_value> p, MYSQL_BIND &bind) > { > if (!p){ > bind.is_null=NULL; >diff -Naur pficommon-1.3.1.0.old/src/database/postgresql/connection.cpp pficommon-1.3.1.0/src/database/postgresql/connection.cpp >--- pficommon-1.3.1.0.old/src/database/postgresql/connection.cpp 2016-10-03 19:57:38.870866508 -0400 >+++ pficommon-1.3.1.0/src/database/postgresql/connection.cpp 2016-10-03 19:57:49.392789358 -0400 >@@ -108,9 +108,9 @@ > (void)connection::run("ROLLBACK"); > } > >-int postgresql_connection::run(const string &sql, const vector<shared_ptr<sql_value> > &args) >+int postgresql_connection::run(const string &sql, const vector<pfi::lang::shared_ptr<sql_value> > &args) > { >- shared_ptr<statement> stat(prepare(sql)); >+ pfi::lang::shared_ptr<statement> stat(prepare(sql)); > return stat->execute(args); > } > >diff -Naur pficommon-1.3.1.0.old/src/database/postgresql/statement.cpp pficommon-1.3.1.0/src/database/postgresql/statement.cpp >--- pficommon-1.3.1.0.old/src/database/postgresql/statement.cpp 2016-10-03 19:57:38.870866508 -0400 >+++ pficommon-1.3.1.0/src/database/postgresql/statement.cpp 2016-10-03 19:57:49.393789351 -0400 >@@ -58,7 +58,7 @@ > return oss.str(); > } > >-postgresql_statement::postgresql_statement(shared_ptr<postgresql_connection_impl> conn, >+postgresql_statement::postgresql_statement(pfi::lang::shared_ptr<postgresql_connection_impl> conn, > const string &query) > : conn(conn) > { >@@ -72,10 +72,10 @@ > { > } > >-int postgresql_statement::execute(const vector<shared_ptr<sql_value> > &args) >+int postgresql_statement::execute(const vector<pfi::lang::shared_ptr<sql_value> > &args) > { > int n=args.size(); >- vector<shared_ptr<string> > sparams(n); >+ vector<pfi::lang::shared_ptr<string> > sparams(n); > vector<const char *> params(n); > vector<int> param_lens(n); > >@@ -95,8 +95,8 @@ > if (r==NULL) > throw database_error("PQexecPrepared failed"); > >- shared_ptr<postgresql_result> rtmp= >- shared_ptr<postgresql_result>(new postgresql_result(r)); >+ pfi::lang::shared_ptr<postgresql_result> rtmp= >+ pfi::lang::shared_ptr<postgresql_result>(new postgresql_result(r)); > > if (!rtmp->command_ok() && > !rtmp->tuple_ok()) >@@ -108,7 +108,7 @@ > return 0; > } > >-bool postgresql_statement::fetch_row(vector<shared_ptr<sql_value> > &row) >+bool postgresql_statement::fetch_row(vector<pfi::lang::shared_ptr<sql_value> > &row) > { > if (!res) return false; > return res->fetch_row(row); >diff -Naur pficommon-1.3.1.0.old/src/database/postgresql/value.cpp pficommon-1.3.1.0/src/database/postgresql/value.cpp >--- pficommon-1.3.1.0.old/src/database/postgresql/value.cpp 2016-10-03 19:57:38.870866508 -0400 >+++ pficommon-1.3.1.0/src/database/postgresql/value.cpp 2016-10-03 19:57:49.393789351 -0400 >@@ -115,36 +115,36 @@ > } > } > >-shared_ptr<sql_value> str_to_sql(char *p, int len, int is_null, Oid oid) >+pfi::lang::shared_ptr<sql_value> str_to_sql(char *p, int len, int is_null, Oid oid) > { >- if (is_null) return shared_ptr<sql_value>(); >+ if (is_null) return pfi::lang::shared_ptr<sql_value>(); > sql_type t=oid_to_sql_type(oid); >- return shared_ptr<sql_value>(make_sql_value(p, len, t)); >+ return pfi::lang::shared_ptr<sql_value>(make_sql_value(p, len, t)); > } > >-shared_ptr<string> sql_to_str(shared_ptr<sql_value> p) >+pfi::lang::shared_ptr<string> sql_to_str(pfi::lang::shared_ptr<sql_value> p) > { >- if (!p) return shared_ptr<string>(); >+ if (!p) return pfi::lang::shared_ptr<string>(); > > switch(p->type()){ > case SQL_BOOL:{ > static const string t("true"); > static const string f("false"); >- return shared_ptr<string>(new string(dynamic_cast<sql_bool*>(p.get())->get()?t:f)); >+ return pfi::lang::shared_ptr<string>(new string(dynamic_cast<sql_bool*>(p.get())->get()?t:f)); > } > case SQL_STRING:{ >- return shared_ptr<string>(new string(dynamic_cast<sql_string*>(p.get())->get())); >+ return pfi::lang::shared_ptr<string>(new string(dynamic_cast<sql_string*>(p.get())->get())); > } > case SQL_INT32:{ >- return shared_ptr<string>(new string(lexical_cast<string>(dynamic_cast<sql_int32*>(p.get())->get()))); >+ return pfi::lang::shared_ptr<string>(new string(lexical_cast<string>(dynamic_cast<sql_int32*>(p.get())->get()))); > } > case SQL_INT64:{ >- return shared_ptr<string>(new string(lexical_cast<string>(dynamic_cast<sql_int64*>(p.get())->get()))); >+ return pfi::lang::shared_ptr<string>(new string(lexical_cast<string>(dynamic_cast<sql_int64*>(p.get())->get()))); > } > case SQL_FLOAT:{ > ostringstream oss; > oss<<setiosflags(ios::fixed)<<setprecision(10)<<dynamic_cast<sql_float*>(p.get())->get(); >- return shared_ptr<string>(new string(oss.str())); >+ return pfi::lang::shared_ptr<string>(new string(oss.str())); > } > case SQL_TIMESTAMP:{ > calendar_time ct(dynamic_cast<sql_timestamp*>(p.get())->get()); >@@ -159,10 +159,10 @@ > strftime(buf, sizeof(buf), "%Y-%m-%d %T.", &t); > sprintf(ubuf, "%06d", ct.usec); > strcat(buf, ubuf); >- return shared_ptr<string>(new string(buf)); >+ return pfi::lang::shared_ptr<string>(new string(buf)); > } > case SQL_UNKNOWN:{ >- return shared_ptr<string>(new string(dynamic_cast<sql_unknown*>(p.get())->get())); >+ return pfi::lang::shared_ptr<string>(new string(dynamic_cast<sql_unknown*>(p.get())->get())); > } > default: > abort(); >diff -Naur pficommon-1.3.1.0.old/src/math/random_test.cpp pficommon-1.3.1.0/src/math/random_test.cpp >--- pficommon-1.3.1.0.old/src/math/random_test.cpp 2016-10-03 19:57:38.870866508 -0400 >+++ pficommon-1.3.1.0/src/math/random_test.cpp 2016-10-03 19:57:49.393789351 -0400 >@@ -52,7 +52,7 @@ > > > template <class t> >-vector<t> moment(int max_mom, int size, function<t()> &val){ >+vector<t> moment(int max_mom, int size, pfi::lang::function<t()> &val){ > vector<t> mom(max_mom,0); > for(int i=0;i<size; ++i){ > t x=val(); // test >@@ -100,9 +100,9 @@ > > TEST(random, time_seed){ > typedef pfi::math::random::random<mersenne_twister> mt; >- shared_ptr<mt> r1(new mt); >+ pfi::lang::shared_ptr<mt> r1(new mt); > usleep(5); >- shared_ptr<mt> r2(new mt); >+ pfi::lang::shared_ptr<mt> r2(new mt); > for(int i=0;i<10;++i){ > int x=r1->next_int(), y=r2->next_int(); > EXPECT_TRUE(x!=y) << "x=" << x << " " << "y=" << y << endl; >@@ -110,7 +110,7 @@ > > } > >-bool is_standard_deviation(function<double()> f, bool expectation=true){ >+bool is_standard_deviation(pfi::lang::function<double()> f, bool expectation=true){ > // if f is standard deviation, it passes approx 99.99% probability. > > int size=1<<22; >diff -Naur pficommon-1.3.1.0.old/src/network/cgi/inserter.cpp pficommon-1.3.1.0/src/network/cgi/inserter.cpp >--- pficommon-1.3.1.0.old/src/network/cgi/inserter.cpp 2016-10-03 19:57:38.871866500 -0400 >+++ pficommon-1.3.1.0/src/network/cgi/inserter.cpp 2016-10-03 19:57:49.393789351 -0400 >@@ -50,8 +50,8 @@ > > tag_inserter::~tag_inserter() > { >- shared_ptr<tag_elem> elem(new tag_elem(name, attrs)); >- vector<shared_ptr<html_elem> > children=b.leave(); >+ pfi::lang::shared_ptr<tag_elem> elem(new tag_elem(name, attrs)); >+ vector<pfi::lang::shared_ptr<html_elem> > children=b.leave(); > for (int i=0;i<(int)children.size();i++) > elem->add_child(children[i]); > b.push(elem); >@@ -59,12 +59,12 @@ > > text_inserter::text_inserter(const string &text, xhtml_builder &b) > { >- b.push(shared_ptr<html_elem>(new text_elem(text))); >+ b.push(pfi::lang::shared_ptr<html_elem>(new text_elem(text))); > } > > prim_inserter::prim_inserter(const string &text, xhtml_builder &b) > { >- b.push(shared_ptr<html_elem>(new prim_elem(text))); >+ b.push(pfi::lang::shared_ptr<html_elem>(new prim_elem(text))); > } > > } // cgi >diff -Naur pficommon-1.3.1.0.old/src/network/cgi/server.cpp pficommon-1.3.1.0/src/network/cgi/server.cpp >--- pficommon-1.3.1.0.old/src/network/cgi/server.cpp 2016-10-03 19:57:38.871866500 -0400 >+++ pficommon-1.3.1.0/src/network/cgi/server.cpp 2016-10-03 19:57:49.393789351 -0400 >@@ -161,12 +161,12 @@ > <<", thread-num="<<thread_num > <<", timeout="<<ssock->timeout()<<endl; > >- ths=vector<shared_ptr<thread> >(thread_num); >- vector<shared_ptr<cgi, threading_model::multi_thread> > cgis(thread_num); >+ ths=vector<pfi::lang::shared_ptr<thread> >(thread_num); >+ vector<pfi::lang::shared_ptr<cgi, threading_model::multi_thread> > cgis(thread_num); > > for (int i=0; i<thread_num; i++){ >- cgis[i]=shared_ptr<cgi, threading_model::multi_thread>(dynamic_cast<cgi*>(c.clone())); >- ths[i]=shared_ptr<thread>(new thread(bind(&run_server::process, this, ssock, cgis[i]))); >+ cgis[i]=pfi::lang::shared_ptr<cgi, threading_model::multi_thread>(dynamic_cast<cgi*>(c.clone())); >+ ths[i]=pfi::lang::shared_ptr<thread>(new thread(bind(&run_server::process, this, ssock, cgis[i]))); > if (!ths[i]->start()){ > ostringstream oss; > oss<<"unable to start thread"<<endl; >@@ -185,7 +185,7 @@ > ths.clear(); > } > >-static shared_ptr<http::response> gen_resp(stringstream &ss) >+static pfi::lang::shared_ptr<http::response> gen_resp(stringstream &ss) > { > http::header head(ss); > >@@ -210,7 +210,7 @@ > head.erase("status"); > } > >- shared_ptr<http::response> resp(new http::response(code, reason)); >+ pfi::lang::shared_ptr<http::response> resp(new http::response(code, reason)); > > head["Content-Type"]=content_type; > >@@ -232,10 +232,10 @@ > } > > void run_server::process(socket_type ssock, >- shared_ptr<cgi, threading_model::multi_thread> cc) >+ pfi::lang::shared_ptr<cgi, threading_model::multi_thread> cc) > { > for (;;){ >- shared_ptr<stream_socket> sock(ssock->accept()); >+ pfi::lang::shared_ptr<stream_socket> sock(ssock->accept()); > if (!sock) continue; > > if (ssock->timeout()>0 && !sock->set_timeout(ssock->timeout())) >@@ -272,7 +272,7 @@ > > cc->exec(req.body(), sout, cerr, env); > >- shared_ptr<http::response> resp=gen_resp(sout); >+ pfi::lang::shared_ptr<http::response> resp=gen_resp(sout); > resp->send(sock); > } > catch(const exception &e){ >diff -Naur pficommon-1.3.1.0.old/src/network/http/base.cpp pficommon-1.3.1.0/src/network/http/base.cpp >--- pficommon-1.3.1.0.old/src/network/http/base.cpp 2016-10-03 19:57:38.871866500 -0400 >+++ pficommon-1.3.1.0/src/network/http/base.cpp 2016-10-03 19:57:49.393789351 -0400 >@@ -61,7 +61,7 @@ > { > } > >-void header::read_header(function<bool(string*)> f) >+void header::read_header(pfi::lang::function<bool(string*)> f) > { > string line, key, val; > if (!f(&line)) >@@ -124,7 +124,7 @@ > return sock->getline(*str, line_limit); > } > >-header::header(shared_ptr<stream_socket> sock) >+header::header(pfi::lang::shared_ptr<stream_socket> sock) > { > read_header(bind(&socket_getline, sock.get(), _1, line_limit)); > } >@@ -211,7 +211,7 @@ > return dat.end(); > } > >-void header::send(shared_ptr<stream_socket> sock) >+void header::send(pfi::lang::shared_ptr<stream_socket> sock) > { > for (int i=0;i<(int)dat.size();i++){ > string line=dat[i].first+": "+dat[i].second+"\r\n"; >@@ -228,7 +228,7 @@ > public: > typedef C char_type; > >- basic_httpbody_chunked_streambuf(shared_ptr<stream_socket> sock) >+ basic_httpbody_chunked_streambuf(pfi::lang::shared_ptr<stream_socket> sock) > : sock(sock) > , chunk_rest(0) > , buf(buf_size) >@@ -321,7 +321,7 @@ > iss>>hex>>chunk_rest; > } > >- shared_ptr<stream_socket> sock; >+ pfi::lang::shared_ptr<stream_socket> sock; > > int chunk_rest; > >@@ -334,7 +334,7 @@ > public: > typedef C char_type; > >- basic_httpbody_streambuf(shared_ptr<stream_socket> sock, int length) >+ basic_httpbody_streambuf(pfi::lang::shared_ptr<stream_socket> sock, int length) > : sock(sock) > , rest(length) > , buf(T::eof()){ >@@ -359,7 +359,7 @@ > } > > private: >- shared_ptr<stream_socket> sock; >+ pfi::lang::shared_ptr<stream_socket> sock; > > int rest; > int buf; >@@ -368,7 +368,7 @@ > template <class C, class T=char_traits<C> > > class basic_httpbody_chunked_stream : public basic_iostream<C,T>{ > public: >- basic_httpbody_chunked_stream(shared_ptr<stream_socket> sock) >+ basic_httpbody_chunked_stream(pfi::lang::shared_ptr<stream_socket> sock) > : basic_iostream<C,T>() > , buf(sock){ > this->init(&buf); >@@ -380,7 +380,7 @@ > template <class C, class T=char_traits<C> > > class basic_httpbody_stream : public basic_iostream<C,T>{ > public: >- basic_httpbody_stream(shared_ptr<stream_socket> sock, int len) >+ basic_httpbody_stream(pfi::lang::shared_ptr<stream_socket> sock, int len) > : basic_iostream<C,T>() > , buf(sock, len){ > this->init(&buf); >@@ -406,7 +406,7 @@ > { > } > >-request::request(shared_ptr<stream_socket> sock) >+request::request(pfi::lang::shared_ptr<stream_socket> sock) > : method_("") > , uri_("/") > , version_(1,1) >@@ -438,11 +438,11 @@ > > // body > if (cicmp(header_["Transfer-Encoding"],"chunked")) >- stream=shared_ptr<iostream>(new basic_httpbody_chunked_stream<char>(sock)); >+ stream=pfi::lang::shared_ptr<iostream>(new basic_httpbody_chunked_stream<char>(sock)); > else if (header_["Content-Length"]!="") >- stream=shared_ptr<iostream>(new basic_httpbody_stream<char>(sock, lexical_cast<int>(header_["Content-Length"]))); >+ stream=pfi::lang::shared_ptr<iostream>(new basic_httpbody_stream<char>(sock, lexical_cast<int>(header_["Content-Length"]))); > else >- stream=shared_ptr<iostream>(new socketstream(sock)); >+ stream=pfi::lang::shared_ptr<iostream>(new socketstream(sock)); > } > > request::~request() >@@ -474,7 +474,7 @@ > return *stream; > } > >-void request::send(shared_ptr<stream_socket> sock) >+void request::send(pfi::lang::shared_ptr<stream_socket> sock) > { > stringstream *ss=dynamic_cast<stringstream*>(stream.get()); > if (!ss) throw http_exception("body is not stringstream"); >@@ -499,7 +499,7 @@ > if (sock->flush()>=0) > throw http_exception("flush failed"); > if (dat.length()==0) >- stream=shared_ptr<iostream>(new socketstream(sock)); >+ stream=pfi::lang::shared_ptr<iostream>(new socketstream(sock)); > } > > response::response() >@@ -518,7 +518,7 @@ > { > } > >-response::response(shared_ptr<stream_socket> sock) >+response::response(pfi::lang::shared_ptr<stream_socket> sock) > { > // status-line > { >@@ -546,11 +546,11 @@ > > // body > if (cicmp(header_["Transfer-Encoding"],"chunked")) >- stream=shared_ptr<iostream>(new basic_httpbody_chunked_stream<char>(sock)); >+ stream=pfi::lang::shared_ptr<iostream>(new basic_httpbody_chunked_stream<char>(sock)); > else if (header_["Content-Length"]!="") >- stream=shared_ptr<iostream>(new basic_httpbody_stream<char>(sock, lexical_cast<int>(header_["Content-Length"]))); >+ stream=pfi::lang::shared_ptr<iostream>(new basic_httpbody_stream<char>(sock, lexical_cast<int>(header_["Content-Length"]))); > else >- stream=shared_ptr<iostream>(new socketstream(sock)); >+ stream=pfi::lang::shared_ptr<iostream>(new socketstream(sock)); > } > > response::~response() >@@ -582,7 +582,7 @@ > return *stream; > } > >-void response::send(shared_ptr<stream_socket> sock) >+void response::send(pfi::lang::shared_ptr<stream_socket> sock) > { > stringstream *ss=dynamic_cast<stringstream*>(stream.get()); > if (!ss) throw http_exception("body is not stringstream"); >@@ -607,7 +607,7 @@ > if (sock->flush()>=0) > throw http_exception("flush failed"); > if (dat.length()==0) >- stream=shared_ptr<iostream>(new socketstream(sock)); >+ stream=pfi::lang::shared_ptr<iostream>(new socketstream(sock)); > } > > } // http >diff -Naur pficommon-1.3.1.0.old/src/network/mprpc/rpc_server.cpp pficommon-1.3.1.0/src/network/mprpc/rpc_server.cpp >--- pficommon-1.3.1.0.old/src/network/mprpc/rpc_server.cpp 2016-10-03 19:57:38.871866500 -0400 >+++ pficommon-1.3.1.0/src/network/mprpc/rpc_server.cpp 2016-10-03 19:57:49.393789351 -0400 >@@ -80,9 +80,9 @@ > if (!basic_server::create(port)) > return false; > >- std::vector<shared_ptr<thread> > ths(nthreads); >+ std::vector<pfi::lang::shared_ptr<thread> > ths(nthreads); > for (int i=0; i<nthreads; i++) { >- ths[i] = shared_ptr<thread>(new thread( >+ ths[i] = pfi::lang::shared_ptr<thread>(new thread( > pfi::lang::bind(&rpc_server::process, this))); > if (!ths[i]->start()) return false; > } >diff -Naur pficommon-1.3.1.0.old/src/network/rpc/base.cpp pficommon-1.3.1.0/src/network/rpc/base.cpp >--- pficommon-1.3.1.0.old/src/network/rpc/base.cpp 2016-10-03 19:57:38.871866500 -0400 >+++ pficommon-1.3.1.0/src/network/rpc/base.cpp 2016-10-03 19:57:49.393789351 -0400 >@@ -59,20 +59,20 @@ > { > } > >-void rpc_server::add(const string &name, shared_ptr<invoker_base> invoker) >+void rpc_server::add(const string &name, pfi::lang::shared_ptr<invoker_base> invoker) > { > funcs[name]=invoker; > } > > bool rpc_server::serv(uint16_t port, int nthreads) > { >- shared_ptr<server_socket, threading_model::multi_thread> ssock(new server_socket()); >+ pfi::lang::shared_ptr<server_socket, threading_model::multi_thread> ssock(new server_socket()); > if (!ssock->create(port)) > return false; > >- vector<shared_ptr<thread> > ths(nthreads); >+ vector<pfi::lang::shared_ptr<thread> > ths(nthreads); > for (int i=0; i<nthreads; i++){ >- ths[i]=shared_ptr<thread>(new thread(bind(&rpc_server::process, this, ssock))); >+ ths[i]=pfi::lang::shared_ptr<thread>(new thread(bind(&rpc_server::process, this, ssock))); > if (!ths[i]->start()) return false; > } > for (int i=0; i<nthreads; i++) >@@ -80,10 +80,10 @@ > return true; > } > >-void rpc_server::process(shared_ptr<server_socket, threading_model::multi_thread> ssock) >+void rpc_server::process(pfi::lang::shared_ptr<server_socket, threading_model::multi_thread> ssock) > { > for (;;){ >- shared_ptr<stream_socket> sock(ssock->accept()); >+ pfi::lang::shared_ptr<stream_socket> sock(ssock->accept()); > if (!sock) continue; > sock->set_nodelay(true); > >@@ -139,11 +139,11 @@ > { > } > >-shared_ptr<socketstream> rpc_client::get_connection() >+pfi::lang::shared_ptr<socketstream> rpc_client::get_connection() > { > for (int i=0;i<2;i++){ > if (!ss || !(*ss)){ >- ss=shared_ptr<socketstream>(new socketstream(host, port)); >+ ss=pfi::lang::shared_ptr<socketstream>(new socketstream(host, port)); > if (!(*ss)){ > ss.reset(); > continue; >@@ -180,7 +180,7 @@ > return ss; > } > >-void rpc_client::return_connection(shared_ptr<socketstream> css) >+void rpc_client::return_connection(pfi::lang::shared_ptr<socketstream> css) > { > ss=css; > } >diff -Naur pficommon-1.3.1.0.old/src/network/socket.cpp pficommon-1.3.1.0/src/network/socket.cpp >--- pficommon-1.3.1.0.old/src/network/socket.cpp 2016-10-03 19:57:38.871866500 -0400 >+++ pficommon-1.3.1.0/src/network/socket.cpp 2016-10-03 19:57:49.393789351 -0400 >@@ -57,7 +57,7 @@ > namespace pfi{ > namespace network{ > >-shared_ptr<dns_resolver, threading_model::multi_thread> stream_socket::resolver; >+pfi::lang::shared_ptr<dns_resolver, threading_model::multi_thread> stream_socket::resolver; > r_mutex stream_socket::resolver_m; > > class sigign{ >@@ -87,7 +87,7 @@ > close(); > } > >-void stream_socket::set_dns_resolver(shared_ptr<dns_resolver, threading_model::multi_thread> r) >+void stream_socket::set_dns_resolver(pfi::lang::shared_ptr<dns_resolver, threading_model::multi_thread> r) > { > synchronized(resolver_m) > resolver=r; >@@ -105,10 +105,10 @@ > return false; > } > >- shared_ptr<dns_resolver, threading_model::multi_thread> res; >+ pfi::lang::shared_ptr<dns_resolver, threading_model::multi_thread> res; > synchronized(resolver_m){ > if (!resolver) >- set_dns_resolver(shared_ptr<dns_resolver, threading_model::multi_thread> >+ set_dns_resolver(pfi::lang::shared_ptr<dns_resolver, threading_model::multi_thread> > (new normal_dns_resolver())); > res=resolver; > } >diff -Naur pficommon-1.3.1.0.old/src/visualization/magick.cpp pficommon-1.3.1.0/src/visualization/magick.cpp >--- pficommon-1.3.1.0.old/src/visualization/magick.cpp 2016-10-03 19:57:38.872866493 -0400 >+++ pficommon-1.3.1.0/src/visualization/magick.cpp 2016-10-03 20:02:33.215016787 -0400 >@@ -69,9 +69,9 @@ > Magick::PixelPacket c=img.pixelColor(x, y); > // Quantum Depth is 8 or 16 > #if QuantumDepth == 16 >- r=c.red>>8; >- g=c.green>>8; >- b=c.blue>>8; >+ r=((unsigned char) c.red)>>8; >+ g=((unsigned char) c.green)>>8; >+ b=((unsigned char) c.blue)>>8; > #else > r=c.red; > g=c.green; >diff -Naur pficommon-1.3.1.0.old/tools/genrpc/gen_php.h pficommon-1.3.1.0/tools/genrpc/gen_php.h >--- pficommon-1.3.1.0.old/tools/genrpc/gen_php.h 2016-10-03 19:57:38.872866493 -0400 >+++ pficommon-1.3.1.0/tools/genrpc/gen_php.h 2016-10-03 19:57:49.394789344 -0400 >@@ -18,7 +18,7 @@ > > #define LIB_PATH "pfi_rpc.php" > >-typedef shared_ptr<type_rep> type_rep_p; >+typedef pfi::lang::shared_ptr<type_rep> type_rep_p; > typedef pair<type_rep_p, vector<type_rep_p> > function_type; > > class php_generator{ >@@ -99,7 +99,7 @@ > os<<" var $int_typeinfo;"<<endl; > os<<" var $string_typeinfo;"<<endl; > >- for (map<string, pair<shared_ptr<type_rep>, vector<shared_ptr<type_rep> > > >::iterator p=mems.begin(); >+ for (map<string, pair<pfi::lang::shared_ptr<type_rep>, vector<pfi::lang::shared_ptr<type_rep> > > >::iterator p=mems.begin(); > p!=mems.end(); p++){ > const string &method_name=p->first; > >@@ -113,7 +113,7 @@ > os<<" $this->int_typeinfo=new int_type(false, 4);"<<endl; > os<<" $this->string_typeinfo=new string_type();"<<endl; > >- for (map<string, pair<shared_ptr<type_rep>, vector<shared_ptr<type_rep> > > >::iterator p=mems.begin(); >+ for (map<string, pair<pfi::lang::shared_ptr<type_rep>, vector<pfi::lang::shared_ptr<type_rep> > > >::iterator p=mems.begin(); > p!=mems.end(); p++){ > const string &method_name=p->first; > >@@ -148,7 +148,7 @@ > os<<" throw new Exception(\"result code is not OK: $code\");"<<endl; > os<<" }"<<endl; > >- for (map<string, pair<shared_ptr<type_rep>, vector<shared_ptr<type_rep> > > >::iterator p=mems.begin(); >+ for (map<string, pair<pfi::lang::shared_ptr<type_rep>, vector<pfi::lang::shared_ptr<type_rep> > > >::iterator p=mems.begin(); > p!=mems.end(); p++){ > const string &method_name=p->first; > >diff -Naur pficommon-1.3.1.0.old/tools/genrpc/main.cpp pficommon-1.3.1.0/tools/genrpc/main.cpp >--- pficommon-1.3.1.0.old/tools/genrpc/main.cpp 2016-10-03 19:57:38.872866493 -0400 >+++ pficommon-1.3.1.0/tools/genrpc/main.cpp 2016-10-03 19:57:49.394789344 -0400 >@@ -26,12 +26,12 @@ > string tname("genrpctmpXXXXXX"); > string gname("genrpcexeXXXXXX"); > { >- shared_ptr<ostream> pofs(tmpstream(tname)); >+ pfi::lang::shared_ptr<ostream> pofs(tmpstream(tname)); > ostream &ofs=*pofs.get(); > ofs<<source_code; > } > { >- shared_ptr<ostream> pofs(tmpstream(gname)); >+ pfi::lang::shared_ptr<ostream> pofs(tmpstream(gname)); > } > int compile_stat=system(("g++ -xc++ "+tname+" "+compiler_options+" -lpficommon -o "+gname).c_str()); > unlink(tname.c_str());
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 596078
:
449022
|
449024
|
449026
| 449058