2 Bacula(R) - The Network Backup Solution
4 Copyright (C) 2000-2017 Kern Sibbald
6 The original author of Bacula is Kern Sibbald, with contributions
7 from many others, a complete list can be found in the file AUTHORS.
9 You may use this file and others of this release according to the
10 license defined in the LICENSE file, which includes the Affero General
11 Public License, v3.0 ("AGPLv3") and some additional permissions and
12 terms pursuant to its AGPLv3 Section 7.
14 This notice must be preserved when any source code is
15 conveyed and/or propagated.
17 Bacula(R) is a registered trademark of Kern Sibbald.
20 * bacula.h -- main header file to include in all Bacula source
27 /* Disable FORTIFY_SOURCE, because bacula uses is own memory
30 #ifdef _FORTIFY_SOURCE
31 #undef _FORTIFY_SOURCE
35 /* Workaround for SGI IRIX 6.5 */
36 #define _LANGUAGE_C_PLUS_PLUS 1
39 #if defined(HAVE_WIN32)
40 #if defined(HAVE_MINGW)
43 #error "Only MINGW is supported"
44 #include "winconfig.h"
53 #define _THREAD_SAFE 1
54 #define _POSIX_PTHREAD_SEMANTICS 1
58 #if defined(HAVE_STDINT_H)
62 #elif defined(HAVE_INTTYPES_H)
65 #if defined(HAVE_STDARG_H)
69 #if defined(HAVE_STDLIB_H)
74 # undef _INCLUDE_POSIX1C_SOURCE
89 /* O_NOATIME is defined at fcntl.h when supported */
101 #ifdef HAVE_GETOPT_LONG
104 #include "lib/getopt.h"
122 #include <sys/types.h>
123 #ifdef HAVE_SYS_BITYPES_H
124 #include <sys/bitypes.h>
126 #include <sys/ioctl.h>
127 #ifdef HAVE_SYS_SOCKET_H
128 #include <sys/socket.h>
130 #if defined(HAVE_WIN32) & !defined(HAVE_MINGW)
131 #include <winsock2.h>
133 #if !defined(HAVE_WIN32) & !defined(HAVE_MINGW)
134 #include <sys/stat.h>
136 #include <sys/time.h>
138 #include <sys/wait.h>
140 #include <netinet/in.h>
141 #include <arpa/inet.h>
145 /* fight OpenSSL namespace pollution */
146 #define STORE OSSL_STORE
147 #include <openssl/ssl.h>
148 #include <openssl/x509v3.h>
149 #include <openssl/rand.h>
150 #include <openssl/err.h>
151 #include <openssl/asn1.h>
152 #include <openssl/asn1t.h>
156 /* Local Bacula includes. Be sure to put all the system
157 * includes before these.
159 #if defined(HAVE_WIN32)
160 //#include <windows.h>
165 #include "bc_types.h"
167 #include "filetypes.h"
168 #include "baconfig.h"
171 /* manually enable feature that you want to test in DEVELOPER mode*/
175 #ifdef DDE_EXTRA_CHECKS
176 const bool have_dde_extra_check = true;
178 const bool have_dde_extra_check = false;
181 * For wx-console compiles, we undo some Bacula defines.
182 * This prevents conflicts between wx-Widgets and Bacula.
183 * In wx-console files that malloc or free() Bacula structures
184 * config/resources and interface to the Bacula libraries,
185 * you must use bmalloc() and bfree().
187 #ifdef HAVE_WXCONSOLE
197 #undef HAVE_LIBZ /* no good without headers */