-
Notifications
You must be signed in to change notification settings - Fork 47
Expand file tree
/
Copy pathconfig.h.in
More file actions
151 lines (120 loc) · 3.24 KB
/
config.h.in
File metadata and controls
151 lines (120 loc) · 3.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
#ifndef CONFIG_H
#define CONFIG_H 1
#include <platform/platform.h>
#include <event.h>
#cmakedefine HAVE_MEMALIGN ${HAVE_MEMALIGN}
#cmakedefine HAVE_LIBNUMA ${HAVE_LIBNUMA}
#cmakedefine HAVE_PKCS5_PBKDF2_HMAC 1
#cmakedefine HAVE_PKCS5_PBKDF2_HMAC_SHA1 1
#cmakedefine HAVE_FUNC 1
#cmakedefine HAVE_FUNCTION 1
#cmakedefine HAVE_SSL_OP_NO_TLSv1_1 1
#if !defined(HAVE_FUNC) && defined(HAVE_FUNCTION)
#define __func__ __FUNCTION__
#endif
#ifndef HAVE_SSL_OP_NO_TLSv1_1
/*
* Some of our platforms use an old version of OpenSSL without
* support for anything newer than TLSv1
*/
#define SSL_OP_NO_TLSv1_1 0L
#endif
#define COUCHBASE_MAX_NUM_BUCKETS 100
#ifdef WIN32
#include <winsock2.h>
#include <ws2tcpip.h>
#include <windows.h>
#include <io.h>
#ifndef F_OK
#define F_OK 0
#endif
#define PATH_MAX 1024
/* @todo investigate this one.. */
#define SOCKETPAIR_AF AF_INET
#define get_socket_error() WSAGetLastError()
typedef int in_port_t;
typedef int sa_family_t;
typedef HANDLE pid_t;
#define snprintf _snprintf
#define strtoull(a, b, c) _strtoui64(a, b, c)
#define strtoll(a, b, c) _strtoi64(a, b, c)
/* to stop the stupid compiler to whine about this.. */
#ifndef __cplusplus
#define putenv(a) _putenv(a)
#endif
#define EX_OSERR EXIT_FAILURE
#define EX_USAGE EXIT_FAILURE
#else
#if !defined(__cplusplus) && !defined(linux) && !defined(__GNUC__)
typedef unsigned long long uint64_t;
typedef long long int64_t;
#endif
#define closesocket(a) close(a)
typedef int SOCKET;
#define SOCKETPAIR_AF AF_UNIX
#define SOCKET_ERROR -1
#define INVALID_SOCKET -1
#define get_socket_error() errno
/* need this to get IOV_MAX on some platforms. */
#ifndef __need_IOV_MAX
#define __need_IOV_MAX
#endif
#ifndef _POSIX_PTHREAD_SEMANTICS
#define _POSIX_PTHREAD_SEMANTICS
#endif
#ifdef __sun
#include <priv.h>
#define HAVE_DROP_PRIVILEGES 1
#endif
#define HAVE_SIGIGNORE 1
#include <sys/wait.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/un.h>
#include <sys/resource.h>
#include <sys/uio.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>
#include <sys/mman.h>
#include <sys/time.h>
#include <signal.h>
#include <sysexits.h>
#endif
/* Common section */
#include <stdlib.h>
#include <inttypes.h>
#include <sys/types.h>
#ifndef __cplusplus
#include <stdbool.h>
#endif
#ifndef IOV_MAX
# define IOV_MAX 1024
#endif
#define SASL_ENABLED
#define MEMCACHED_VERSION "${MEMCACHED_VERSION}"
#define PRODUCT_VERSION "${PRODUCT_VERSION}"
#define DESTINATION_ROOT "${CMAKE_INSTALL_PREFIX}"
#define SOURCE_ROOT "${Memcached_SOURCE_DIR}"
/* We don't use assert() for two main reasons:
* 1) It's disabled on non-debug builds, which we don't want.
* 2) cb_assert() prints extra info (backtraces).
*/
#undef assert
#define assert #error "assert() is forbidden. Use cb_assert() from <platform/cbassert.h instead."
/*
* Using the ntoh-methods on thread sanitizer builder cause compile warnings
* due to the macros is using the "register" keyword. Just undefine the
* macros since we don't need the extra performance optimization during the
* thread sanitizer run.
*/
#ifdef THREAD_SANITIZER
#undef ntohs
#undef ntohl
#undef htons
#undef htonl
#endif
#endif //CONFIG_H