2 Bacula(R) - The Network Backup Solution
4 Copyright (C) 2000-2015 Kern Sibbald
5 Copyright (C) 2000-2014 Free Software Foundation Europe e.V.
7 The original author of Bacula is Kern Sibbald, with contributions
8 from many others, a complete list can be found in the file AUTHORS.
10 You may use this file and others of this release according to the
11 license defined in the LICENSE file, which includes the Affero General
12 Public License, v3.0 ("AGPLv3") and some additional permissions and
13 terms pursuant to its AGPLv3 Section 7.
15 This notice must be preserved when any source code is
16 conveyed and/or propagated.
18 Bacula(R) is a registered trademark of Kern Sibbald.
21 * bacula.h -- main header file to include in all Bacula source
28 /* Disable FORTIFY_SOURCE, because bacula uses is own memory
31 #ifdef _FORTIFY_SOURCE
32 #undef _FORTIFY_SOURCE
36 /* Workaround for SGI IRIX 6.5 */
37 #define _LANGUAGE_C_PLUS_PLUS 1
40 #if defined(HAVE_WIN32)
41 #if defined(HAVE_MINGW)
44 #error "Only MINGW is supported"
45 #include "winconfig.h"
54 #define _THREAD_SAFE 1
55 #define _POSIX_PTHREAD_SEMANTICS 1
59 #if defined(HAVE_STDINT_H)
63 #elif defined(HAVE_INTTYPES_H)
66 #if defined(HAVE_STDARG_H)
70 #if defined(HAVE_STDLIB_H)
75 # undef _INCLUDE_POSIX1C_SOURCE
90 /* O_NOATIME is defined at fcntl.h when supported */
102 #ifdef HAVE_GETOPT_LONG
105 #include "lib/getopt.h"
123 #include <sys/types.h>
124 #ifdef HAVE_SYS_BITYPES_H
125 #include <sys/bitypes.h>
127 #include <sys/ioctl.h>
128 #ifdef HAVE_SYS_SOCKET_H
129 #include <sys/socket.h>
131 #if defined(HAVE_WIN32) & !defined(HAVE_MINGW)
132 #include <winsock2.h>
134 #if !defined(HAVE_WIN32) & !defined(HAVE_MINGW)
135 #include <sys/stat.h>
137 #include <sys/time.h>
139 #include <sys/wait.h>
141 #include <netinet/in.h>
142 #include <arpa/inet.h>
146 /* fight OpenSSL namespace pollution */
147 #define STORE OSSL_STORE
148 #include <openssl/ssl.h>
149 #include <openssl/x509v3.h>
150 #include <openssl/rand.h>
151 #include <openssl/err.h>
152 #include <openssl/asn1.h>
153 #include <openssl/asn1t.h>
157 /* Local Bacula includes. Be sure to put all the system
158 * includes before these.
160 #if defined(HAVE_WIN32)
161 //#include <windows.h>
166 #include "bc_types.h"
168 #include "filetypes.h"
169 #include "baconfig.h"
172 #if defined(HAVE_WIN32)
180 #undef HAVE_LIBZ /* no good without headers */