21801b3d3b5d791e2a1e78988731be7010e5b938
[rrdd.git] / src / rrdd.h
1 /**
2  * collectd - src/rrdd.h
3  * Copyright (C) 2008 Florian octo Forster
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of the GNU General Public License as published by the
7  * Free Software Foundation; only version 2 of the License is applicable.
8  *
9  * This program is distributed in the hope that it will be useful, but
10  * WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
17  *
18  * Authors:
19  *   Florian octo Forster <octo at verplant.org>
20  **/
21
22 #ifndef __RRDD_H
23 #define __RRDD_H 1
24
25 /*
26  * First tell the compiler to stick to the C99 and POSIX standards as close as
27  * possible.
28  */
29 #ifndef __STRICT_ANSI__
30 # define __STRICT_ANSI__
31 #endif
32
33 #ifndef _ISOC99_SOURCE
34 # define _ISOC99_SOURCE
35 #endif
36
37 #ifdef _POSIX_C_SOURCE
38 # undef _POSIX_C_SOURCE
39 #endif
40 #define _POSIX_C_SOURCE 200112L
41
42 #ifndef _REENTRANT
43 # define _REENTRANT
44 #endif
45
46 #ifndef _THREAD_SAFE
47 # define _THREAD_SAFE
48 #endif
49
50 /*
51  * Now include some common stuff.
52  */
53 #include <stdlib.h>
54 #include <stdint.h>
55 #include <stdio.h>
56 #include <unistd.h>
57 #include <string.h>
58
59 #include <sys/types.h>
60 #include <sys/stat.h>
61 #include <fcntl.h>
62 #include <signal.h>
63 #include <sys/socket.h>
64 #include <sys/un.h>
65 #include <netdb.h>
66 #include <poll.h>
67 #include <syslog.h>
68 #include <pthread.h>
69 #include <errno.h>
70 #include <assert.h>
71
72 #include "config.h"
73
74 #define RRDD_SOCK_PATH "unix:/tmp/rrdd.sock"
75 #define DEFAULT_PORT "42217"
76
77 #endif /* __RRDD_H */