X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=util%2Finstance.cc;h=1b99739762d40e158b63a41a0c70688ca58503f9;hb=538ce08e1871cfa9e409455fd82f9f948635c135;hp=e96f414f72e6280ba899414496b81ce376c3c5ac;hpb=751e342e158ae65052ce098ccd64aa54e39312db;p=awesomized%2Flibmemcached diff --git a/util/instance.cc b/util/instance.cc index e96f414f..1b997397 100644 --- a/util/instance.cc +++ b/util/instance.cc @@ -36,7 +36,7 @@ */ -#include +#include "mem_config.h" #include "util/instance.hpp" @@ -50,7 +50,23 @@ #include #ifdef HAVE_UNISTD_H -#include +# include +#endif + +#ifndef INVALID_SOCKET +# define INVALID_SOCKET -1 +#endif + +#ifndef SOCKET_ERROR +# define SOCKET_ERROR -1 +#endif + +#ifndef get_socket_errno +# define get_socket_errno() errno +#endif + +#ifndef closesocket +# define closesocket(a) close(a) #endif @@ -211,7 +227,6 @@ bool Instance::run() case READING: if (operation->has_response()) { - size_t total_read; ssize_t read_length; do @@ -240,7 +255,6 @@ bool Instance::run() } operation->push(buffer, static_cast(read_length)); - total_read+= static_cast(read_length); } while (more_to_read()); } // end has_response