-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathhypercube.h
61 lines (53 loc) · 1.37 KB
/
hypercube.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
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdarg.h>
#include <errno.h>
#include <time.h>
#include <assert.h>
#include <limits.h>
#include <signal.h>
#include <dirent.h>
#include <regex.h>
#ifdef WITH_MYSQL
#include <mysql/mysql.h>
#endif
#include "dist.h"
#include "config.h"
#include "akbuf/akbuf.h"
#include "asio/asio.h"
#ifdef USE_LINUX_SENDFILE
#include <sys/sendfile.h>
#endif
#include "log.h"
#include "net.h"
#include "http.h"
#include "cfg.h"
#include "tracker.h"
#ifdef DEBUG
#define DEBUGF(v...) aklogf(LOG_DEBUG, "DEBUG: " v);
#define AKdassert(cond) AKassert(cond)
#else
#define DEBUGF(v...)
#define AKdassert(cond)
#endif
#define AKassert(c) if (!(c)) { aklogf(LOG_ERROR, "Assertion (" __STRING(c) ") failed @ " __FILE__ ":%u", __LINE__); exit(1); }
#define AKstrcpy(dest, src) { strncpy((dest), (src), sizeof(dest) - 1); (dest)[sizeof(dest) - 1] = 0; }
#ifdef SHORT_SERVER_VERSION
#define SERVER_VERSION_STR "hypercube"
#else
#define SERVER_VERSION_STR "hypercube/1.1alpha tracker/0.1alpha (" SERVER_DIST ") by anakata [[email protected]]"
#endif
#ifdef DEBUG
#define SERVER_VERSION SERVER_VERSION_STR " [debug build]"
#else
#define SERVER_VERSION SERVER_VERSION_STR
#endif