]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/stored/stored.h
Back out changes apparently crashing system
[bacula/bacula] / bacula / src / stored / stored.h
1 /*
2  * Storage daemon specific defines and includes
3  *
4  *  Version $Id$
5  */
6 /*
7    Copyright (C) 2000-2005 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 __STORED_H_
22 #define __STORED_H_
23
24 #define STORAGE_DAEMON 1
25
26 #ifdef HAVE_MTIO_H
27 #include <mtio.h>
28 #else
29 # ifdef HAVE_SYS_MTIO_H
30 # include <sys/mtio.h>
31 # else
32 #   ifdef HAVE_SYS_TAPE_H
33 #   include <sys/tape.h>
34 #   endif
35 # endif
36 #endif
37 #include "block.h"
38 #include "record.h"
39 #include "dev.h"
40 #include "stored_conf.h"
41 #include "bsr.h"
42 #include "jcr.h"
43 #include "reserve.h"
44 #include "protos.h"
45 #ifdef HAVE_LIBZ
46 #include <zlib.h>                     /* compression headers */
47 #else
48 #define uLongf uint32_t
49 #endif
50 #ifdef HAVE_FNMATCH
51 #include <fnmatch.h>
52 #else
53 #include "lib/fnmatch.h"
54 #endif
55 #ifdef HAVE_DIRENT_H
56 #include <dirent.h>
57 #define NAMELEN(dirent) (strlen((dirent)->d_name))
58 #endif
59 #ifndef HAVE_READDIR_R
60 int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result);
61 #endif
62
63 /* Daemon globals from stored.c */
64 extern STORES *me;                    /* "Global" daemon resource */
65 extern bool forge_on;                 /* proceed inspite of I/O errors */
66 extern pthread_mutex_t device_release_mutex;
67 extern pthread_cond_t wait_device_release; /* wait for any device to be released */                           
68
69 #endif /* __STORED_H_ */