ci: bsds: rebuild packages after reconfiguration
[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 /* This seems to be required for older compilers @note
21 * http://stackoverflow.com/questions/8132399/how-to-printf-uint64-t */
22 #ifndef __STDC_FORMAT_MACROS
23 # define __STDC_FORMAT_MACROS
24 #endif
25
26 #ifdef __cplusplus
27 # include <cinttypes>
28 # include <cstddef>
29 # include <cstdlib>
30 #else
31 # include <inttypes.h>
32 # include <stddef.h>
33 # include <stdlib.h>
34 # include <stdbool.h>
35 #endif
36
37 #include <sys/types.h>
38
39 #if defined HAVE_NETDB_H
40 # include <netdb.h>
41 #endif
42
43 #if !defined HAVE_IN_PORT_T
44 typedef int in_port_t;
45 #endif
46
47 #if !defined HAVE_PID_T
48 typedef int pid_t;
49 #endif
50
51 #ifndef HAVE_SSIZE_T
52 typedef long int ssize_t;
53 #endif
54
55 #if defined _WIN32
56 # include <winsock2.h>
57 # include <ws2tcpip.h>
58 typedef SOCKET memcached_socket_t;
59 #else
60 typedef int memcached_socket_t;
61 #endif // _WIN32