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