Update
[awesomized/libmemcached] / libtest / gearmand.cc
index dda38fbdfab3b68ca32437fd8c20320c3fa2cf56..1cb52079c6c95f612a10d053fcf9e30426d76861 100644 (file)
@@ -20,6 +20,7 @@
  */
 
 
+#include <config.h>
 #include <libtest/common.h>
 
 #include <libtest/gearmand.h>
@@ -89,7 +90,7 @@ class Gearmand : public libtest::Server
 private:
 public:
   Gearmand(const std::string& host_arg, in_port_t port_arg) :
-    libtest::Server(host_arg, port_arg)
+    libtest::Server(host_arg, port_arg, GEARMAND_BINARY, true)
   {
     set_pid_file();
   }
@@ -159,16 +160,6 @@ public:
     return "gearmand";
   };
 
-  const char *executable()
-  {
-    return GEARMAND_BINARY;
-  }
-
-  const char *daemon_file_option()
-  {
-    return "--daemon";
-  }
-
   void log_file_option(Application& app, const std::string& arg)
   {
     if (arg.empty() == false)
@@ -200,10 +191,10 @@ public:
     return true;
   }
 
-  bool build(int argc, const char *argv[]);
+  bool build(size_t argc, const char *argv[]);
 };
 
-bool Gearmand::build(int argc, const char *argv[])
+bool Gearmand::build(size_t argc, const char *argv[])
 {
   std::stringstream arg_buffer;
 
@@ -214,7 +205,7 @@ bool Gearmand::build(int argc, const char *argv[])
 
   add_option("--listen=localhost");
 
-  for (int x= 1 ; x < argc ; x++)
+  for (size_t x= 0 ; x < argc ; x++)
   {
     add_option(argv[x]);
   }