]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/stored/stored.h
Restore win32 dir from Branch-5.2 and update it
[bacula/bacula] / bacula / src / stored / stored.h
1 /*
2    Bacula(R) - The Network Backup Solution
3
4    Copyright (C) 2000-2017 Kern Sibbald
5
6    The original author of Bacula is Kern Sibbald, with contributions
7    from many others, a complete list can be found in the file AUTHORS.
8
9    You may use this file and others of this release according to the
10    license defined in the LICENSE file, which includes the Affero General
11    Public License, v3.0 ("AGPLv3") and some additional permissions and
12    terms pursuant to its AGPLv3 Section 7.
13
14    This notice must be preserved when any source code is
15    conveyed and/or propagated.
16
17    Bacula(R) is a registered trademark of Kern Sibbald.
18 */
19 /*
20  * Storage daemon specific defines and includes
21  *
22  */
23
24 #ifndef __STORED_H_
25 #define __STORED_H_
26
27 #define STORAGE_DAEMON 1
28
29 /* Set to debug Lock() and Unlock() only */
30 #define DEV_DEBUG_LOCK
31
32 /*
33  * Set to define all SD locks except Lock()
34  *  currently this does not work. More locks
35  *  must be converted.
36  */
37 #define SD_DEBUG_LOCK
38 #ifdef SD_DEBUG_LOCK
39 const int sd_dbglvl = 300;
40 #else
41 const int sd_dbglvl = 300;
42 #endif
43
44 #undef SD_DEDUP_SUPPORT
45
46 #ifdef HAVE_MTIO_H
47 #include <mtio.h>
48 #else
49 # ifdef HAVE_SYS_MTIO_H
50 # include <sys/mtio.h>
51 # else
52 #   ifdef HAVE_SYS_TAPE_H
53 #   include <sys/tape.h>
54 #   else
55     /* Needed for Mac 10.6 (Snow Leopard) */
56 #   include "lib/bmtio.h"
57 #   endif
58 # endif
59 #endif
60 #include "lock.h"
61 #include "block.h"
62 #include "record.h"
63 #include "dev.h"
64 #include "stored_conf.h"
65 #include "bsr.h"
66 #include "jcr.h"
67 #include "vol_mgr.h"
68 #include "reserve.h"
69 #include "protos.h"
70 #ifdef HAVE_LIBZ
71 #include <zlib.h>                     /* compression headers */
72 #else
73 #define uLongf uint32_t
74 #endif
75 #ifdef HAVE_FNMATCH
76 #include <fnmatch.h>
77 #else
78 #include "lib/fnmatch.h"
79 #endif
80 #ifdef HAVE_DIRENT_H
81 #include <dirent.h>
82 #define NAMELEN(dirent) (strlen((dirent)->d_name))
83 #endif
84 #ifndef HAVE_READDIR_R
85 int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result);
86 #endif
87
88 #include "file_dev.h"
89 #include "tape_dev.h"
90 #include "fifo_dev.h"
91 #include "null_dev.h"
92 #include "vtape_dev.h"
93 #include "cloud_dev.h"
94 #include "aligned_dev.h"
95 #include "win_file_dev.h"
96 #include "win_tape_dev.h"
97 #include "sd_plugins.h"
98
99 /* Daemon globals from stored.c */
100 extern STORES *me;                    /* "Global" daemon resource */
101 extern bool forge_on;                 /* proceed inspite of I/O errors */
102 extern pthread_mutex_t device_release_mutex;
103 extern pthread_cond_t wait_device_release; /* wait for any device to be released */
104
105 #endif /* __STORED_H_ */