tags 811628 + patch kthxbye Attached is a patch that makes kyotocabinet build (with warnings) with GCC 7. I tried building it with CXX="g++ -std=c++03", but kyotocabinet uses nullptr, so that wasn't going to work. I instead added the constexpr keyword which is now obligatory in C++ 11.
I used "NULL" instead of nullptr because that was the existing style. -- brian m. carlson / brian with sandals: Houston, Texas, US https://www.crustytoothpaste.net/~bmc | My opinion only OpenPGP: https://keybase.io/bk2204
diff --git a/ktremotedb.h b/ktremotedb.h index 2dca1f6..80d02bb 100644 --- a/ktremotedb.h +++ b/ktremotedb.h @@ -298,7 +298,7 @@ class RemoteDB { RPCClient::ReturnValue rv = db_->rpc_.call("cur_get_key", &inmap, &outmap); if (rv != RPCClient::RVSUCCESS) { db_->set_rpc_error(rv, outmap); - return false; + return NULL; } size_t ksiz; const char* kbuf = strmapget(outmap, "key", &ksiz); @@ -350,7 +350,7 @@ class RemoteDB { RPCClient::ReturnValue rv = db_->rpc_.call("cur_get_value", &inmap, &outmap); if (rv != RPCClient::RVSUCCESS) { db_->set_rpc_error(rv, outmap); - return false; + return NULL; } size_t vsiz; const char* vbuf = strmapget(outmap, "value", &vsiz); @@ -411,7 +411,7 @@ class RemoteDB { *ksp = 0; *vbp = NULL; *vsp = 0; - return false; + return NULL; } size_t ksiz = 0; const char* kbuf = strmapget(outmap, "key", &ksiz); @@ -481,7 +481,7 @@ class RemoteDB { RPCClient::ReturnValue rv = db_->rpc_.call("cur_seize", &inmap, &outmap); if (rv != RPCClient::RVSUCCESS) { db_->set_rpc_error(rv, outmap); - return false; + return NULL; } size_t ksiz = 0; const char* kbuf = strmapget(outmap, "key", &ksiz); diff --git a/ktulog.h b/ktulog.h index ab301ea..66cf4f7 100644 --- a/ktulog.h +++ b/ktulog.h @@ -48,7 +48,7 @@ class UpdateLogger { /* The accuracy of logical time stamp. */ static const uint64_t TSLACC = 1000 * 1000; /* The waiting seconds of auto flush. */ - static const double FLUSHWAIT = 0.1; + static constexpr double FLUSHWAIT = 0.1; public: /** * Reader of update logs.
signature.asc
Description: PGP signature