55f7688ea7081c50ad0079c3ae4e96d2623096e6
[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 #if defined(_WIN32)
19 # include <winsock2.h>
20 # include <ws2tcpip.h>
21
22 # ifndef HAVE_IN_PORT_T
23 typedef int in_port_t;
24 # define HAVE_IN_PORT_T 1
25 # endif
26
27 typedef SOCKET memcached_socket_t;
28
29 #else
30 # include <sys/socket.h>
31 # include <netinet/in.h>
32 # include <arpa/inet.h>
33 # include <netdb.h>
34 # include <sys/un.h>
35 # include <netinet/tcp.h>
36
37 typedef int memcached_socket_t;
38
39 #endif /* _WIN32 */