-
Notifications
You must be signed in to change notification settings - Fork 0
/
myconf.h
181 lines (130 loc) · 3.92 KB
/
myconf.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
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
/*************************************************************************************************
* System-dependent configurations
* Copyright (C) 2009-2012 FAL Labs
* This file is part of Kyoto Tycoon.
* This program is free software: you can redistribute it and/or modify it under the terms of
* the GNU General Public License as published by the Free Software Foundation, either version
* 3 of the License, or any later version.
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License along with this program.
* If not, see <http://www.gnu.org/licenses/>.
*************************************************************************************************/
#ifndef _MYCONF_H // duplication check
#define _MYCONF_H
/*************************************************************************************************
* system discrimination
*************************************************************************************************/
#if defined(__linux__)
#define _SYS_LINUX_
#define _KT_OSNAME "Linux"
#elif defined(__FreeBSD__)
#define _SYS_FREEBSD_
#define _KT_OSNAME "FreeBSD"
#elif defined(__NetBSD__)
#define _SYS_NETBSD_
#define _KT_OSNAME "NetBSD"
#elif defined(__OpenBSD__)
#define _SYS_OPENBSD_
#define _KT_OSNAME "OpenBSD"
#elif defined(__sun__) || defined(__sun)
#define _SYS_SUNOS_
#define _KT_OSNAME "SunOS"
#elif defined(__hpux)
#define _SYS_HPUX_
#define _KT_OSNAME "HP-UX"
#elif defined(__osf)
#define _SYS_TRU64_
#define _KT_OSNAME "Tru64"
#elif defined(_AIX)
#define _SYS_AIX_
#define _KT_OSNAME "AIX"
#elif defined(__APPLE__) && defined(__MACH__)
#define _SYS_MACOSX_
#define _KT_OSNAME "Mac OS X"
#elif defined(_MSC_VER)
#define _SYS_MSVC_
#define _KT_OSNAME "Windows (VC++)"
#elif defined(_WIN32)
#define _SYS_MINGW_
#define _KT_OSNAME "Windows (MinGW)"
#elif defined(__CYGWIN__)
#define _SYS_CYGWIN_
#define _KT_OSNAME "Windows (Cygwin)"
#else
#define _SYS_GENERIC_
#define _KT_OSNAME "Generic"
#endif
#define _KT_VERSION "0.9.56"
#define _KT_LIBVER 2
#define _KT_LIBREV 19
#if ! defined(_MYNOEVENT)
#if defined(_SYS_LINUX_)
#define _KT_EVENT_EPOLL
#elif defined(_SYS_FREEBSD_) || defined(_SYS_MACOSX_)
#define _KT_EVENT_KQUEUE
#endif
#endif
#if defined(_MYLUA)
#define _KT_LUA 1
#else
#define _KT_LUA 0
#endif
/*************************************************************************************************
* general headers
*************************************************************************************************/
extern "C" {
#include <assert.h>
#include <ctype.h>
#include <errno.h>
#include <float.h>
#include <limits.h>
#include <locale.h>
#include <math.h>
#include <setjmp.h>
#include <stdarg.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <string.h>
#include <time.h>
}
extern "C" {
#include <stdint.h>
}
#if defined(_SYS_MSVC_) || defined(_SYS_MINGW_)
#include <windows.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <direct.h>
#include <io.h>
#include <process.h>
#else
extern "C" {
#include <unistd.h>
#include <sys/param.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <sys/time.h>
#include <sys/times.h>
#include <sys/wait.h>
#include <sys/resource.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <sys/select.h>
#include <fcntl.h>
#include <poll.h>
#include <dirent.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <dlfcn.h>
}
#endif
#endif // duplication check
// END OF FILE