Merge Trond --without-docs
[m6w6/libmemcached] / clients / utilities.c
index ef1e60f37c131b157feccd1ac61f4fd5fa94d0ac..b51665a69bfc43478e873b1bb4382a86ab099edf 100644 (file)
@@ -8,8 +8,8 @@
  * Summary:
  *
  */
+#include "config.h"
 
-#include "libmemcached/common.h"
 #include <stdio.h>
 #include <ctype.h>
 #include <string.h>
@@ -60,6 +60,8 @@ static const char *lookup_help(memcached_options option)
   case OPT_UDP: return("Use UDP protocol when communicating with server.");
   case OPT_USERNAME: return "Username to use for SASL authentication";
   case OPT_PASSWD: return "Password to use for SASL authentication";
+  case OPT_FILE: return "Path to file in which to save result";
+  case OPT_STAT_ARGS: return "Argument for statistics";
   default: WATCHPOINT_ASSERT(0);
   };
 
@@ -124,10 +126,10 @@ void process_hash_option(memcached_st *memc, char *opt_hash)
   }
 }
 
+#ifdef LIBMEMCACHED_WITH_SASL_SUPPORT
 static char *username;
 static char *passwd;
 
-#ifdef LIBMEMCACHED_WITH_SASL_SUPPORT
 static int get_username(void *context, int id, const char **result,
                         unsigned int *len)
 {
@@ -201,7 +203,7 @@ bool initialize_sasl(memcached_st *memc, char *user, char *password)
 #else
   (void)memc;
   (void)user;
-  (void)passwd;
+  (void)password;
 #endif
 
   return true;
@@ -209,7 +211,7 @@ bool initialize_sasl(memcached_st *memc, char *user, char *password)
 
 void shutdown_sasl(void)
 {
-#if LIBMEMCACHED_WITH_SASL_SUPPORT
+#ifdef LIBMEMCACHED_WITH_SASL_SUPPORT
   if (username != NULL || passwd != NULL)
     sasl_done();
 #endif