~mordred/libmemcached/fix850399

« back to all changes in this revision

Viewing changes to tests/mem_functions.c

  • Committer: Trond Norbye
  • Date: 2010-07-27 22:38:51 UTC
  • mto: This revision was merged to the branch mainline in revision 887.
  • Revision ID: trond.norbye@gmail.com-20100727223851-4g3jtln2ubxh7phs
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.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2945
2945
 
2946
2946
static test_return_t _user_supplied_bug21(memcached_st* memc, size_t key_count)
2947
2947
{
 
2948
#ifdef WIN32
 
2949
  (void)memc;
 
2950
  (void)key_count;
 
2951
  return TEST_SKIPPED;
 
2952
#else
2948
2953
  memcached_return_t rc;
2949
2954
  unsigned int x;
2950
2955
  char **keys;
2993
2998
  memcached_free(memc_clone);
2994
2999
 
2995
3000
  return TEST_SUCCESS;
 
3001
#endif
2996
3002
}
2997
3003
 
2998
3004
static test_return_t user_supplied_bug21(memcached_st *memc)