1 /* 2 BAREOS® - Backup Archiving REcovery Open Sourced 3 4 Copyright (C) 2000-2013 Free Software Foundation Europe e.V. 5 6 This program is Free Software; you can redistribute it and/or 7 modify it under the terms of version three of the GNU Affero General Public 8 License as published by the Free Software Foundation and included 9 in the file LICENSE. 10 11 This program is distributed in the hope that it will be useful, but 12 WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 Affero General Public License for more details. 15 16 You should have received a copy of the GNU Affero General Public License 17 along with this program; if not, write to the Free Software 18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 19 02110-1301, USA. 20 */ 21 /** 22 * @file 23 * Storage daemon specific defines and includes 24 */ 25 26 #ifndef BAREOS_STORED_STORED_H_ 27 #define BAREOS_STORED_STORED_H_ 28 29 #define STORAGE_DAEMON 1 30 31 /* Set to debug mutexes */ 32 //#define SD_DEBUG_LOCK 33 #ifdef SD_DEBUG_LOCK 34 const int sd_debuglevel = 3; 35 #else 36 const int sd_debuglevel = 300; 37 #endif 38 39 #ifdef HAVE_MTIO_H 40 #include <mtio.h> 41 #else 42 #ifdef HAVE_SYS_MTIO_H 43 #ifdef HAVE_AIX_OS 44 #define _MTEXTEND_H 1 45 #endif 46 #include <sys/mtio.h> 47 #else 48 #ifdef HAVE_SYS_TAPE_H 49 #include <sys/tape.h> 50 #else 51 /* Needed for Mac 10.6 (Snow Leopard) */ 52 #include "lib/bmtio.h" 53 #endif 54 #endif 55 #endif 56 #include "stored/bsr.h" 57 #include "include/ch.h" 58 #include "lock.h" 59 #include "block.h" 60 #include "record.h" 61 #include "dev.h" 62 #include "stored_conf.h" 63 #include "include/jcr.h" 64 #include "vol_mgr.h" 65 #include "reserve.h" 66 67 #ifdef BAREOS_LIB_LIB_H_ 68 #include <fnmatch.h> 69 #else 70 #include "lib/fnmatch.h" 71 #endif 72 #ifdef HAVE_DIRENT_H 73 #include <dirent.h> 74 #define NAMELEN(dirent) (strlen((dirent)->d_name)) 75 #endif 76 #ifndef HAVE_READDIR_R 77 int Readdir_r(DIR* dirp, struct dirent* entry, struct dirent** result); 78 #endif 79 80 #include "sd_plugins.h" 81 82 namespace storagedaemon { 83 84 extern bool forge_on; /* Proceed inspite of I/O errors */ 85 uint32_t new_VolSessionId(); 86 87 } /* namespace storagedaemon */ 88 89 #endif /* BAREOS_STORED_STORED_H_ */ 90