2 Bacula® - The Network Backup Solution
4 Copyright (C) 2000-2010 Free Software Foundation Europe e.V.
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 three of the GNU Affero General Public
10 License as published by the Free Software Foundation and included
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.
18 You should have received a copy of the GNU Affero 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
23 Bacula® is a registered trademark of Kern Sibbald.
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.
29 * bacula.h -- main header file to include in all Bacula source
36 /* Disable FORTIFY_SOURCE, because bacula uses is own memory
39 #ifdef _FORTIFY_SOURCE
40 #undef _FORTIFY_SOURCE
44 /* Workaround for SGI IRIX 6.5 */
45 #define _LANGUAGE_C_PLUS_PLUS 1
48 #if defined(HAVE_WIN32)
49 #if defined(HAVE_MINGW)
50 #include "mingwconfig.h"
52 #include "winconfig.h"
61 #define _THREAD_SAFE 1
62 #define _POSIX_PTHREAD_SEMANTICS 1
80 # undef _INCLUDE_POSIX1C_SOURCE
95 /* O_NOATIME is defined at fcntl.h when supported */
100 #if defined(_MSC_VER)
107 #ifdef HAVE_GETOPT_LONG
110 #include "lib/getopt.h"
128 #include <sys/types.h>
129 #ifdef HAVE_SYS_BITYPES_H
130 #include <sys/bitypes.h>
132 #include <sys/ioctl.h>
133 #ifdef HAVE_SYS_SOCKET_H
134 #include <sys/socket.h>
136 #if defined(HAVE_WIN32) & !defined(HAVE_MINGW)
137 #include <winsock2.h>
139 #if !defined(HAVE_WIN32) & !defined(HAVE_MINGW)
140 #include <sys/stat.h>
142 #include <sys/time.h>
144 #include <sys/wait.h>
146 #include <netinet/in.h>
147 #include <arpa/inet.h>
151 /* fight OpenSSL namespace pollution */
152 #define STORE OSSL_STORE
153 #include <openssl/ssl.h>
154 #include <openssl/x509v3.h>
155 #include <openssl/rand.h>
156 #include <openssl/err.h>
157 #include <openssl/asn1.h>
158 #include <openssl/asn1t.h>
162 /* Local Bacula includes. Be sure to put all the system
163 * includes before these.
165 #if defined(HAVE_WIN32)
167 #include "win32/compat/compat.h"
171 #include "bc_types.h"
172 #include "baconfig.h"
176 * For wx-console compiles, we undo some Bacula defines.
177 * This prevents conflicts between wx-Widgets and Bacula.
178 * In wx-console files that malloc or free() Bacula structures
179 * config/resources and interface to the Bacula libraries,
180 * you must use bmalloc() and bfree().
182 #ifdef HAVE_WXCONSOLE
189 #if defined(HAVE_WIN32)
190 #include "win32/winapi.h"
197 #undef HAVE_LIBZ /* no good without headers */