Initial support for Windows
authorTrond Norbye <trond.norbye@gmail.com>
Tue, 27 Jul 2010 22:38:51 +0000 (00:38 +0200)
committerTrond Norbye <trond.norbye@gmail.com>
Tue, 27 Jul 2010 22:38:51 +0000 (00:38 +0200)
commit2230ba7b89bbaa989de311f9d7ea6d6e2cd5a9b8
treec6fed0df91cd441627b7b37171a9874a58f26ce9
parente6c7e024c1d308e7a667edb346e75ddecdaa1c6e
Initial support for Windows

In order to support Windows without adding a lot of #ifdefs all over
the code I decided to move all the inclusions of platform-specific
network headers into a separate include file. Windows use separate
subsystem for sockets (WinSock), and it is almost compatible with how
it works on Unix except from:

* The socket handle is a SOCKET and not a typical filedescriptor.
* It should be closed with closesocket() and not close().
* It does not set the global errno variable, but one should call
  WSAGetLastError() instead.
35 files changed:
Makefile.am
clients/include.am
clients/memcapable.c
clients/memcat.c
clients/memcp.c
clients/memrm.c
clients/memstat.c
clients/utilities.c
clients/utilities.h
configure.ac
example/interface_v0.c
example/interface_v1.c
example/memcached_light.c
libmemcached/behavior.c
libmemcached/callback.c
libmemcached/common.h
libmemcached/connect.c
libmemcached/include.am
libmemcached/io.c
libmemcached/memcached.h
libmemcached/platform.h [new file with mode: 0644]
libmemcached/protocol/binary_handler.c
libmemcached/protocol/common.h
libmemcached/protocol/pedantic.c
libmemcached/protocol/protocol_handler.c
libmemcached/protocol_handler.h
libmemcached/server.h
poll/include.am [new file with mode: 0644]
poll/poll.c [new file with mode: 0644]
poll/poll.h [new file with mode: 0644]
tests/mem_functions.c
tests/server.c
tests/test.c
win32/include.am [new file with mode: 0644]
win32/wrappers.h [new file with mode: 0644]