summaryrefslogtreecommitdiff
path: root/cmake/config.h.in
blob: 1537119b84e6514a9f391bb8089ccc398e4ecba8 (plain)
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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
// This file is included by all compilation units, including those in
// src/third_party. It should only contain macros and typedefs.

#pragma once
#ifdef __clang__
#  pragma clang diagnostic push
#  if __has_warning("-Wreserved-id-macro")
#    pragma clang diagnostic ignored "-Wreserved-id-macro"
#  endif
#endif

#ifdef __MINGW32__
#  define __USE_MINGW_ANSI_STDIO 1
#  define __STDC_FORMAT_MACROS 1
#endif

// For example for vasprintf under i686-w64-mingw32-g++-posix. The later
// definition of _XOPEN_SOURCE disables certain features on Linux, so we need
// _GNU_SOURCE to re-enable them (makedev, tm_zone).
#define _GNU_SOURCE 1

// The later definition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables certain
// features on NetBSD, so we need _NETBSD_SOURCE to re-enable them.
#define _NETBSD_SOURCE 1

// The later definition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables certain
// features on FreeBSD, so we need __BSD_VISIBLE to re-enable them.
#define __BSD_VISIBLE 1

// The later definition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables u_int on
// Irix 5.3. Defining _BSD_TYPES brings it back.
#define _BSD_TYPES 1

// The later definition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables certain
// features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable them.
#cmakedefine _DARWIN_C_SOURCE

// Define to activate features from IEEE Stds 1003.1-2008.
#define _POSIX_C_SOURCE 200809L

#if defined(__SunOS_5_8) || defined(__SunOS_5_9) || defined(__SunOS_5_10)
#  define _XOPEN_SOURCE 500
#elif defined(__FreeBSD__)
#  define _XOPEN_SOURCE 700
#elif defined(__ibmxl__) && defined(__clang__) // Compiler xlclang
#  define _XOPEN_SOURCE 600
#  define _ALL_SOURCE 1
#elif !defined(__SunOS_5_11) && !defined(__APPLE__)
#  define _XOPEN_SOURCE
#endif

#if defined(__SunOS_5_10) || defined(__SunOS_5_11)
#  define __EXTENSIONS__ 1
#else
#  define _XOPEN_SOURCE_EXTENDED
#endif

// Handle large files when compiled in 32-bit mode.
#ifndef _FILE_OFFSET_BITS
#  define _FILE_OFFSET_BITS 64
#endif

// clang-format off
#cmakedefine _WIN32_WINNT @_WIN32_WINNT@
// clang-format on

#ifdef __clang__
#  pragma clang diagnostic pop
#endif

#cmakedefine MTR_ENABLED

// Define if you have the "asctime_r" function.
#cmakedefine HAVE_ASCTIME_R

// Define if your compiler supports AVX2.
#cmakedefine HAVE_AVX2

// Define if you have the "getopt_long" function.
#cmakedefine HAVE_GETOPT_LONG

// Define if you have the "getpwuid" function.
#cmakedefine HAVE_GETPWUID

// Define if you have the <linux/fs.h> header file.
#cmakedefine HAVE_LINUX_FS_H

// Define if the system has the type "long long".
#cmakedefine HAVE_LONG_LONG

// Define if you have the "posix_fallocate.
#cmakedefine HAVE_POSIX_FALLOCATE

// Define if you have the "pthread_mutexattr_setpshared" function.
#cmakedefine HAVE_PTHREAD_MUTEXATTR_SETPSHARED

// Define if you have the <pwd.h> header file.
#cmakedefine HAVE_PWD_H

// Define if you have the "realpath"" function.
#cmakedefine HAVE_REALPATH

// Define if you have the "setenv" function.
#cmakedefine HAVE_SETENV

// Define if you have the "strndup" function.
#cmakedefine HAVE_STRNDUP

// Define if "f_fstypename" is a member of "struct statfs".
#cmakedefine HAVE_STRUCT_STATFS_F_FSTYPENAME

// Define if "st_atim" is a member of "struct stat".
#cmakedefine HAVE_STRUCT_STAT_ST_ATIM

// Define if "st_ctim" is a member of "struct stat".
#cmakedefine HAVE_STRUCT_STAT_ST_CTIM

// Define if "st_mtim" is a member of "struct stat".
#cmakedefine HAVE_STRUCT_STAT_ST_MTIM

// Define if "st_atimespec" is a member of "struct stat".
#cmakedefine HAVE_STRUCT_STAT_ST_ATIMESPEC

// Define if "st_ctimespec" is a member of "struct stat".
#cmakedefine HAVE_STRUCT_STAT_ST_CTIMESPEC

// Define if "st_mtimespec" is a member of "struct stat".
#cmakedefine HAVE_STRUCT_STAT_ST_MTIMESPEC

// Define if you have the "syslog" function.
#cmakedefine HAVE_SYSLOG

// Define if you have the <syslog.h> header file.
#cmakedefine HAVE_SYSLOG_H

// Define if you have the <sys/clonefile.h> header file.
#cmakedefine HAVE_SYS_CLONEFILE_H

// Define if you have the <sys/ioctl.h> header file.
#cmakedefine HAVE_SYS_IOCTL_H

// Define if you have the <sys/mman.h> header file.
#cmakedefine HAVE_SYS_MMAN_H

// Define if you have the <sys/time.h> header file.
#cmakedefine HAVE_SYS_TIME_H

// Define if you have <sys/wait.h> that is POSIX.1 compatible.
#cmakedefine HAVE_SYS_WAIT_H

// Define if you have the <sys/file.h> header file.
#cmakedefine HAVE_SYS_FILE_H

// Define if you have the <termios.h> header file.
#cmakedefine HAVE_TERMIOS_H

// Define if you have the <dirent.h> header file.
#cmakedefine HAVE_DIRENT_H

// Define if you have the <strings.h> header file.
#cmakedefine HAVE_STRINGS_H

// Define if you have the <unistd.h> header file.
#cmakedefine HAVE_UNISTD_H

// Define if you have the <utime.h> header file.
#cmakedefine HAVE_UTIME_H

// Define if you have the <sys/utime.h> header file.
#cmakedefine HAVE_SYS_UTIME_H

// Define if you have the <varargs.h> header file.
#cmakedefine HAVE_VARARGS_H

// Define if you have the "unsetenv" function.
#cmakedefine HAVE_UNSETENV

// Define if you have the "utimensat" function.
#cmakedefine HAVE_UTIMENSAT

// Define if you have the "utimes" function.
#cmakedefine HAVE_UTIMES

// Define if you have the "PTHREAD_MUTEX_ROBUST" constant.
#cmakedefine HAVE_PTHREAD_MUTEX_ROBUST

#if defined(__ibmxl__) && defined(__clang__) // Compiler xlclang
#  undef HAVE_VARARGS_H // varargs.h would hide macros of stdarg.h
#  undef HAVE_STRUCT_STAT_ST_CTIM
#  undef HAVE_STRUCT_STAT_ST_MTIM
#endif

// Typedefs that make it possible to use common types in ccache header files
// without including core/wincompat.hpp.
#ifdef _WIN32
#  ifdef _MSC_VER
typedef unsigned __int32 mode_t;
typedef int pid_t;
#  endif // _MSC_VER
#endif   // _WIN32

// O_BINARY is needed when reading binary data on Windows, so use it everywhere
// with a compatibility define for Unix platforms.
#if !defined(_WIN32) && !defined(O_BINARY)
#  define O_BINARY 0
#endif
#if !defined(_WIN32) && !defined(O_TEXT)
#  define O_TEXT 0
#endif

#ifndef ESTALE
#  define ESTALE -1
#endif

#define SYSCONFDIR "@CONFIG_SYSCONFDIR_C_ESCAPED@"

#cmakedefine INODE_CACHE_SUPPORTED

// Buffer size for I/O operations. Should be a multiple of 4 KiB.
#define CCACHE_READ_BUFFER_SIZE 65536