1 /* 2 BAREOS® - Backup Archiving REcovery Open Sourced 3 4 Copyright (C) 2000-2013 Free Software Foundation Europe e.V. 5 Copyright (C) 2010-2017 Planets Communications B.V. 6 Copyright (C) 2013-2020 Bareos GmbH & Co. KG 7 8 This program is Free Software; you can redistribute it and/or 9 modify it under the terms of version three of the GNU Affero General Public 10 License as published by the Free Software Foundation and included 11 in the file LICENSE. 12 13 This program is distributed in the hope that it will be useful, but 14 WITHOUT ANY WARRANTY; without even the implied warranty of 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 Affero General Public License for more details. 17 18 You should have received a copy of the GNU Affero General Public License 19 along with this program; if not, write to the Free Software 20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 21 02110-1301, USA. 22 */ 23 24 #ifndef BAREOS_LIB_VERSION_H_ 25 #define BAREOS_LIB_VERSION_H_ 26 27 #include <stddef.h> 28 #include <stdio.h> 29 30 #ifdef __cplusplus 31 extern "C" { 32 #endif 33 34 struct BareosVersionStrings { 35 const char* Full; 36 const char* Date; 37 const char* ShortDate; 38 const char* ProgDateTime; 39 const char* FullWithDate; 40 const char* Year; 41 const char* BinaryInfo; 42 const char* ServicesMessage; 43 const char* JoblogMessage; 44 void (*FormatCopyrightWithFsfAndPlanets)(char* out, size_t len, int FsfYear); 45 void (*PrintCopyrightWithFsfAndPlanets)(FILE* fh, int FsfYear); 46 void (*FormatCopyright)(char* out, size_t len, int StartYear); 47 void (*PrintCopyright)(FILE* fh, int StartYear); 48 const char* (*GetOsInfo)(void); 49 }; 50 51 extern const struct BareosVersionStrings kBareosVersionStrings; 52 53 #ifdef __cplusplus 54 }; 55 #endif 56 57 /* If this is set stdout will not be closed on startup */ 58 /* #define DEVELOPER 1 */ 59 60 /* 61 * SMCHECK does orphaned buffer checking (memory leaks) 62 * it can always be turned on, but has some minor performance 63 * penalties. 64 */ 65 #ifdef DEVELOPER 66 # define SMCHECK 67 #endif 68 69 /* 70 * for fastest speed but you must have a UPS to avoid unwanted shutdowns 71 */ 72 //#define SQLITE3_INIT_QUERY "PRAGMA synchronous = OFF" 73 74 /* 75 * for more safety, but is 30 times slower than above 76 */ 77 #define SQLITE3_INIT_QUERY "PRAGMA synchronous = NORMAL" 78 79 /* Debug flags not normally turned on */ 80 81 /* #define TRACE_JCR_CHAIN 1 */ 82 /* #define TRACE_RES 1 */ 83 /* #define DEBUG_BLOCK_CHECKSUM 1 */ 84 85 /* 86 * Set SMALLOC_SANITY_CHECK to zero to turn off, otherwise 87 * it is the maximum memory malloced before Bareos will 88 * abort. Except for debug situations, this should be zero 89 */ 90 #define SMALLOC_SANITY_CHECK 0 /* 500000000 0.5 GB max */ 91 92 93 /* Check if header of tape block is zero before writing */ 94 /* #define DEBUG_BLOCK_ZEROING 1 */ 95 96 /* The following are turned on for performance testing */ 97 /* 98 * If you turn on the NO_ATTRIBUTES_TEST and rebuild, the SD 99 * will receive the attributes from the FD, will write them 100 * to disk, then when the data is written to tape, it will 101 * read back the attributes, but they will not be sent to 102 * the Director. So this will eliminate: 1. the comm time 103 * to send the attributes to the Director. 2. the time it 104 * takes the Director to put them in the catalog database. 105 */ 106 /* #define NO_ATTRIBUTES_TEST 1 */ 107 108 /* 109 * If you turn on NO_TAPE_WRITE_TEST and rebuild, the SD 110 * will do all normal actions, but will not write to the 111 * Volume. Note, this means a lot of functions such as 112 * labeling will not work, so you must use it only when 113 * Bareos is going to append to a Volume. This will eliminate 114 * the time it takes to write to the Volume (not the time 115 * it takes to do any positioning). 116 */ 117 /* #define NO_TAPE_WRITE_TEST 1 */ 118 119 /* 120 * If you turn on FD_NO_SEND_TEST and rebuild, the FD will 121 * not send any attributes or data to the SD. This will 122 * eliminate the comm time sending to the SD. 123 */ 124 /* #define FD_NO_SEND_TEST 1 */ 125 #endif /* BAREOS_LIB_VERSION_H_ */ 126