projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Final bits for options in parser for behaviors.
[awesomized/libmemcached]
/
clients
/
memcp.c
diff --git
a/clients/memcp.c
b/clients/memcp.c
index 1dc30631900eed71032fa4424c6201eceed8b9b0..bce35ce6d3ddebcd34474620695f3e0602d2cf24 100644
(file)
--- a/
clients/memcp.c
+++ b/
clients/memcp.c
@@
-9,7
+9,8
@@
*
*/
*
*/
-#include "libmemcached/common.h"
+#include "config.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
@@
-22,6
+23,10
@@
#include <errno.h>
#include <strings.h>
#include <string.h>
#include <errno.h>
#include <strings.h>
#include <string.h>
+#include <sys/types.h>
+#include <stdlib.h>
+#include <limits.h>
+
#include <libmemcached/memcached.h>
#include <libmemcached/memcached.h>
@@
-58,13
+63,13
@@
static long strtol_wrapper(const char *nptr, int base, bool *error)
|| (errno != 0 && val == 0))
{
*error= true;
|| (errno != 0 && val == 0))
{
*error= true;
- return
0
;
+ return
EXIT_SUCCESS
;
}
if (endptr == nptr)
{
*error= true;
}
if (endptr == nptr)
{
*error= true;
- return
0
;
+ return
EXIT_SUCCESS
;
}
*error= false;
}
*error= false;
@@
-80,6
+85,7
@@
int main(int argc, char *argv[])
int return_code= 0;
options_parse(argc, argv);
int return_code= 0;
options_parse(argc, argv);
+ initialize_sockets();
memc= memcached_create(NULL);
process_hash_option(memc, opt_hash);
memc= memcached_create(NULL);
process_hash_option(memc, opt_hash);
@@
-111,7
+117,7
@@
int main(int argc, char *argv[])
if (!initialize_sasl(memc, opt_username, opt_passwd))
{
memcached_free(memc);
if (!initialize_sasl(memc, opt_username, opt_passwd))
{
memcached_free(memc);
- return
1
;
+ return
EXIT_FAILURE
;
}
while (optind < argc)
}
while (optind < argc)