*
* Libmemcached library
*
- * Copyright (C) 2011 Data Differential, http://datadifferential.com/
- * Copyright (C) 2006-2009 Brian Aker, Trond Norbye All rights reserved.
+ * Copyright (C) 2011 Data Differential, http://datadifferential.com/
+ * All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
#pragma once
-#ifdef WIN32
+#if defined(_WIN32)
+# include <winsock2.h>
+# include <ws2tcpip.h>
+
+#ifndef HAVE_IN_PORT_T
+typedef int in_port_t;
+# define HAVE_IN_PORT_T 1
+#endif
-#include <winsock2.h>
-#include <ws2tcpip.h>
-typedef short in_port_t;
typedef SOCKET memcached_socket_t;
+
#else
+# include <sys/socket.h>
+# include <netinet/in.h>
+# include <arpa/inet.h>
+# include <netdb.h>
+# include <sys/un.h>
+# include <netinet/tcp.h>
+
typedef int memcached_socket_t;
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-#include <sys/un.h>
-#include <netinet/tcp.h>
-
-#endif /* WIN32 */
+
+#endif /* _WIN32 */