X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=clients%2Futilities.cc;h=268b7904589e5a4a7e07b8e18b4f643dfcdb189a;hb=d40388104245a17f257e39f72ae84967ce210aa7;hp=79f2f2aebcda1560a4750bc7f11175924fa1d0d3;hpb=fee8381b6b80398fcb6893860400ead6a598f15b;p=awesomized%2Flibmemcached diff --git a/clients/utilities.cc b/clients/utilities.cc index 79f2f2ae..268b7904 100644 --- a/clients/utilities.cc +++ b/clients/utilities.cc @@ -1,4 +1,5 @@ /* LibMemcached + * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/ * Copyright (C) 2006-2009 Brian Aker * All rights reserved. * @@ -8,7 +9,7 @@ * Summary: * */ -#include +#include #include @@ -98,10 +99,12 @@ static const char *lookup_help(memcached_options option) case OPT_BINARY: return("Switch to binary protocol."); case OPT_ANALYZE: return("Analyze the provided servers."); case OPT_UDP: return("Use UDP protocol when communicating with server."); + case OPT_BUFFER: return("Enable request buffering."); 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"; + case OPT_SERVER_VERSION: return "Memcached daemon software version"; default: break; }; @@ -141,7 +144,9 @@ void process_hash_option(memcached_st *memc, char *opt_hash) memcached_return_t rc; if (opt_hash == NULL) + { return; + } set= MEMCACHED_HASH_DEFAULT; /* Just here to solve warning */ if (!strcasecmp(opt_hash, "CRC")) @@ -181,12 +186,12 @@ void process_hash_option(memcached_st *memc, char *opt_hash) void initialize_sockets(void) { /* Define the function for all platforms to avoid #ifdefs in each program */ -#if defined(WIN32) && WIN32 +#if defined(_WIN32) WSADATA wsaData; if (WSAStartup(MAKEWORD(2,0), &wsaData) != 0) { fprintf(stderr, "Socket Initialization Error. Program aborted\n"); exit(EXIT_FAILURE); } -#endif +#endif // #if defined(_WIN32) }