a3ccd3d737ded861284109cacba695b969154b49
[m6w6/libmemcached] / include / libmemcached-1.0 / platform.h
1 /*
2 +--------------------------------------------------------------------+
3 | libmemcached - C/C++ Client Library for memcached |
4 +--------------------------------------------------------------------+
5 | Redistribution and use in source and binary forms, with or without |
6 | modification, are permitted under the terms of the BSD license. |
7 | You should have received a copy of the license in a bundled file |
8 | named LICENSE; in case you did not receive a copy you can review |
9 | the terms online at: https://opensource.org/licenses/BSD-3-Clause |
10 +--------------------------------------------------------------------+
11 | Copyright (c) 2006-2014 Brian Aker https://datadifferential.com/ |
12 | Copyright (c) 2020 Michael Wallner <mike@php.net> |
13 +--------------------------------------------------------------------+
14 */
15
16 #pragma once
17
18 #include "libmemcached-1.0/configure.h"
19
20 #if defined(_WIN32)
21 # include <winsock2.h>
22 # include <ws2tcpip.h>
23
24 # ifndef HAVE_IN_PORT_T
25 typedef int in_port_t;
26 # define HAVE_IN_PORT_T 1
27 # endif
28
29 typedef SOCKET memcached_socket_t;
30
31 #else
32 # include <sys/socket.h>
33 # include <netinet/in.h>
34 # include <arpa/inet.h>
35 # include <netdb.h>
36 # include <sys/un.h>
37 # include <netinet/tcp.h>
38
39 typedef int memcached_socket_t;
40
41 #endif /* _WIN32 */