Merge from Trond
[m6w6/libmemcached] / clients / utilities.h
1 #include <getopt.h>
2 #include <libmemcached/memcached.h>
3 #include "client_options.h"
4
5 #if TIME_WITH_SYS_TIME
6 # include <sys/time.h>
7 # include <time.h>
8 #else
9 # if HAVE_SYS_TIME_H
10 # include <sys/time.h>
11 # else
12 # include <time.h>
13 # endif
14 #endif
15
16 #ifdef __sun
17 /* For some odd reason the option struct on solaris defines the argument
18 * as char* and not const char*
19 */
20 #define OPTIONSTRING char*
21 #else
22 #define OPTIONSTRING const char*
23 #endif
24
25 typedef struct memcached_programs_help_st memcached_programs_help_st;
26
27 struct memcached_programs_help_st
28 {
29 char *not_used_yet;
30 };
31
32 char *strdup_cleanup(const char *str);
33 void cleanup(void);
34 long int timedif(struct timeval a, struct timeval b);
35 void version_command(const char *command_name);
36 void help_command(const char *command_name, const char *description,
37 const struct option *long_options,
38 memcached_programs_help_st *options);
39 void process_hash_option(memcached_st *memc, char *opt_hash);