projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
c++: fix incompatible types
[awesomized/libmemcached]
/
libmemcached-1.0
/
platform.h
diff --git
a/libmemcached-1.0/platform.h
b/libmemcached-1.0/platform.h
index 6f43ca2cee560dbfe8b167e9e012d1820bc9e1ac..efdf53f81b495dd2ea2ad3f5bac8cbd9b554b6c8 100644
(file)
--- a/
libmemcached-1.0/platform.h
+++ b/
libmemcached-1.0/platform.h
@@
-38,25
+38,25
@@
#pragma once
#pragma once
-#ifdef WIN32
+#if defined(_WIN32)
+# include <winsock2.h>
+# include <ws2tcpip.h>
-#include <winsock2.h>
-#include <ws2tcpip.h>
-typedef short in_port_t;
-typedef SOCKET memcached_socket_t;
-#else
-typedef int memcached_socket_t;
-
-#include <sys/socket.h>
-
-#include <netinet/in.h>
+#ifndef HAVE_IN_PORT_T
+typedef int in_port_t;
+# define HAVE_IN_PORT_T 1
+#endif
-#include <arpa/inet.h>
-
-#include <netdb.h>
+typedef SOCKET memcached_socket_t;
-#include <sys/un.h>
+#else
+# include <sys/socket.h>
+# include <netinet/in.h>
+# include <arpa/inet.h>
+# include <netdb.h>
+# include <sys/un.h>
+# include <netinet/tcp.h>
-#include <netinet/tcp.h>
+typedef int memcached_socket_t;
-#endif /* WIN32 */
+#endif /*
_
WIN32 */