]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/bacula.h
- Integrate the majority of the Mingw cross-tools submission
[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 #ifdef WIN32
30 #ifdef HAVE_MINGW
31 #include "mingwconfig.h"
32 #include "winhost.h"
33 #else
34 #include "winconfig.h"
35 #include "winhost.h"
36 #endif
37 #else
38 #include "config.h"
39 #include "host.h"
40 #endif
41
42
43 #define _REENTRANT    1
44 #define _THREAD_SAFE  1
45 #define _POSIX_PTHREAD_SEMANTICS 1
46
47
48 /* System includes */
49 #if HAVE_STDINT_H
50 #include <stdint.h>
51 #endif
52 #if HAVE_STDARG_H
53 #include <stdarg.h>
54 #endif
55 #include <stdio.h>
56 #if HAVE_STDLIB_H
57 #include <stdlib.h>
58 #endif
59 #if HAVE_UNISTD_H
60 #  ifdef HAVE_HPUX_OS
61 #  undef _INCLUDE_POSIX1C_SOURCE
62 #  endif
63 #include <unistd.h>
64 #endif
65 #if HAVE_ALLOCA_H
66 #include <alloca.h>
67 #endif
68 #include <errno.h>
69 #include <fcntl.h>
70
71 #ifdef xxxxx
72 #ifdef HAVE_GETOPT_LONG
73 #include <getopt.h>
74 #else
75 #include "lib/getopt.h"
76 #endif
77 #endif
78
79 #include <string.h>
80 #include <strings.h>
81 #include <signal.h>
82 #include <ctype.h>
83 #ifndef _SPLINT_
84 #include <syslog.h>
85 #endif
86 #if HAVE_LIMITS_H
87 #include <limits.h>
88 #endif
89 #include <pwd.h>
90 #include <grp.h>
91 #include <time.h>
92 #include <netdb.h>
93 #include <sys/types.h>
94 #ifdef HAVE_SYS_BITYPES_H
95 #include <sys/bitypes.h>
96 #endif
97 #include <sys/ioctl.h>
98 #ifdef HAVE_SYS_SOCKET_H
99 #include <sys/socket.h>
100 #endif
101 #if defined(HAVE_WIN32) & !defined(HAVE_MINGW)
102 #include <winsock2.h>
103 #else
104 #include <sys/stat.h>
105 #endif
106 #include <sys/time.h>
107 #if HAVE_SYS_WAIT_H
108 #include <sys/wait.h>
109 #endif
110 #include <netinet/in.h>
111 #include <arpa/inet.h>
112 #include <pthread.h>
113
114 #ifdef HAVE_OPENSSL
115 /* fight OpenSSL namespace pollution */
116 #define STORE OSSL_STORE
117 #include <openssl/ssl.h>
118 #include <openssl/x509v3.h>
119 #include <openssl/rand.h>
120 #include <openssl/err.h>
121 #include <openssl/asn1.h>
122 #include <openssl/asn1t.h>
123 #undef STORE
124 #endif
125
126 /* Local Bacula includes. Be sure to put all the system
127  *  includes before these.
128  */
129 #include "version.h"
130 #include "bc_types.h"
131 #include "baconfig.h"
132 #include "lib/lib.h"
133
134 #ifndef HAVE_ZLIB_H
135 #undef HAVE_LIBZ                      /* no good without headers */
136 #endif
137
138 #endif