]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/bacula.h
- Put Dmsg() on inside if() to avoid calling subroutine.
[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 /*
8    Copyright (C) 2000-2005 Kern Sibbald
9
10    This program is free software; you can redistribute it and/or
11    modify it under the terms of the GNU General Public License as
12    published by the Free Software Foundation; either version 2 of
13    the License, or (at your option) any later version.
14
15    This program is distributed in the hope that it will be useful,
16    but WITHOUT ANY WARRANTY; without even the implied warranty of
17    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18    General Public License for more details.
19
20    You should have received a copy of the GNU General Public
21    License along with this program; if not, write to the Free
22    Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
23    MA 02111-1307, USA.
24
25  */
26
27 #ifndef _BACULA_H
28 #define _BACULA_H 1
29
30 #ifdef __cplusplus
31 /* Workaround for SGI IRIX 6.5 */
32 #define _LANGUAGE_C_PLUS_PLUS 1
33 #endif
34
35 #ifdef HAVE_WIN32
36 #include "winconfig.h"
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 #include <errno.h>
70 #include <fcntl.h>
71
72 #ifdef xxxxx
73 #ifdef HAVE_GETOPT_LONG
74 #include <getopt.h>
75 #else
76 #include "lib/getopt.h"
77 #endif
78 #endif
79
80 #include <string.h>
81 #include <strings.h>
82 #include <signal.h>
83 #include <ctype.h>
84 #ifndef _SPLINT_
85 #include <syslog.h>
86 #endif
87 #if HAVE_LIMITS_H
88 #include <limits.h>
89 #endif
90 #include <pwd.h>
91 #include <grp.h>
92 #include <time.h>
93 #include <netdb.h>
94 #include <sys/types.h>
95 #ifdef HAVE_SYS_BITYPES_H
96 #include <sys/bitypes.h>
97 #endif
98 #include <sys/ioctl.h>
99 #ifdef HAVE_SYS_SOCKET_H
100 #include <sys/socket.h>
101 #endif
102 #ifdef HAVE_WIN32
103 #include <winsock2.h>
104 #else
105 #include <sys/stat.h>
106 #endif
107 #include <sys/time.h>
108 #if HAVE_SYS_WAIT_H
109 #include <sys/wait.h>
110 #endif
111 #include <netinet/in.h>
112 #include <arpa/inet.h>
113 #include <pthread.h>
114
115 #ifdef HAVE_OPENSSL
116 #include <openssl/ssl.h>
117 #include <openssl/x509v3.h>
118 #include <openssl/rand.h>
119 #include <openssl/err.h>
120 #endif
121
122 /* Local Bacula includes. Be sure to put all the system
123  *  includes before these.
124  */
125 #include "version.h"
126 #include "bc_types.h"
127 #include "baconfig.h"
128 #include "lib/lib.h"
129
130 #ifndef HAVE_ZLIB_H
131 #undef HAVE_LIBZ                      /* no good without headers */
132 #endif
133
134 #endif