]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/bacula.h
Suppress incorrect 'Will not descend from x into y' messages
[bacula/bacula] / bacula / src / bacula.h
1 /*
2    Bacula® - The Network Backup Solution
3
4    Copyright (C) 2000-2008 Free Software Foundation Europe e.V.
5
6    The main author of Bacula is Kern Sibbald, with contributions from
7    many others, a complete list can be found in the file AUTHORS.
8    This program is Free Software; you can redistribute it and/or
9    modify it under the terms of version two of the GNU General Public
10    License as published by the Free Software Foundation and included
11    in the file LICENSE.
12
13    This program is distributed in the hope that it will be useful, but
14    WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16    General Public License for more details.
17
18    You should have received a copy of the GNU General Public License
19    along with this program; if not, write to the Free Software
20    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21    02110-1301, USA.
22
23    Bacula® is a registered trademark of John Walker.
24    The licensor of Bacula is the Free Software Foundation Europe
25    (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
26    Switzerland, email:ftf@fsfeurope.org.
27 */
28 /*
29  * bacula.h -- main header file to include in all Bacula source
30  *
31  *   Version $Id$
32  */
33
34 #ifndef _BACULA_H
35 #define _BACULA_H 1
36
37 #ifdef __cplusplus
38 /* Workaround for SGI IRIX 6.5 */
39 #define _LANGUAGE_C_PLUS_PLUS 1
40 #endif
41
42 #if defined(HAVE_WIN32)
43 #if defined(HAVE_MINGW)
44 #include "mingwconfig.h"
45 #else
46 #include "winconfig.h"
47 #endif
48 #else
49 #include "config.h"
50 #endif
51 #define __CONFIG_H
52
53
54 #define _REENTRANT    1
55 #define _THREAD_SAFE  1
56 #define _POSIX_PTHREAD_SEMANTICS 1
57
58
59 /* System includes */
60 #if HAVE_STDINT_H
61 #include <stdint.h>
62 #endif
63 #if HAVE_STDARG_H
64 #include <stdarg.h>
65 #endif
66 #include <stdio.h>
67 #if HAVE_STDLIB_H
68 #include <stdlib.h>
69 #endif
70 #if HAVE_UNISTD_H
71 #  ifdef HAVE_HPUX_OS
72 #  undef _INCLUDE_POSIX1C_SOURCE
73 #  endif
74 #include <unistd.h>
75 #endif
76 #if HAVE_ALLOCA_H
77 #include <alloca.h>
78 #endif
79 #if defined(_MSC_VER)
80 #include <io.h>
81 #include <direct.h>
82 #include <process.h>
83 #endif
84 #include <errno.h>
85 #include <fcntl.h>
86
87 /* O_NOATIME is defined at fcntl.h when supported */
88 #ifndef O_NOATIME
89 #define O_NOATIME 0
90 #endif
91
92 #if defined(_MSC_VER)
93 extern "C" {
94 #include "getopt.h"
95 }
96 #endif
97
98 #ifdef xxxxx
99 #ifdef HAVE_GETOPT_LONG
100 #include <getopt.h>
101 #else
102 #include "lib/getopt.h"
103 #endif
104 #endif
105
106 #include <string.h>
107 #include <strings.h>
108 #include <signal.h>
109 #include <ctype.h>
110 #ifndef _SPLINT_
111 #include <syslog.h>
112 #endif
113 #if HAVE_LIMITS_H
114 #include <limits.h>
115 #endif
116 #include <pwd.h>
117 #include <grp.h>
118 #include <time.h>
119 #include <netdb.h>
120 #include <sys/types.h>
121 #ifdef HAVE_SYS_BITYPES_H
122 #include <sys/bitypes.h>
123 #endif
124 #include <sys/ioctl.h>
125 #ifdef HAVE_SYS_SOCKET_H
126 #include <sys/socket.h>
127 #endif
128 #if defined(HAVE_WIN32) & !defined(HAVE_MINGW)
129 #include <winsock2.h>
130 #endif 
131 #if !defined(HAVE_WIN32) & !defined(HAVE_MINGW)
132 #include <sys/stat.h>
133 #endif 
134 #include <sys/time.h>
135 #if HAVE_SYS_WAIT_H
136 #include <sys/wait.h>
137 #endif
138 #include <netinet/in.h>
139 #include <arpa/inet.h>
140 #include <pthread.h>
141
142 #ifdef HAVE_OPENSSL
143 /* fight OpenSSL namespace pollution */
144 #define STORE OSSL_STORE
145 #include <openssl/ssl.h>
146 #include <openssl/x509v3.h>
147 #include <openssl/rand.h>
148 #include <openssl/err.h>
149 #include <openssl/asn1.h>
150 #include <openssl/asn1t.h>
151 #undef STORE
152 #endif
153
154 /* Local Bacula includes. Be sure to put all the system
155  *  includes before these.
156  */
157 #if defined(HAVE_WIN32)
158 #include <windows.h>
159 #include "win32/compat/compat.h"
160 #endif
161
162 #include "version.h"
163 #include "bc_types.h"
164 #include "baconfig.h"
165 #include "lib/lib.h"
166
167 /*
168  * For wx-console compiles, we undo some Bacula defines.
169  *  This prevents conflicts between wx-Widgets and Bacula.
170  *  In wx-console files that malloc or free() Bacula structures
171  *  config/resources and interface to the Bacula libraries,
172  *  you must use bmalloc() and bfree().
173  */
174 #ifdef HAVE_WXCONSOLE
175 #undef New
176 #undef _
177 #undef free
178 #undef malloc
179 #endif
180
181 #if defined(HAVE_WIN32)
182 #include "win32/winapi.h"
183 #include "winhost.h"
184 #else
185 #include "host.h"
186 #endif
187
188 #ifndef HAVE_ZLIB_H
189 #undef HAVE_LIBZ                      /* no good without headers */
190 #endif
191
192 #endif