]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/bacula.h
Turn off debug code in jobq.c
[bacula/bacula] / bacula / src / bacula.h
1 /*
2  * bacula.h -- main header file to include in all Bacula source
3  *
4  *   Version $Id$
5  */
6 /*
7    Copyright (C) 2000-2006 Kern Sibbald
8
9    This program is free software; you can redistribute it and/or
10    modify it under the terms of the GNU General Public License
11    version 2 as amended with additional clauses defined in the
12    file LICENSE in the main source directory.
13
14    This program is distributed in the hope that it will be useful,
15    but WITHOUT ANY WARRANTY; without even the implied warranty of
16    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
17    the file LICENSE for additional details.
18
19  */
20
21 #ifndef _BACULA_H
22 #define _BACULA_H 1
23
24 #ifdef __cplusplus
25 /* Workaround for SGI IRIX 6.5 */
26 #define _LANGUAGE_C_PLUS_PLUS 1
27 #endif
28
29 #if defined(HAVE_WIN32)
30 #if defined(HAVE_MINGW)
31 #include "mingwconfig.h"
32 #define _STAT_H       /* don't pull in MinGW stat.h */
33 #define _STAT_DEFINED /* don't pull in MinGW stat.h */
34 #else
35 #include "winconfig.h"
36 #endif
37 #include "winhost.h"
38 #else
39 #include "config.h"
40 #include "host.h"
41 #endif
42
43
44 #define _REENTRANT    1
45 #define _THREAD_SAFE  1
46 #define _POSIX_PTHREAD_SEMANTICS 1
47
48
49 /* System includes */
50 #if HAVE_STDINT_H
51 #include <stdint.h>
52 #endif
53 #if HAVE_STDARG_H
54 #include <stdarg.h>
55 #endif
56 #include <stdio.h>
57 #if HAVE_STDLIB_H
58 #include <stdlib.h>
59 #endif
60 #if HAVE_UNISTD_H
61 #  ifdef HAVE_HPUX_OS
62 #  undef _INCLUDE_POSIX1C_SOURCE
63 #  endif
64 #include <unistd.h>
65 #endif
66 #if HAVE_ALLOCA_H
67 #include <alloca.h>
68 #endif
69
70 #include <errno.h>
71 #include <fcntl.h>
72
73 /* O_NOATIME is defined at fcntl.h when supported */
74 #ifndef O_NOATIME
75 #define O_NOATIME 0
76 #endif
77
78 #ifdef xxxxx
79 #ifdef HAVE_GETOPT_LONG
80 #include <getopt.h>
81 #else
82 #include "lib/getopt.h"
83 #endif
84 #endif
85
86 #include <string.h>
87 #include <strings.h>
88 #include <signal.h>
89 #include <ctype.h>
90 #ifndef _SPLINT_
91 #include <syslog.h>
92 #endif
93 #if HAVE_LIMITS_H
94 #include <limits.h>
95 #endif
96 #include <pwd.h>
97 #include <grp.h>
98 #include <time.h>
99 #include <netdb.h>
100 #include <sys/types.h>
101 #ifdef HAVE_SYS_BITYPES_H
102 #include <sys/bitypes.h>
103 #endif
104 #include <sys/ioctl.h>
105 #ifdef HAVE_SYS_SOCKET_H
106 #include <sys/socket.h>
107 #endif
108 #if defined(HAVE_WIN32) & !defined(HAVE_MINGW)
109 #include <winsock2.h>
110 #else
111 //#include <sys/stat.h>
112 #endif
113 #include <sys/time.h>
114 #if HAVE_SYS_WAIT_H
115 #include <sys/wait.h>
116 #endif
117 #include <netinet/in.h>
118 #include <arpa/inet.h>
119 #include <pthread.h>
120
121 #ifdef HAVE_OPENSSL
122 /* fight OpenSSL namespace pollution */
123 #define STORE OSSL_STORE
124 #include <openssl/ssl.h>
125 #include <openssl/x509v3.h>
126 #include <openssl/rand.h>
127 #include <openssl/err.h>
128 #include <openssl/asn1.h>
129 #include <openssl/asn1t.h>
130 #undef STORE
131 #endif
132
133 /* Local Bacula includes. Be sure to put all the system
134  *  includes before these.
135  */
136 #if defined(HAVE_WIN32)
137 #include <windows.h>
138 #include "win32/compat/compat.h"
139 #endif
140
141 #include "version.h"
142 #include "bc_types.h"
143 #include "baconfig.h"
144 #include "lib/lib.h"
145
146 #ifdef HAVE_WXCONSOLE
147 #undef New
148 #undef _
149 #endif
150
151 #if defined(HAVE_WIN32)
152 #include "lib/winapi.h"
153 #endif
154
155 #ifndef HAVE_ZLIB_H
156 #undef HAVE_LIBZ                      /* no good without headers */
157 #endif
158
159 #endif