forked from couchbase/kv_engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.cmake.h
76 lines (59 loc) · 1.89 KB
/
config.cmake.h
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
/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
#pragma once
#cmakedefine HAVE_MEMALIGN 1
#cmakedefine HAVE_LIBNUMA 1
#cmakedefine HAVE_PKCS5_PBKDF2_HMAC 1
#cmakedefine HAVE_PKCS5_PBKDF2_HMAC_SHA1 1
#cmakedefine HAVE_SSL_OP_NO_TLSv1_1 1
#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
#define COUCHBASE_MAX_ITEM_PRIVILEGED_BYTES (1024 * 1024)
#ifdef WIN32
#define WIN32_LEAN_AND_MEAN 1
// We need to make sure that we include winsock2.h before
// ws2tcpip.h before windows.h... if we end up with windows.h
// before those files we're getting compile errors.
#include <winsock2.h>
#include <windows.h>
#include <io.h>
#ifndef F_OK
#define F_OK 0
#endif
typedef HANDLE pid_t;
#define EX_OSERR EXIT_FAILURE
#define EX_USAGE EXIT_FAILURE
#else // !WIN32
#define HAVE_SIGIGNORE 1
#endif // WIN32
/* Common section */
#include <inttypes.h>
#define MEMCACHED_VERSION "${MEMCACHED_VERSION}"
#define PRODUCT_VERSION "${PRODUCT_VERSION}"
#define DESTINATION_ROOT "${CMAKE_INSTALL_PREFIX}"
#define SOURCE_ROOT "${Memcached_SOURCE_DIR}"
#define OBJECT_ROOT "${Memcached_BINARY_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 Linux 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.
*/
#if defined(THREAD_SANITIZER) && defined(linux)
#undef ntohs
#undef ntohl
#undef htons
#undef htonl
#endif