diff --git a/core/src/cats/bdb_priv.h b/core/src/cats/bdb_priv.h index 7f0cd50532e..41898d9cfca 100644 --- a/core/src/cats/bdb_priv.h +++ b/core/src/cats/bdb_priv.h @@ -27,7 +27,7 @@ #error "Illegal inclusion of catalog private interface" #endif -class CATS_IMP_EXP BareosDbPrivateInterface: public BareosDb { +class BareosDbPrivateInterface: public BareosDb { protected: /* * Members diff --git a/core/src/cats/cats.h b/core/src/cats/cats.h index e3d41304708..ec0e8a44356 100644 --- a/core/src/cats/cats.h +++ b/core/src/cats/cats.h @@ -554,7 +554,7 @@ typedef struct sql_field { } SQL_FIELD; #endif -class CATS_IMP_EXP BareosDb: public SmartAlloc, public BareosDbQueryEnum { +class BareosDb: public SmartAlloc, public BareosDbQueryEnum { protected: /* * Members diff --git a/core/src/cats/cats_backends.h b/core/src/cats/cats_backends.h index 407c740bf6b..c5218c612cb 100644 --- a/core/src/cats/cats_backends.h +++ b/core/src/cats/cats_backends.h @@ -72,10 +72,10 @@ struct backend_shared_library_t { #endif #if defined(HAVE_DYNAMIC_CATS_BACKENDS) -DLL_IMP_EXP void DbSetBackendDirs(alist *new_backend_dirs); +void DbSetBackendDirs(alist *new_backend_dirs); #endif -DLL_IMP_EXP void DbFlushBackends(void); -DLL_IMP_EXP BareosDb *db_init_database(JobControlRecord *jcr, +void DbFlushBackends(void); +BareosDb *db_init_database(JobControlRecord *jcr, const char *db_driver, const char *db_name, const char *db_user, diff --git a/core/src/cats/dbi.cc b/core/src/cats/dbi.cc index 12193cb0dde..8a282d3491f 100644 --- a/core/src/cats/dbi.cc +++ b/core/src/cats/dbi.cc @@ -1452,7 +1452,7 @@ bool BareosDbDBI::SqlBatchInsert(JobControlRecord *jcr, AttributesDbRecord *ar) * never have errors, or it is really fatal. */ #ifdef HAVE_DYNAMIC_CATS_BACKENDS -extern "C" BareosDb CATS_IMP_EXP *backend_instantiate(JobControlRecord *jcr, +extern "C" BareosDb *backend_instantiate(JobControlRecord *jcr, const char *db_driver, const char *db_name, const char *db_user, @@ -1536,7 +1536,7 @@ BareosDb *db_init_database(JobControlRecord *jcr, } #ifdef HAVE_DYNAMIC_CATS_BACKENDS -extern "C" void CATS_IMP_EXP flush_backend(void) +extern "C" void flush_backend(void) #else void DbFlushBackends(void) #endif diff --git a/core/src/cats/mysql.cc b/core/src/cats/mysql.cc index 4de94f98139..dfb5063be4a 100644 --- a/core/src/cats/mysql.cc +++ b/core/src/cats/mysql.cc @@ -813,7 +813,7 @@ bool BareosDbMysql::SqlBatchInsert(JobControlRecord *jcr, AttributesDbRecord *ar * never have errors, or it is really fatal. */ #ifdef HAVE_DYNAMIC_CATS_BACKENDS -extern "C" BareosDb CATS_IMP_EXP *backend_instantiate(JobControlRecord *jcr, +extern "C" BareosDb *backend_instantiate(JobControlRecord *jcr, const char *db_driver, const char *db_name, const char *db_user, @@ -888,7 +888,7 @@ BareosDb *db_init_database(JobControlRecord *jcr, } #ifdef HAVE_DYNAMIC_CATS_BACKENDS -extern "C" void CATS_IMP_EXP flush_backend(void) +extern "C" void flush_backend(void) #else void DbFlushBackends(void) #endif diff --git a/core/src/cats/postgresql.cc b/core/src/cats/postgresql.cc index 05e616e59de..b7dc9964286 100644 --- a/core/src/cats/postgresql.cc +++ b/core/src/cats/postgresql.cc @@ -1199,7 +1199,7 @@ bool BareosDbPostgresql::SqlBatchInsert(JobControlRecord *jcr, AttributesDbRecor * never have errors, or it is really fatal. */ #ifdef HAVE_DYNAMIC_CATS_BACKENDS -extern "C" BareosDb CATS_IMP_EXP *backend_instantiate(JobControlRecord *jcr, +extern "C" BareosDb *backend_instantiate(JobControlRecord *jcr, const char *db_driver, const char *db_name, const char *db_user, @@ -1274,7 +1274,7 @@ BareosDb *db_init_database(JobControlRecord *jcr, } #ifdef HAVE_DYNAMIC_CATS_BACKENDS -extern "C" void CATS_IMP_EXP flush_backend(void) +extern "C" void flush_backend(void) #else void DbFlushBackends(void) #endif diff --git a/core/src/cats/sql.h b/core/src/cats/sql.h index fcda38288d1..3f1ba80d67e 100644 --- a/core/src/cats/sql.h +++ b/core/src/cats/sql.h @@ -20,10 +20,10 @@ */ #ifndef BAREOS_CATS_SQL_H_ #define BAREOS_CATS_SQL_H_ -DLL_IMP_EXP int db_int64_handler(void *ctx, int num_fields, char **row); -DLL_IMP_EXP int DbStrtimeHandler(void *ctx, int num_fields, char **row); -DLL_IMP_EXP int DbListHandler(void *ctx, int num_fields, char **row); -DLL_IMP_EXP void DbDebugPrint(JobControlRecord *jcr, FILE *fp); -DLL_IMP_EXP int DbIntHandler(void *ctx, int num_fields, char **row); +int db_int64_handler(void *ctx, int num_fields, char **row); +int DbStrtimeHandler(void *ctx, int num_fields, char **row); +int DbListHandler(void *ctx, int num_fields, char **row); +void DbDebugPrint(JobControlRecord *jcr, FILE *fp); +int DbIntHandler(void *ctx, int num_fields, char **row); #endif // BAREOS_CATS_SQL_H_ diff --git a/core/src/cats/sql_pooling.h b/core/src/cats/sql_pooling.h index 8da71af5d75..9ded3050c7a 100644 --- a/core/src/cats/sql_pooling.h +++ b/core/src/cats/sql_pooling.h @@ -20,7 +20,7 @@ */ #ifndef BAREOS_CATS_SQL_POOLING_H_ #define BAREOS_CATS_SQL_POOLING_H_ -DLL_IMP_EXP bool db_sql_pool_initialize(const char *db_drivername, +bool db_sql_pool_initialize(const char *db_drivername, const char *db_name, const char *db_user, const char *db_password, @@ -35,9 +35,9 @@ DLL_IMP_EXP bool db_sql_pool_initialize(const char *db_drivername, int increment_connections, int idle_timeout, int validate_timeout); -DLL_IMP_EXP void DbSqlPoolDestroy(void); -DLL_IMP_EXP void DbSqlPoolFlush(void); -DLL_IMP_EXP BareosDb *DbSqlGetNonPooledConnection(JobControlRecord *jcr, +void DbSqlPoolDestroy(void); +void DbSqlPoolFlush(void); +BareosDb *DbSqlGetNonPooledConnection(JobControlRecord *jcr, const char *db_drivername, const char *db_name, const char *db_user, @@ -50,7 +50,7 @@ DLL_IMP_EXP BareosDb *DbSqlGetNonPooledConnection(JobControlRecord *jcr, bool try_reconnect, bool exit_on_fatal, bool need_private = false); -DLL_IMP_EXP BareosDb *DbSqlGetPooledConnection(JobControlRecord *jcr, +BareosDb *DbSqlGetPooledConnection(JobControlRecord *jcr, const char *db_drivername, const char *db_name, const char *db_user, @@ -63,6 +63,6 @@ DLL_IMP_EXP BareosDb *DbSqlGetPooledConnection(JobControlRecord *jcr, bool try_reconnect, bool exit_on_fatal, bool need_private = false); -DLL_IMP_EXP void DbSqlClosePooledConnection(JobControlRecord *jcr, BareosDb *mdb, bool abort = false); +void DbSqlClosePooledConnection(JobControlRecord *jcr, BareosDb *mdb, bool abort = false); #endif // BAREOS_CATS_SQL_POOLING_H_ diff --git a/core/src/cats/sqlite.cc b/core/src/cats/sqlite.cc index 728cc5dd666..0c1920b1bb6 100644 --- a/core/src/cats/sqlite.cc +++ b/core/src/cats/sqlite.cc @@ -672,7 +672,7 @@ bool BareosDbSqlite::SqlBatchInsert(JobControlRecord *jcr, AttributesDbRecord *a * never have errors, or it is really fatal. */ #ifdef HAVE_DYNAMIC_CATS_BACKENDS -extern "C" BareosDb CATS_IMP_EXP *backend_instantiate(JobControlRecord *jcr, +extern "C" BareosDb *backend_instantiate(JobControlRecord *jcr, const char *db_driver, const char *db_name, const char *db_user, @@ -743,7 +743,7 @@ BareosDb *db_init_database(JobControlRecord *jcr, } #ifdef HAVE_DYNAMIC_CATS_BACKENDS -extern "C" void CATS_IMP_EXP flush_backend(void) +extern "C" void flush_backend(void) #else void DbFlushBackends(void) #endif diff --git a/core/src/dird/bsr.h b/core/src/dird/bsr.h index f18b9d5c2ca..1e9f6f84753 100644 --- a/core/src/dird/bsr.h +++ b/core/src/dird/bsr.h @@ -79,7 +79,7 @@ struct bootstrap_info RestoreBootstrapRecord *new_bsr(); namespace directordaemon { - DLL_IMP_EXP void FreeBsr(RestoreBootstrapRecord *bsr); + void FreeBsr(RestoreBootstrapRecord *bsr); } /* namespace director */ bool CompleteBsr(UaContext *ua, RestoreBootstrapRecord *bsr); uint32_t WriteBsrFile(UaContext *ua, RestoreContext &rx); diff --git a/core/src/filed/fd_plugins.cc b/core/src/filed/fd_plugins.cc index 0ff60370a49..5f80217c339 100644 --- a/core/src/filed/fd_plugins.cc +++ b/core/src/filed/fd_plugins.cc @@ -42,15 +42,15 @@ /** * Function pointers to be set here (findlib) */ -extern DLL_IMP_EXP int (*plugin_bopen)(BareosWinFilePacket *bfd, const char *fname, int flags, mode_t mode); -extern DLL_IMP_EXP int (*plugin_bclose)(BareosWinFilePacket *bfd); -extern DLL_IMP_EXP ssize_t (*plugin_bread)(BareosWinFilePacket *bfd, void *buf, size_t count); -extern DLL_IMP_EXP ssize_t (*plugin_bwrite)(BareosWinFilePacket *bfd, void *buf, size_t count); -extern DLL_IMP_EXP boffset_t (*plugin_blseek)(BareosWinFilePacket *bfd, boffset_t offset, int whence); - -extern DLL_IMP_EXP char *exepath; -extern DLL_IMP_EXP char *version; -extern DLL_IMP_EXP char *dist_name; +extern int (*plugin_bopen)(BareosWinFilePacket *bfd, const char *fname, int flags, mode_t mode); +extern int (*plugin_bclose)(BareosWinFilePacket *bfd); +extern ssize_t (*plugin_bread)(BareosWinFilePacket *bfd, void *buf, size_t count); +extern ssize_t (*plugin_bwrite)(BareosWinFilePacket *bfd, void *buf, size_t count); +extern boffset_t (*plugin_blseek)(BareosWinFilePacket *bfd, boffset_t offset, int whence); + +extern char *exepath; +extern char *version; +extern char *dist_name; namespace filedaemon { diff --git a/core/src/findlib/acl.h b/core/src/findlib/acl.h index 75be23c2f62..1fd34bd3eef 100644 --- a/core/src/findlib/acl.h +++ b/core/src/findlib/acl.h @@ -106,9 +106,9 @@ struct acl_data_t { } u; }; -DLL_IMP_EXP bacl_exit_code SendAclStream(JobControlRecord *jcr, acl_data_t *acl_data, int stream); -DLL_IMP_EXP bacl_exit_code BuildAclStreams(JobControlRecord *jcr, acl_data_t *acl_data, FindFilesPacket *ff_pkt); -DLL_IMP_EXP bacl_exit_code parse_acl_streams(JobControlRecord *jcr, acl_data_t *acl_data, +bacl_exit_code SendAclStream(JobControlRecord *jcr, acl_data_t *acl_data, int stream); +bacl_exit_code BuildAclStreams(JobControlRecord *jcr, acl_data_t *acl_data, FindFilesPacket *ff_pkt); +bacl_exit_code parse_acl_streams(JobControlRecord *jcr, acl_data_t *acl_data, int stream, char *content, uint32_t content_length); #endif diff --git a/core/src/findlib/attribs.h b/core/src/findlib/attribs.h index c3df054f51f..fd3212061cc 100644 --- a/core/src/findlib/attribs.h +++ b/core/src/findlib/attribs.h @@ -21,8 +21,8 @@ #ifndef BAREOS_FINDLIB_ATTRIBS_H_ #define BAREOS_FINDLIB_ATTRIBS_H_ -DLL_IMP_EXP int encode_attribsEx(JobControlRecord *jcr, char *attribsEx, FindFilesPacket *ff_pkt); -DLL_IMP_EXP bool SetAttributes(JobControlRecord *jcr, Attributes *attr, BareosWinFilePacket *ofd); -DLL_IMP_EXP int SelectDataStream(FindFilesPacket *ff_pkt, bool compatible); +int encode_attribsEx(JobControlRecord *jcr, char *attribsEx, FindFilesPacket *ff_pkt); +bool SetAttributes(JobControlRecord *jcr, Attributes *attr, BareosWinFilePacket *ofd); +int SelectDataStream(FindFilesPacket *ff_pkt, bool compatible); #endif // BAREOS_FINDLIB_ATTRIBS_H_ diff --git a/core/src/findlib/bfile.cc b/core/src/findlib/bfile.cc index 73c6ae32411..adde291cd53 100644 --- a/core/src/findlib/bfile.cc +++ b/core/src/findlib/bfile.cc @@ -35,11 +35,11 @@ const int debuglevel = 200; -DLL_IMP_EXP int (*plugin_bopen)(BareosWinFilePacket *bfd, const char *fname, int flags, mode_t mode) = NULL; -DLL_IMP_EXP int (*plugin_bclose)(BareosWinFilePacket *bfd) = NULL; -DLL_IMP_EXP ssize_t (*plugin_bread)(BareosWinFilePacket *bfd, void *buf, size_t count) = NULL; -DLL_IMP_EXP ssize_t (*plugin_bwrite)(BareosWinFilePacket *bfd, void *buf, size_t count) = NULL; -DLL_IMP_EXP boffset_t (*plugin_blseek)(BareosWinFilePacket *bfd, boffset_t offset, int whence) = NULL; +int (*plugin_bopen)(BareosWinFilePacket *bfd, const char *fname, int flags, mode_t mode) = NULL; +int (*plugin_bclose)(BareosWinFilePacket *bfd) = NULL; +ssize_t (*plugin_bread)(BareosWinFilePacket *bfd, void *buf, size_t count) = NULL; +ssize_t (*plugin_bwrite)(BareosWinFilePacket *bfd, void *buf, size_t count) = NULL; +boffset_t (*plugin_blseek)(BareosWinFilePacket *bfd, boffset_t offset, int whence) = NULL; #ifdef HAVE_DARWIN_OS #include diff --git a/core/src/findlib/bfile.h b/core/src/findlib/bfile.h index 68788423943..59aff2ffaaf 100644 --- a/core/src/findlib/bfile.h +++ b/core/src/findlib/bfile.h @@ -118,23 +118,23 @@ struct BareosWinFilePacket { #endif -DLL_IMP_EXP void binit(BareosWinFilePacket *bfd); -DLL_IMP_EXP bool IsBopen(BareosWinFilePacket *bfd); -DLL_IMP_EXP bool set_win32_backup(BareosWinFilePacket *bfd); -DLL_IMP_EXP bool SetPortableBackup(BareosWinFilePacket *bfd); -DLL_IMP_EXP bool SetCmdPlugin(BareosWinFilePacket *bfd, JobControlRecord *jcr); -DLL_IMP_EXP bool have_win32_api(); -DLL_IMP_EXP bool IsPortableBackup(BareosWinFilePacket *bfd); -DLL_IMP_EXP bool IsRestoreStreamSupported(int stream); -DLL_IMP_EXP bool is_win32_stream(int stream); -DLL_IMP_EXP int bopen(BareosWinFilePacket *bfd, const char *fname, int flags, mode_t mode, dev_t rdev); -DLL_IMP_EXP int BopenRsrc(BareosWinFilePacket *bfd, const char *fname, int flags, mode_t mode); -DLL_IMP_EXP int bclose(BareosWinFilePacket *bfd); -DLL_IMP_EXP ssize_t bread(BareosWinFilePacket *bfd, void *buf, size_t count); -DLL_IMP_EXP ssize_t bwrite(BareosWinFilePacket *bfd, void *buf, size_t count); -DLL_IMP_EXP boffset_t blseek(BareosWinFilePacket *bfd, boffset_t offset, int whence); -DLL_IMP_EXP const char *stream_to_ascii(int stream); - -DLL_IMP_EXP bool processWin32BackupAPIBlock (BareosWinFilePacket *bfd, void *pBuffer, ssize_t dwSize); +void binit(BareosWinFilePacket *bfd); +bool IsBopen(BareosWinFilePacket *bfd); +bool set_win32_backup(BareosWinFilePacket *bfd); +bool SetPortableBackup(BareosWinFilePacket *bfd); +bool SetCmdPlugin(BareosWinFilePacket *bfd, JobControlRecord *jcr); +bool have_win32_api(); +bool IsPortableBackup(BareosWinFilePacket *bfd); +bool IsRestoreStreamSupported(int stream); +bool is_win32_stream(int stream); +int bopen(BareosWinFilePacket *bfd, const char *fname, int flags, mode_t mode, dev_t rdev); +int BopenRsrc(BareosWinFilePacket *bfd, const char *fname, int flags, mode_t mode); +int bclose(BareosWinFilePacket *bfd); +ssize_t bread(BareosWinFilePacket *bfd, void *buf, size_t count); +ssize_t bwrite(BareosWinFilePacket *bfd, void *buf, size_t count); +boffset_t blseek(BareosWinFilePacket *bfd, boffset_t offset, int whence); +const char *stream_to_ascii(int stream); + +bool processWin32BackupAPIBlock (BareosWinFilePacket *bfd, void *pBuffer, ssize_t dwSize); #endif /* BAREOS_FINDLIB_BFILE_H_ */ diff --git a/core/src/findlib/create_file.h b/core/src/findlib/create_file.h index 74f9185b410..f1f31697fe9 100644 --- a/core/src/findlib/create_file.h +++ b/core/src/findlib/create_file.h @@ -21,6 +21,6 @@ #ifndef BAREOS_FINDLIB_CREATE_FILE_H_ #define BAREOS_FINDLIB_CREATE_FILE_H_ -DLL_IMP_EXP int CreateFile(JobControlRecord *jcr, Attributes *attr, BareosWinFilePacket *ofd, int replace); +int CreateFile(JobControlRecord *jcr, Attributes *attr, BareosWinFilePacket *ofd, int replace); #endif // BAREOS_FINDLIB_CREATE_FILE_H_ diff --git a/core/src/findlib/drivetype.h b/core/src/findlib/drivetype.h index e9d2f449b7f..fe38297e2bd 100644 --- a/core/src/findlib/drivetype.h +++ b/core/src/findlib/drivetype.h @@ -21,6 +21,6 @@ #ifndef BAREOS_FINDLIB_DRIVETYPE_H_ #define BAREOS_FINDLIB_DRIVETYPE_H_ -DLL_IMP_EXP bool Drivetype(const char *fname, char *fs, int fslen); +bool Drivetype(const char *fname, char *fs, int fslen); #endif // BAREOS_FINDLIB_DRIVETYPE_H_ diff --git a/core/src/findlib/enable_priv.h b/core/src/findlib/enable_priv.h index 0ff6654443e..22c73e460ef 100644 --- a/core/src/findlib/enable_priv.h +++ b/core/src/findlib/enable_priv.h @@ -21,6 +21,6 @@ #ifndef BAREOS_FINDLIB_ENABLE_PRIV_H_ #define BAREOS_FINDLIB_ENABLE_PRIV_H_ -DLL_IMP_EXP int EnableBackupPrivileges(JobControlRecord *jcr, int ignore_errors); +int EnableBackupPrivileges(JobControlRecord *jcr, int ignore_errors); #endif // BAREOS_FINDLIB_ENABLE_PRIV_H_ diff --git a/core/src/findlib/find.h b/core/src/findlib/find.h index 5245cb021df..6225b6094e9 100644 --- a/core/src/findlib/find.h +++ b/core/src/findlib/find.h @@ -66,7 +66,7 @@ struct utimbuf { #endif #ifdef USE_READDIR_R #ifndef HAVE_READDIR_R -DLL_IMP_EXP int Readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result); +int Readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result); #endif #endif /** @@ -271,22 +271,22 @@ struct FindFilesPacket { struct HfsPlusInfo hfsinfo; /**< Finder Info and resource fork size */ }; -DLL_IMP_EXP FindFilesPacket *init_find_files(); -DLL_IMP_EXP void SetFindOptions(FindFilesPacket *ff, bool incremental, time_t mtime); -DLL_IMP_EXP void SetFindChangedFunction(FindFilesPacket *ff, bool CheckFct(JobControlRecord *jcr, FindFilesPacket *ff)); -DLL_IMP_EXP int FindFiles(JobControlRecord *jcr, FindFilesPacket *ff, int file_sub(JobControlRecord *, FindFilesPacket *ff_pkt, bool), +FindFilesPacket *init_find_files(); +void SetFindOptions(FindFilesPacket *ff, bool incremental, time_t mtime); +void SetFindChangedFunction(FindFilesPacket *ff, bool CheckFct(JobControlRecord *jcr, FindFilesPacket *ff)); +int FindFiles(JobControlRecord *jcr, FindFilesPacket *ff, int file_sub(JobControlRecord *, FindFilesPacket *ff_pkt, bool), int PluginSub(JobControlRecord *, FindFilesPacket *ff_pkt, bool)); -DLL_IMP_EXP bool MatchFiles(JobControlRecord *jcr, FindFilesPacket *ff, int sub(JobControlRecord *, FindFilesPacket *ff_pkt, bool)); -DLL_IMP_EXP int TermFindFiles(FindFilesPacket *ff); -DLL_IMP_EXP bool IsInFileset(FindFilesPacket *ff); -DLL_IMP_EXP bool AcceptFile(FindFilesPacket *ff); -DLL_IMP_EXP findIncludeExcludeItem *allocate_new_incexe(void); -DLL_IMP_EXP findIncludeExcludeItem *new_exclude(findFILESET *fileset); -DLL_IMP_EXP findIncludeExcludeItem *new_include(findFILESET *fileset); -DLL_IMP_EXP findIncludeExcludeItem *new_preinclude(findFILESET *fileset); -DLL_IMP_EXP findIncludeExcludeItem *new_preexclude(findFILESET *fileset); -DLL_IMP_EXP findFOPTS *start_options(FindFilesPacket *ff); -DLL_IMP_EXP void NewOptions(FindFilesPacket *ff, findIncludeExcludeItem *incexe); +bool MatchFiles(JobControlRecord *jcr, FindFilesPacket *ff, int sub(JobControlRecord *, FindFilesPacket *ff_pkt, bool)); +int TermFindFiles(FindFilesPacket *ff); +bool IsInFileset(FindFilesPacket *ff); +bool AcceptFile(FindFilesPacket *ff); +findIncludeExcludeItem *allocate_new_incexe(void); +findIncludeExcludeItem *new_exclude(findFILESET *fileset); +findIncludeExcludeItem *new_include(findFILESET *fileset); +findIncludeExcludeItem *new_preinclude(findFILESET *fileset); +findIncludeExcludeItem *new_preexclude(findFILESET *fileset); +findFOPTS *start_options(FindFilesPacket *ff); +void NewOptions(FindFilesPacket *ff, findIncludeExcludeItem *incexe); #include "acl.h" diff --git a/core/src/findlib/find_one.h b/core/src/findlib/find_one.h index ebe2d4a515d..1d4bf9ed67a 100644 --- a/core/src/findlib/find_one.h +++ b/core/src/findlib/find_one.h @@ -21,11 +21,11 @@ #ifndef BAREOS_FINDLIB_FIND_ONE_H_ #define BAREOS_FINDLIB_FIND_ONE_H_ -DLL_IMP_EXP int FindOneFile(JobControlRecord *jcr, FindFilesPacket *ff, +int FindOneFile(JobControlRecord *jcr, FindFilesPacket *ff, int HandleFile(JobControlRecord *jcr, FindFilesPacket *ff_pkt, bool top_level), char *p, dev_t parent_device, bool top_level); -DLL_IMP_EXP int TermFindOne(FindFilesPacket *ff); -DLL_IMP_EXP bool HasFileChanged(JobControlRecord *jcr, FindFilesPacket *ff_pkt); -DLL_IMP_EXP bool CheckChanges(JobControlRecord *jcr, FindFilesPacket *ff_pkt); +int TermFindOne(FindFilesPacket *ff); +bool HasFileChanged(JobControlRecord *jcr, FindFilesPacket *ff_pkt); +bool CheckChanges(JobControlRecord *jcr, FindFilesPacket *ff_pkt); #endif // BAREOS_FINDLIB_FIND_ONE_H_ diff --git a/core/src/findlib/fstype.h b/core/src/findlib/fstype.h index 1d4a604c9b5..70ca228322d 100644 --- a/core/src/findlib/fstype.h +++ b/core/src/findlib/fstype.h @@ -21,7 +21,7 @@ #ifndef BAREOS_FINDLIB_FSTYPE_H_ #define BAREOS_FINDLIB_FSTYPE_H_ -DLL_IMP_EXP bool fstype(const char *fname, char *fs, int fslen); -DLL_IMP_EXP bool FstypeEquals(const char *fname, const char *fstypename); +bool fstype(const char *fname, char *fs, int fslen); +bool FstypeEquals(const char *fname, const char *fstypename); #endif // BAREOS_FINDLIB_FSTYPE_H_ diff --git a/core/src/findlib/get_priv.h b/core/src/findlib/get_priv.h index 5a554ebfa71..bbd3f909444 100644 --- a/core/src/findlib/get_priv.h +++ b/core/src/findlib/get_priv.h @@ -21,6 +21,6 @@ #ifndef BAREOS_FINDLIB_GET_PRIV_H_ #define BAREOS_FINDLIB_GET_PRIV_H_ -DLL_IMP_EXP int EnableBackupPrivileges(JobControlRecord *jcr, int ignore_errors); +int EnableBackupPrivileges(JobControlRecord *jcr, int ignore_errors); #endif // BAREOS_FINDLIB_GET_PRIV_H_ diff --git a/core/src/findlib/hardlink.h b/core/src/findlib/hardlink.h index 77a9baa1525..11cf8ff5ac2 100644 --- a/core/src/findlib/hardlink.h +++ b/core/src/findlib/hardlink.h @@ -21,9 +21,9 @@ #ifndef BAREOS_FINDLIB_HARDLINK_H_ #define BAREOS_FINDLIB_HARDLINK_H_ -DLL_IMP_EXP CurLink *lookup_hardlink(JobControlRecord *jcr, FindFilesPacket *ff_pkt, ino_t ino, dev_t dev); -DLL_IMP_EXP CurLink *new_hardlink(JobControlRecord *jcr, FindFilesPacket *ff_pkt, char *fname, ino_t ino, dev_t dev); -DLL_IMP_EXP void FfPktSetLinkDigest(FindFilesPacket *ff_pkt, +CurLink *lookup_hardlink(JobControlRecord *jcr, FindFilesPacket *ff_pkt, ino_t ino, dev_t dev); +CurLink *new_hardlink(JobControlRecord *jcr, FindFilesPacket *ff_pkt, char *fname, ino_t ino, dev_t dev); +void FfPktSetLinkDigest(FindFilesPacket *ff_pkt, int32_t digest_stream, const char *digest, uint32_t len); diff --git a/core/src/findlib/makepath.h b/core/src/findlib/makepath.h index 52753c93347..91ca167ac37 100644 --- a/core/src/findlib/makepath.h +++ b/core/src/findlib/makepath.h @@ -21,7 +21,7 @@ #ifndef BAREOS_FINDLIB_MAKEPATH_H_ #define BAREOS_FINDLIB_MAKEPATH_H_ -DLL_IMP_EXP bool makepath(Attributes *attr, const char *path, mode_t mode, +bool makepath(Attributes *attr, const char *path, mode_t mode, mode_t parent_mode, uid_t owner, gid_t group, bool keep_dir_modes); diff --git a/core/src/findlib/match.h b/core/src/findlib/match.h index a132cd7828f..af10a96ae57 100644 --- a/core/src/findlib/match.h +++ b/core/src/findlib/match.h @@ -21,15 +21,15 @@ #ifndef BAREOS_FINDLIB_MATCH_H_ #define BAREOS_FINDLIB_MATCH_H_ -DLL_IMP_EXP void InitIncludeExcludeFiles(FindFilesPacket *ff); -DLL_IMP_EXP void TermIncludeExcludeFiles(FindFilesPacket *ff); -DLL_IMP_EXP void AddFnameToIncludeList(FindFilesPacket *ff, int prefixed, const char *fname); -DLL_IMP_EXP void AddFnameToExcludeList(FindFilesPacket *ff, const char *fname); -DLL_IMP_EXP bool FileIsExcluded(FindFilesPacket *ff, const char *file); -DLL_IMP_EXP bool FileIsIncluded(FindFilesPacket *ff, const char *file); -DLL_IMP_EXP struct s_included_file *get_next_included_file(FindFilesPacket *ff, +void InitIncludeExcludeFiles(FindFilesPacket *ff); +void TermIncludeExcludeFiles(FindFilesPacket *ff); +void AddFnameToIncludeList(FindFilesPacket *ff, int prefixed, const char *fname); +void AddFnameToExcludeList(FindFilesPacket *ff, const char *fname); +bool FileIsExcluded(FindFilesPacket *ff, const char *file); +bool FileIsIncluded(FindFilesPacket *ff, const char *file); +struct s_included_file *get_next_included_file(FindFilesPacket *ff, struct s_included_file *inc); -DLL_IMP_EXP bool ParseSizeMatch(const char *size_match_pattern, +bool ParseSizeMatch(const char *size_match_pattern, struct s_sz_matching *size_matching); #endif // BAREOS_FINDLIB_MATCH_H_ diff --git a/core/src/findlib/shadowing.h b/core/src/findlib/shadowing.h index 1f7e3f85f72..0e5f8f525a4 100644 --- a/core/src/findlib/shadowing.h +++ b/core/src/findlib/shadowing.h @@ -21,6 +21,6 @@ #ifndef BAREOS_FINDLIB_SHADOWING_H_ #define BAREOS_FINDLIB_SHADOWING_H_ -DLL_IMP_EXP void CheckIncludeListShadowing(JobControlRecord *jcr, findFILESET *fileset); +void CheckIncludeListShadowing(JobControlRecord *jcr, findFILESET *fileset); #endif // BAREOS_FINDLIB_SHADOWING_H_ diff --git a/core/src/findlib/xattr.h b/core/src/findlib/xattr.h index 60789aaa79b..3938dd39d3f 100644 --- a/core/src/findlib/xattr.h +++ b/core/src/findlib/xattr.h @@ -109,14 +109,14 @@ struct xattr_data_t { */ #define XATTR_BUFSIZ 1024 -DLL_IMP_EXP bxattr_exit_code SendXattrStream(JobControlRecord *jcr, xattr_data_t *xattr_data, int stream); -DLL_IMP_EXP void XattrDropInternalTable(alist *xattr_value_list); -DLL_IMP_EXP uint32_t SerializeXattrStream(JobControlRecord *jcr, xattr_data_t *xattr_data, +bxattr_exit_code SendXattrStream(JobControlRecord *jcr, xattr_data_t *xattr_data, int stream); +void XattrDropInternalTable(alist *xattr_value_list); +uint32_t SerializeXattrStream(JobControlRecord *jcr, xattr_data_t *xattr_data, uint32_t expected_serialize_len, alist *xattr_value_list); -DLL_IMP_EXP bxattr_exit_code UnSerializeXattrStream(JobControlRecord *jcr, xattr_data_t *xattr_data, char *content, +bxattr_exit_code UnSerializeXattrStream(JobControlRecord *jcr, xattr_data_t *xattr_data, char *content, uint32_t content_length, alist *xattr_value_list); -DLL_IMP_EXP bxattr_exit_code BuildXattrStreams(JobControlRecord *jcr, struct xattr_data_t *xattr_data, FindFilesPacket *ff_pkt); -DLL_IMP_EXP bxattr_exit_code ParseXattrStreams(JobControlRecord *jcr, struct xattr_data_t *xattr_data, +bxattr_exit_code BuildXattrStreams(JobControlRecord *jcr, struct xattr_data_t *xattr_data, FindFilesPacket *ff_pkt); +bxattr_exit_code ParseXattrStreams(JobControlRecord *jcr, struct xattr_data_t *xattr_data, int stream, char *content, uint32_t content_length); diff --git a/core/src/include/baconfig.h b/core/src/include/baconfig.h index ea2724bec72..9a7abc78587 100644 --- a/core/src/include/baconfig.h +++ b/core/src/include/baconfig.h @@ -105,19 +105,9 @@ void InitWinAPIWrapper(); #define ClearThreadId(x) memset(&(x), 0, sizeof(x)) -#define DLL_IMP_EXP -#define CATS_IMP_EXP -#define SD_IMP_EXP - #else /* HAVE_WIN32 */ #define ClearThreadId(x) x = 0 - -#define BAREOSCFG_DLL_IMP_EXP -#define DLL_IMP_EXP -#define CATS_IMP_EXP -#define SD_IMP_EXP - #define OSDependentInit() #endif /* HAVE_WIN32 */ @@ -553,18 +543,18 @@ msg_(__FILE__, __LINE__, buf, msg, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, class PoolMem; /* Edit message into Pool Memory buffer -- no __FILE__ and __LINE__ */ -DLL_IMP_EXP int Mmsg(POOLMEM *&msgbuf, const char *fmt, ...); -DLL_IMP_EXP int Mmsg(PoolMem &msgbuf, const char *fmt, ...); -DLL_IMP_EXP int Mmsg(PoolMem *&msgbuf, const char *fmt, ...); +int Mmsg(POOLMEM *&msgbuf, const char *fmt, ...); +int Mmsg(PoolMem &msgbuf, const char *fmt, ...); +int Mmsg(PoolMem *&msgbuf, const char *fmt, ...); class JobControlRecord; -DLL_IMP_EXP void d_msg(const char *file, int line, int level, const char *fmt, ...); -DLL_IMP_EXP void p_msg(const char *file, int line, int level, const char *fmt, ...); -DLL_IMP_EXP void p_msg_fb(const char *file, int line, int level, const char *fmt,...); -DLL_IMP_EXP void e_msg(const char *file, int line, int type, int level, const char *fmt, ...); -DLL_IMP_EXP void j_msg(const char *file, int line, JobControlRecord *jcr, int type, utime_t mtime, const char *fmt, ...); -DLL_IMP_EXP void q_msg(const char *file, int line, JobControlRecord *jcr, int type, utime_t mtime, const char *fmt, ...); -DLL_IMP_EXP int msg_(const char *file, int line, POOLMEM *&pool_buf, const char *fmt, ...); +void d_msg(const char *file, int line, int level, const char *fmt, ...); +void p_msg(const char *file, int line, int level, const char *fmt, ...); +void p_msg_fb(const char *file, int line, int level, const char *fmt,...); +void e_msg(const char *file, int line, int type, int level, const char *fmt, ...); +void j_msg(const char *file, int line, JobControlRecord *jcr, int type, utime_t mtime, const char *fmt, ...); +void q_msg(const char *file, int line, JobControlRecord *jcr, int type, utime_t mtime, const char *fmt, ...); +int msg_(const char *file, int line, POOLMEM *&pool_buf, const char *fmt, ...); #include "lib/bsys.h" #include "lib/scan.h" diff --git a/core/src/include/jcr.h b/core/src/include/jcr.h index a6a3661231f..8aaf860da10 100644 --- a/core/src/include/jcr.h +++ b/core/src/include/jcr.h @@ -305,7 +305,7 @@ typedef void (JCR_free_HANDLER)(JobControlRecord *jcr); /** * Job Control Record (JobControlRecord) */ -class DLL_IMP_EXP JobControlRecord { +class JobControlRecord { private: pthread_mutex_t mutex; /**< Jcr mutex */ volatile int32_t _use_count; /**< Use count */ @@ -669,25 +669,25 @@ struct s_last_job { }; extern struct s_last_job last_job; -extern DLL_IMP_EXP dlist *last_jobs; +extern dlist *last_jobs; /* * The following routines are found in lib/jcr.c */ -DLL_IMP_EXP extern int GetNextJobidFromList(char **p, uint32_t *JobId); -DLL_IMP_EXP extern bool InitJcrSubsystem(int timeout); -DLL_IMP_EXP extern JobControlRecord *new_jcr(int size, JCR_free_HANDLER *daemon_free_jcr); -DLL_IMP_EXP extern JobControlRecord *get_jcr_by_id(uint32_t JobId); -DLL_IMP_EXP extern JobControlRecord *get_jcr_by_session(uint32_t SessionId, uint32_t SessionTime); -DLL_IMP_EXP extern JobControlRecord *get_jcr_by_partial_name(char *Job); -DLL_IMP_EXP extern JobControlRecord *get_jcr_by_full_name(char *Job); -DLL_IMP_EXP extern const char *JcrGetAuthenticateKey(uint32_t job_id, const char *unified_job_name); -DLL_IMP_EXP extern JobControlRecord *get_next_jcr(JobControlRecord *jcr); -DLL_IMP_EXP extern void SetJcrJobStatus(JobControlRecord *jcr, int JobStatus); -DLL_IMP_EXP extern int DLL_IMP_EXP num_jobs_run; +extern int GetNextJobidFromList(char **p, uint32_t *JobId); +extern bool InitJcrSubsystem(int timeout); +extern JobControlRecord *new_jcr(int size, JCR_free_HANDLER *daemon_free_jcr); +extern JobControlRecord *get_jcr_by_id(uint32_t JobId); +extern JobControlRecord *get_jcr_by_session(uint32_t SessionId, uint32_t SessionTime); +extern JobControlRecord *get_jcr_by_partial_name(char *Job); +extern JobControlRecord *get_jcr_by_full_name(char *Job); +extern const char *JcrGetAuthenticateKey(uint32_t job_id, const char *unified_job_name); +extern JobControlRecord *get_next_jcr(JobControlRecord *jcr); +extern void SetJcrJobStatus(JobControlRecord *jcr, int JobStatus); +extern int num_jobs_run; #ifdef DEBUG -DLL_IMP_EXP extern void b_free_jcr(const char *file, int line, JobControlRecord *jcr); +extern void b_free_jcr(const char *file, int line, JobControlRecord *jcr); #define FreeJcr(jcr) b_free_jcr(__FILE__, __LINE__, (jcr)) #else extern void FreeJcr(JobControlRecord *jcr); @@ -697,6 +697,6 @@ extern void FreeJcr(JobControlRecord *jcr); * Used to display specific job information after a fatal signal */ typedef void (dbg_jcr_hook_t)(JobControlRecord *jcr, FILE *fp); -DLL_IMP_EXP extern void DbgJcrAddHook(dbg_jcr_hook_t *fct); +extern void DbgJcrAddHook(dbg_jcr_hook_t *fct); #endif /** BAREOS_INCLUDE_JCR_H_ */ diff --git a/core/src/lib/address_conf.h b/core/src/lib/address_conf.h index 79f22bfa393..fe220532e37 100644 --- a/core/src/lib/address_conf.h +++ b/core/src/lib/address_conf.h @@ -27,7 +27,7 @@ * address configuration */ -class DLL_IMP_EXP IPADDR : public SmartAlloc { +class IPADDR : public SmartAlloc { public: typedef enum { R_SINGLE, R_SINGLE_PORT, R_SINGLE_ADDR, R_MULTIPLE, R_DEFAULT, R_EMPTY @@ -75,23 +75,23 @@ class DLL_IMP_EXP IPADDR : public SmartAlloc { dlink link; }; -DLL_IMP_EXP void InitDefaultAddresses(dlist ** addr, const char *port); -DLL_IMP_EXP void FreeAddresses(dlist * addrs); +void InitDefaultAddresses(dlist ** addr, const char *port); +void FreeAddresses(dlist * addrs); -DLL_IMP_EXP const char *GetFirstAddress(dlist * addrs, char *outputbuf, int outlen); -DLL_IMP_EXP int GetFirstPortNetOrder(dlist * addrs); -DLL_IMP_EXP int GetFirstPortHostOrder(dlist * addrs); +const char *GetFirstAddress(dlist * addrs, char *outputbuf, int outlen); +int GetFirstPortNetOrder(dlist * addrs); +int GetFirstPortHostOrder(dlist * addrs); -DLL_IMP_EXP int AddAddress(dlist **out, IPADDR::i_type type, unsigned short defaultport, int family, +int AddAddress(dlist **out, IPADDR::i_type type, unsigned short defaultport, int family, const char *hostname_str, const char *port_str, char *buf, int buflen); -DLL_IMP_EXP const char *BuildAddressesString(dlist *addrs, char *buf, int blen, bool print_port=true); +const char *BuildAddressesString(dlist *addrs, char *buf, int blen, bool print_port=true); -DLL_IMP_EXP int SockaddrGetPortNetOrder(const struct sockaddr *sa); -DLL_IMP_EXP int SockaddrGetPort(const struct sockaddr *sa); -DLL_IMP_EXP char *SockaddrToAscii(const struct sockaddr *sa, char *buf, int len); +int SockaddrGetPortNetOrder(const struct sockaddr *sa); +int SockaddrGetPort(const struct sockaddr *sa); +char *SockaddrToAscii(const struct sockaddr *sa, char *buf, int len); #ifdef WIN32 #undef HAVE_OLD_SOCKOPT #endif #ifdef HAVE_OLD_SOCKOPT -DLL_IMP_EXP int inet_aton(const char *cp, struct in_addr *inp); +int inet_aton(const char *cp, struct in_addr *inp); #endif diff --git a/core/src/lib/alist.h b/core/src/lib/alist.h index e7f11f3a7e8..3fb14608b80 100644 --- a/core/src/lib/alist.h +++ b/core/src/lib/alist.h @@ -83,7 +83,7 @@ enum { * Array list -- much like a simplified STL vector * array of pointers to inserted items */ -class DLL_IMP_EXP alist : public SmartAlloc { +class alist : public SmartAlloc { void **items; int num_items; int max_items; diff --git a/core/src/lib/attr.h b/core/src/lib/attr.h index ccc5a355d7c..8269fe9d098 100644 --- a/core/src/lib/attr.h +++ b/core/src/lib/attr.h @@ -54,11 +54,11 @@ struct Attributes { JobControlRecord *jcr; /**< jcr pointer */ }; -DLL_IMP_EXP Attributes *new_attr(JobControlRecord *jcr); -DLL_IMP_EXP void FreeAttr(Attributes *attr); -DLL_IMP_EXP int UnpackAttributesRecord(JobControlRecord *jcr, int32_t stream, char *rec, int32_t reclen, Attributes *attr); -DLL_IMP_EXP void BuildAttrOutputFnames(JobControlRecord *jcr, Attributes *attr); -DLL_IMP_EXP const char *attr_to_str(PoolMem &resultbuffer, JobControlRecord *jcr, Attributes *attr); -DLL_IMP_EXP void PrintLsOutput(JobControlRecord *jcr, Attributes *attr); +Attributes *new_attr(JobControlRecord *jcr); +void FreeAttr(Attributes *attr); +int UnpackAttributesRecord(JobControlRecord *jcr, int32_t stream, char *rec, int32_t reclen, Attributes *attr); +void BuildAttrOutputFnames(JobControlRecord *jcr, Attributes *attr); +const char *attr_to_str(PoolMem &resultbuffer, JobControlRecord *jcr, Attributes *attr); +void PrintLsOutput(JobControlRecord *jcr, Attributes *attr); #endif /* BAREOS_LIB_ATTR_H_ */ diff --git a/core/src/lib/attribs.h b/core/src/lib/attribs.h index 23ad7d8e9ff..16ce8294a4c 100644 --- a/core/src/lib/attribs.h +++ b/core/src/lib/attribs.h @@ -22,8 +22,8 @@ #define BAREOS_LIB_ATTRIBS_H_ #include "include/baconfig.h" -DLL_IMP_EXP void EncodeStat(char *buf, struct stat *statp, int stat_size, int32_t LinkFI, int data_stream); -DLL_IMP_EXP int DecodeStat(char *buf, struct stat *statp, int stat_size, int32_t *LinkFI); -DLL_IMP_EXP int32_t DecodeLinkFI(char *buf, struct stat *statp, int stat_size); +void EncodeStat(char *buf, struct stat *statp, int stat_size, int32_t LinkFI, int data_stream); +int DecodeStat(char *buf, struct stat *statp, int stat_size, int32_t *LinkFI); +int32_t DecodeLinkFI(char *buf, struct stat *statp, int stat_size); #endif // BAREOS_LIB_ATTRIBS_H_ diff --git a/core/src/lib/bareos/message.cc b/core/src/lib/bareos/message.cc index cea4f3e67c7..71886a05c38 100644 --- a/core/src/lib/bareos/message.cc +++ b/core/src/lib/bareos/message.cc @@ -42,24 +42,24 @@ db_log_insert_func p_db_log_insert = NULL; /* * This is where we define "Globals" because all the daemons include this file. */ -DLL_IMP_EXP const char *working_directory = NULL; /* working directory path stored here */ -DLL_IMP_EXP const char *assert_msg = (char *)NULL; /* ASSERT2 error message */ -DLL_IMP_EXP int verbose = 0; /* increase User messages */ -DLL_IMP_EXP int debug_level = 0; /* debug level */ -DLL_IMP_EXP bool dbg_timestamp = false; /* print timestamp in debug output */ -DLL_IMP_EXP bool prt_kaboom = false; /* Print kaboom output */ -DLL_IMP_EXP utime_t daemon_start_time = 0; /* Daemon start time */ -DLL_IMP_EXP const char *version = VERSION " (" BDATE ")"; -DLL_IMP_EXP const char *dist_name = DISTNAME " " DISTVER; -DLL_IMP_EXP char my_name[128] = {0}; /* daemon name is stored here */ -DLL_IMP_EXP char host_name[256] = {0}; /* host machine name */ -DLL_IMP_EXP char *exepath = (char *)NULL; -DLL_IMP_EXP char *exename = (char *)NULL; -DLL_IMP_EXP int console_msg_pending = false; -DLL_IMP_EXP char con_fname[500]; /* Console filename */ -DLL_IMP_EXP FILE *con_fd = NULL; /* Console file descriptor */ -DLL_IMP_EXP brwlock_t con_lock; /* Console lock structure */ -DLL_IMP_EXP job_code_callback_t message_job_code_callback = NULL; /* Job code callback. Only used by director. */ +const char *working_directory = NULL; /* working directory path stored here */ +const char *assert_msg = (char *)NULL; /* ASSERT2 error message */ +int verbose = 0; /* increase User messages */ +int debug_level = 0; /* debug level */ +bool dbg_timestamp = false; /* print timestamp in debug output */ +bool prt_kaboom = false; /* Print kaboom output */ +utime_t daemon_start_time = 0; /* Daemon start time */ +const char *version = VERSION " (" BDATE ")"; +const char *dist_name = DISTNAME " " DISTVER; +char my_name[128] = {0}; /* daemon name is stored here */ +char host_name[256] = {0}; /* host machine name */ +char *exepath = (char *)NULL; +char *exename = (char *)NULL; +int console_msg_pending = false; +char con_fname[500]; /* Console filename */ +FILE *con_fd = NULL; /* Console file descriptor */ +brwlock_t con_lock; /* Console lock structure */ +job_code_callback_t message_job_code_callback = NULL; /* Job code callback. Only used by director. */ /* Forward referenced functions */ diff --git a/core/src/lib/bareos/tls.cc b/core/src/lib/bareos/tls.cc index 494b5f207e4..07fd8490bad 100644 --- a/core/src/lib/bareos/tls.cc +++ b/core/src/lib/bareos/tls.cc @@ -33,7 +33,7 @@ Tls::~Tls() return; } -DLL_IMP_EXP Tls *Tls::CreateNewTlsContext(Tls::TlsImplementationType type) +Tls *Tls::CreateNewTlsContext(Tls::TlsImplementationType type) { switch (type) { case Tls::TlsImplementationType::kTlsOpenSsl: diff --git a/core/src/lib/bareos/tls_conf_base.cc b/core/src/lib/bareos/tls_conf_base.cc index bb591e13c52..82e4396edb1 100644 --- a/core/src/lib/bareos/tls_conf_base.cc +++ b/core/src/lib/bareos/tls_conf_base.cc @@ -21,7 +21,7 @@ #include "include/bareos.h" #include "tls_conf.h" -DLL_IMP_EXP uint32_t GetLocalTlsPolicyFromConfiguration(TlsResource *tls_configuration) +uint32_t GetLocalTlsPolicyFromConfiguration(TlsResource *tls_configuration) { uint32_t merged_policy = TlsConfigBase::BNET_TLS_NONE; diff --git a/core/src/lib/base64.h b/core/src/lib/base64.h index e69934b399c..2404db93004 100644 --- a/core/src/lib/base64.h +++ b/core/src/lib/base64.h @@ -31,9 +31,9 @@ #define BASE64_SIZE(len) ((4 * len + 2) / 3 + 1) // #define BASE64_SIZE(len) (((len + 3 - (len % 3)) / 3) * 4) -DLL_IMP_EXP void Base64Init(void); -DLL_IMP_EXP int ToBase64(int64_t value, char *where); -DLL_IMP_EXP int FromBase64(int64_t *value, char *where); -DLL_IMP_EXP int BinToBase64(char *buf, int buflen, char *bin, int binlen, bool compatible); -DLL_IMP_EXP int Base64ToBin(char *dest, int destlen, char *src, int srclen); +void Base64Init(void); +int ToBase64(int64_t value, char *where); +int FromBase64(int64_t *value, char *where); +int BinToBase64(char *buf, int buflen, char *bin, int binlen, bool compatible); +int Base64ToBin(char *dest, int destlen, char *src, int srclen); diff --git a/core/src/lib/berrno.h b/core/src/lib/berrno.h index 5f93032ced7..6fae655a25c 100644 --- a/core/src/lib/berrno.h +++ b/core/src/lib/berrno.h @@ -51,7 +51,7 @@ * If bit 29 in berrno_ is not set, then it is a Unix errno. * */ -class DLL_IMP_EXP BErrNo : public SmartAlloc { +class BErrNo : public SmartAlloc { POOLMEM *buf_; int berrno_; void FormatWin32Message(); diff --git a/core/src/lib/bget_msg.h b/core/src/lib/bget_msg.h index 571aff04f60..f3edbd8542b 100644 --- a/core/src/lib/bget_msg.h +++ b/core/src/lib/bget_msg.h @@ -21,6 +21,6 @@ #ifndef BAREOS_LIB_BGET_MSG_H_ #define BAREOS_LIB_BGET_MSG_H_ -DLL_IMP_EXP int BgetMsg(BareosSocket *sock); +int BgetMsg(BareosSocket *sock); #endif // BAREOS_LIB_BGET_MSG_H_ diff --git a/core/src/lib/bnet.h b/core/src/lib/bnet.h index b797e014c1d..abc2df6512f 100644 --- a/core/src/lib/bnet.h +++ b/core/src/lib/bnet.h @@ -23,30 +23,30 @@ #include "tls.h" -DLL_IMP_EXP int32_t BnetRecv(BareosSocket *bsock); -DLL_IMP_EXP bool BnetSend(BareosSocket *bsock); -DLL_IMP_EXP bool BnetFsend(BareosSocket *bs, const char *fmt, ...); -DLL_IMP_EXP bool BnetSetBufferSize(BareosSocket *bs, uint32_t size, int rw); -DLL_IMP_EXP bool BnetSig(BareosSocket *bs, int sig); -DLL_IMP_EXP bool BnetTlsServer(BareosSocket *bsock, +int32_t BnetRecv(BareosSocket *bsock); +bool BnetSend(BareosSocket *bsock); +bool BnetFsend(BareosSocket *bs, const char *fmt, ...); +bool BnetSetBufferSize(BareosSocket *bs, uint32_t size, int rw); +bool BnetSig(BareosSocket *bs, int sig); +bool BnetTlsServer(BareosSocket *bsock, const std::vector &verify_list); -DLL_IMP_EXP bool BnetTlsClient(BareosSocket *bsock, +bool BnetTlsClient(BareosSocket *bsock, bool VerifyPeer, const std::vector &verify_list); -DLL_IMP_EXP int BnetGetPeer(BareosSocket *bs, char *buf, socklen_t buflen); -DLL_IMP_EXP BareosSocket *dup_bsock(BareosSocket *bsock); -DLL_IMP_EXP const char *BnetStrerror(BareosSocket *bsock); -DLL_IMP_EXP const char *BnetSigToAscii(BareosSocket *bsock); -DLL_IMP_EXP int BnetWaitData(BareosSocket *bsock, int sec); -DLL_IMP_EXP int BnetWaitDataIntr(BareosSocket *bsock, int sec); -DLL_IMP_EXP bool IsBnetStop(BareosSocket *bsock); -DLL_IMP_EXP int IsBnetError(BareosSocket *bsock); -DLL_IMP_EXP void BnetSuppressErrorMessages(BareosSocket *bsock, bool flag); -DLL_IMP_EXP dlist *BnetHost2IpAddrs(const char *host, int family, const char **errstr); -DLL_IMP_EXP int BnetSetBlocking(BareosSocket *sock); -DLL_IMP_EXP int BnetSetNonblocking(BareosSocket *sock); -DLL_IMP_EXP void BnetRestoreBlocking(BareosSocket *sock, int flags); -DLL_IMP_EXP int NetConnect(int port); -DLL_IMP_EXP BareosSocket *BnetBind(int port); -DLL_IMP_EXP BareosSocket *BnetAccept(BareosSocket *bsock, char *who); +int BnetGetPeer(BareosSocket *bs, char *buf, socklen_t buflen); +BareosSocket *dup_bsock(BareosSocket *bsock); +const char *BnetStrerror(BareosSocket *bsock); +const char *BnetSigToAscii(BareosSocket *bsock); +int BnetWaitData(BareosSocket *bsock, int sec); +int BnetWaitDataIntr(BareosSocket *bsock, int sec); +bool IsBnetStop(BareosSocket *bsock); +int IsBnetError(BareosSocket *bsock); +void BnetSuppressErrorMessages(BareosSocket *bsock, bool flag); +dlist *BnetHost2IpAddrs(const char *host, int family, const char **errstr); +int BnetSetBlocking(BareosSocket *sock); +int BnetSetNonblocking(BareosSocket *sock); +void BnetRestoreBlocking(BareosSocket *sock, int flags); +int NetConnect(int port); +BareosSocket *BnetBind(int port); +BareosSocket *BnetAccept(BareosSocket *bsock, char *who); #endif // BAREOS_LIB_BNET_H_ diff --git a/core/src/lib/bnet_sever_tcp.h b/core/src/lib/bnet_sever_tcp.h index c63fe5a9577..a3f0c06f132 100644 --- a/core/src/lib/bnet_sever_tcp.h +++ b/core/src/lib/bnet_sever_tcp.h @@ -23,8 +23,8 @@ class ConfigurationParser; -DLL_IMP_EXP void CleanupBnetThreadServerTcp(alist *sockfds, workq_t *client_wq); -DLL_IMP_EXP void BnetThreadServerTcp(dlist *addr_list, +void CleanupBnetThreadServerTcp(alist *sockfds, workq_t *client_wq); +void BnetThreadServerTcp(dlist *addr_list, int max_clients, alist *sockfds, workq_t *client_wq, @@ -32,6 +32,6 @@ DLL_IMP_EXP void BnetThreadServerTcp(dlist *addr_list, void *HandleConnectionRequest(ConfigurationParser *config, void *bsock), ConfigurationParser *config); -DLL_IMP_EXP void BnetStopThreadServerTcp(pthread_t tid); +void BnetStopThreadServerTcp(pthread_t tid); #endif // BAREOS_LIB_BNET_SEVER_TCP_H_ diff --git a/core/src/lib/bpipe.h b/core/src/lib/bpipe.h index 428debd4cbc..3148652588d 100644 --- a/core/src/lib/bpipe.h +++ b/core/src/lib/bpipe.h @@ -34,7 +34,7 @@ class Bpipe { FILE *wfd; }; -DLL_IMP_EXP Bpipe *OpenBpipe(char *prog, int wait, const char *mode, +Bpipe *OpenBpipe(char *prog, int wait, const char *mode, bool dup_stderr = true); -DLL_IMP_EXP int CloseWpipe(Bpipe *bpipe); -DLL_IMP_EXP int CloseBpipe(Bpipe *bpipe); +int CloseWpipe(Bpipe *bpipe); +int CloseBpipe(Bpipe *bpipe); diff --git a/core/src/lib/bpoll.h b/core/src/lib/bpoll.h index 08986025e8f..4a5e6534f64 100644 --- a/core/src/lib/bpoll.h +++ b/core/src/lib/bpoll.h @@ -22,7 +22,7 @@ #ifndef BAREOS_LIB_BPOLL_H_ #define BAREOS_LIB_BPOLL_H_ -DLL_IMP_EXP int WaitForReadableFd(int fd, int sec, bool ignore_interupts); -DLL_IMP_EXP int WaitForWritableFd(int fd, int sec, bool ignore_interupts); +int WaitForReadableFd(int fd, int sec, bool ignore_interupts); +int WaitForWritableFd(int fd, int sec, bool ignore_interupts); #endif // BAREOS_LIB_BPOLL_H_ diff --git a/core/src/lib/breg.h b/core/src/lib/breg.h index a82362f9e1e..b52cd2ef7fb 100644 --- a/core/src/lib/breg.h +++ b/core/src/lib/breg.h @@ -79,29 +79,29 @@ class BareosRegex { BareosRegex *NewBregexp(const char *motif); /* launch each bregexp on filename */ -DLL_IMP_EXP int RunBregexp(alist *bregexps, const char *fname); +int RunBregexp(alist *bregexps, const char *fname); /* free BareosRegex (and all POOLMEM) */ -DLL_IMP_EXP void FreeBregexp(BareosRegex *script); +void FreeBregexp(BareosRegex *script); /* fill an alist with BareosRegex from where */ -DLL_IMP_EXP alist *get_bregexps(const char *where); +alist *get_bregexps(const char *where); /* apply every regexps from the alist */ -DLL_IMP_EXP bool ApplyBregexps(const char *fname, alist *bregexps, char **result); +bool ApplyBregexps(const char *fname, alist *bregexps, char **result); /* foreach_alist free RunScript */ -DLL_IMP_EXP void FreeBregexps(alist *bregexps); /* you have to free alist */ +void FreeBregexps(alist *bregexps); /* you have to free alist */ /* get regexp size */ -DLL_IMP_EXP int BregexpGetBuildWhereSize(char *strip_prefix, +int BregexpGetBuildWhereSize(char *strip_prefix, char *add_prefix, char *add_suffix); /* get a bregexp string from user arguments * you must allocate it with BregexpGetBuildWhereSize(); */ -DLL_IMP_EXP char *bregexp_build_where(char *dest, int str_size, +char *bregexp_build_where(char *dest, int str_size, char *strip_prefix, char *add_prefix, char *add_suffix); @@ -109,6 +109,6 @@ DLL_IMP_EXP char *bregexp_build_where(char *dest, int str_size, /* escape a string to regexp format (sep and \) * dest must be long enough (dest = 2*src + 1) */ -DLL_IMP_EXP char *bregexp_escape_string(char *dest, const char *src, const char sep); +char *bregexp_escape_string(char *dest, const char *src, const char sep); #endif /* BAREOS_LIB_BREG_H_ */ diff --git a/core/src/lib/bregex.h b/core/src/lib/bregex.h index 985836fdb49..3a422f7cdd0 100644 --- a/core/src/lib/bregex.h +++ b/core/src/lib/bregex.h @@ -186,12 +186,12 @@ void ReCompileFastmap(regex_t *compiled); * to an array of 256 characters. */ -DLL_IMP_EXP int regcomp(regex_t *preg, const char *regex, int cflags); -DLL_IMP_EXP int regexec(regex_t *preg, const char *string, size_t nmatch, +int regcomp(regex_t *preg, const char *regex, int cflags); +int regexec(regex_t *preg, const char *string, size_t nmatch, regmatch_t pmatch[], int eflags); -DLL_IMP_EXP size_t regerror(int errcode, regex_t *preg, char *errbuf, +size_t regerror(int errcode, regex_t *preg, char *errbuf, size_t errbuf_size); -DLL_IMP_EXP void regfree(regex_t *preg); +void regfree(regex_t *preg); #endif /* REGEXPR_H */ diff --git a/core/src/lib/bsignal.h b/core/src/lib/bsignal.h index 4a66bd44fc3..77ab9e072d7 100644 --- a/core/src/lib/bsignal.h +++ b/core/src/lib/bsignal.h @@ -21,7 +21,7 @@ #ifndef BAREOS_LIB_BSIGNAL_H_ #define BAREOS_LIB_BSIGNAL_H_ -DLL_IMP_EXP void InitSignals(void Terminate(int sig)); -DLL_IMP_EXP void InitStackDump(void); +void InitSignals(void Terminate(int sig)); +void InitStackDump(void); #endif // BAREOS_LIB_BSIGNAL_H_ diff --git a/core/src/lib/bsock.h b/core/src/lib/bsock.h index b91c8c82f23..4a88eeafe2c 100644 --- a/core/src/lib/bsock.h +++ b/core/src/lib/bsock.h @@ -48,7 +48,7 @@ class Tls; btimer_t *StartBsockTimer(BareosSocket *bs, uint32_t wait); void StopBsockTimer(btimer_t *wid); -class DLL_IMP_EXP BareosSocket : public SmartAlloc { +class BareosSocket : public SmartAlloc { /* * Note, keep this public part before the private otherwise * bat breaks on some systems such as RedHat. diff --git a/core/src/lib/bsock_tcp.h b/core/src/lib/bsock_tcp.h index ba5383dc6a4..855cd2b1f26 100644 --- a/core/src/lib/bsock_tcp.h +++ b/core/src/lib/bsock_tcp.h @@ -22,7 +22,7 @@ #ifndef BAREOS_LIB_BSOCK_TCP_H_ #define BAREOS_LIB_BSOCK_TCP_H_ -class DLL_IMP_EXP BareosSocketTCP : public BareosSocket { +class BareosSocketTCP : public BareosSocket { private: /* * the header of a Bareos packet is 32 bit long. diff --git a/core/src/lib/bsys.h b/core/src/lib/bsys.h index 2ce8b1340c4..489c8d6bc76 100644 --- a/core/src/lib/bsys.h +++ b/core/src/lib/bsys.h @@ -21,58 +21,58 @@ #ifndef BAREOS_LIB_BSYS_H_ #define BAREOS_LIB_BSYS_H_ -DLL_IMP_EXP char *bstrinlinecpy(char *dest, const char *src); -DLL_IMP_EXP char *bstrncpy(char *dest, const char *src, int maxlen); -DLL_IMP_EXP char *bstrncpy(char *dest, PoolMem &src, int maxlen); -DLL_IMP_EXP char *bstrncat(char *dest, const char *src, int maxlen); -DLL_IMP_EXP char *bstrncat(char *dest, PoolMem &src, int maxlen); -DLL_IMP_EXP bool bstrcmp(const char *s1, const char *s2); -DLL_IMP_EXP bool bstrncmp(const char *s1, const char *s2, int n); -DLL_IMP_EXP bool Bstrcasecmp(const char *s1, const char *s2); -DLL_IMP_EXP bool bstrncasecmp(const char *s1, const char *s2, int n); -DLL_IMP_EXP int cstrlen(const char *str); -DLL_IMP_EXP void *b_malloc(const char *file, int line, size_t size); +char *bstrinlinecpy(char *dest, const char *src); +char *bstrncpy(char *dest, const char *src, int maxlen); +char *bstrncpy(char *dest, PoolMem &src, int maxlen); +char *bstrncat(char *dest, const char *src, int maxlen); +char *bstrncat(char *dest, PoolMem &src, int maxlen); +bool bstrcmp(const char *s1, const char *s2); +bool bstrncmp(const char *s1, const char *s2, int n); +bool Bstrcasecmp(const char *s1, const char *s2); +bool bstrncasecmp(const char *s1, const char *s2, int n); +int cstrlen(const char *str); +void *b_malloc(const char *file, int line, size_t size); #ifndef bmalloc -DLL_IMP_EXP void *bmalloc(size_t size); +void *bmalloc(size_t size); #endif -DLL_IMP_EXP void bfree(void *buf); -DLL_IMP_EXP void *brealloc(void *buf, size_t size); -DLL_IMP_EXP void *bcalloc(size_t size1, size_t size2); -DLL_IMP_EXP int Bsnprintf(char *str, int32_t size, const char *format, ...); -DLL_IMP_EXP int Bvsnprintf(char *str, int32_t size, const char *format, va_list ap); -DLL_IMP_EXP int PoolSprintf(char *pool_buf, const char *fmt, ...); -DLL_IMP_EXP void CreatePidFile(char *dir, const char *progname, int port); -DLL_IMP_EXP int DeletePidFile(char *dir, const char *progname, int port); -DLL_IMP_EXP void drop(char *uid, char *gid, bool keep_readall_caps); -DLL_IMP_EXP int Bmicrosleep(int32_t sec, int32_t usec); -DLL_IMP_EXP char *bfgets(char *s, int size, FILE *fd); -DLL_IMP_EXP char *bfgets(POOLMEM *&s, FILE *fd); -DLL_IMP_EXP void MakeUniqueFilename(POOLMEM *&name, int Id, char *what); +void bfree(void *buf); +void *brealloc(void *buf, size_t size); +void *bcalloc(size_t size1, size_t size2); +int Bsnprintf(char *str, int32_t size, const char *format, ...); +int Bvsnprintf(char *str, int32_t size, const char *format, va_list ap); +int PoolSprintf(char *pool_buf, const char *fmt, ...); +void CreatePidFile(char *dir, const char *progname, int port); +int DeletePidFile(char *dir, const char *progname, int port); +void drop(char *uid, char *gid, bool keep_readall_caps); +int Bmicrosleep(int32_t sec, int32_t usec); +char *bfgets(char *s, int size, FILE *fd); +char *bfgets(POOLMEM *&s, FILE *fd); +void MakeUniqueFilename(POOLMEM *&name, int Id, char *what); #ifndef HAVE_STRTOLL -DLL_IMP_EXP long long int strtoll(const char *ptr, char **endptr, int base); +long long int strtoll(const char *ptr, char **endptr, int base); #endif -DLL_IMP_EXP void ReadStateFile(char *dir, const char *progname, int port); -DLL_IMP_EXP int b_strerror(int errnum, char *buf, size_t bufsiz); -DLL_IMP_EXP char *escape_filename(const char *file_path); -DLL_IMP_EXP int Zdeflate(char *in, int in_len, char *out, int &out_len); -DLL_IMP_EXP int Zinflate(char *in, int in_len, char *out, int &out_len); -DLL_IMP_EXP void stack_trace(); -DLL_IMP_EXP int SaferUnlink(const char *pathname, const char *regex); -DLL_IMP_EXP int SecureErase(JobControlRecord *jcr, const char *pathname); -DLL_IMP_EXP void SetSecureEraseCmdline(const char *cmdline); -DLL_IMP_EXP bool PathExists(const char *path); -DLL_IMP_EXP bool PathExists(PoolMem &path); -DLL_IMP_EXP bool PathIsDirectory(const char *path); -DLL_IMP_EXP bool PathIsDirectory(PoolMem &path); -DLL_IMP_EXP bool PathContainsDirectory(const char *path); -DLL_IMP_EXP bool PathContainsDirectory(PoolMem &path); -DLL_IMP_EXP bool PathIsAbsolute(const char *path); -DLL_IMP_EXP bool PathIsAbsolute(PoolMem &path); -DLL_IMP_EXP bool PathGetDirectory(PoolMem &directory, PoolMem &path); -DLL_IMP_EXP bool PathAppend(char *path, const char *extra, unsigned int max_path); -DLL_IMP_EXP bool PathAppend(PoolMem &path, const char *extra); -DLL_IMP_EXP bool PathAppend(PoolMem &path, PoolMem &extra); -DLL_IMP_EXP bool PathCreate(const char *path, mode_t mode = 0750); -DLL_IMP_EXP bool PathCreate(PoolMem &path, mode_t mode = 0750); +void ReadStateFile(char *dir, const char *progname, int port); +int b_strerror(int errnum, char *buf, size_t bufsiz); +char *escape_filename(const char *file_path); +int Zdeflate(char *in, int in_len, char *out, int &out_len); +int Zinflate(char *in, int in_len, char *out, int &out_len); +void stack_trace(); +int SaferUnlink(const char *pathname, const char *regex); +int SecureErase(JobControlRecord *jcr, const char *pathname); +void SetSecureEraseCmdline(const char *cmdline); +bool PathExists(const char *path); +bool PathExists(PoolMem &path); +bool PathIsDirectory(const char *path); +bool PathIsDirectory(PoolMem &path); +bool PathContainsDirectory(const char *path); +bool PathContainsDirectory(PoolMem &path); +bool PathIsAbsolute(const char *path); +bool PathIsAbsolute(PoolMem &path); +bool PathGetDirectory(PoolMem &directory, PoolMem &path); +bool PathAppend(char *path, const char *extra, unsigned int max_path); +bool PathAppend(PoolMem &path, const char *extra); +bool PathAppend(PoolMem &path, PoolMem &extra); +bool PathCreate(const char *path, mode_t mode = 0750); +bool PathCreate(PoolMem &path, mode_t mode = 0750); #endif // BAREOS_LIB_BSYS_H_ diff --git a/core/src/lib/btime.h b/core/src/lib/btime.h index 6a21375648f..a5b013b9f0e 100644 --- a/core/src/lib/btime.h +++ b/core/src/lib/btime.h @@ -23,21 +23,21 @@ #define BAREOS_LIB_BTIME_H_ /* New btime definition -- use this */ -DLL_IMP_EXP btime_t GetCurrentBtime(void); -DLL_IMP_EXP time_t BtimeToUnix(btime_t bt); /* bareos time to epoch time */ -DLL_IMP_EXP utime_t BtimeToUtime(btime_t bt); /* bareos time to utime_t */ +btime_t GetCurrentBtime(void); +time_t BtimeToUnix(btime_t bt); /* bareos time to epoch time */ +utime_t BtimeToUtime(btime_t bt); /* bareos time to utime_t */ -DLL_IMP_EXP int tm_wom(int mday, int wday); -DLL_IMP_EXP int TmWoy(time_t stime); +int tm_wom(int mday, int wday); +int TmWoy(time_t stime); -DLL_IMP_EXP void Blocaltime(const time_t *time, struct tm *tm); -DLL_IMP_EXP char *bstrutime(char *dt, int maxlen, utime_t tim); -DLL_IMP_EXP char *bstrftime(char *dt, int maxlen, utime_t tim, const char *fmt = NULL); -DLL_IMP_EXP char *bstrftimes(char *dt, int maxlen, utime_t tim); -DLL_IMP_EXP char *bstrftime_ny(char *dt, int maxlen, utime_t tim); -DLL_IMP_EXP char *bstrftime_nc(char *dt, int maxlen, utime_t tim); -DLL_IMP_EXP char *bstrftime_wd(char *dt, int maxlen, utime_t tim); -DLL_IMP_EXP utime_t StrToUtime(const char *str); +void Blocaltime(const time_t *time, struct tm *tm); +char *bstrutime(char *dt, int maxlen, utime_t tim); +char *bstrftime(char *dt, int maxlen, utime_t tim, const char *fmt = NULL); +char *bstrftimes(char *dt, int maxlen, utime_t tim); +char *bstrftime_ny(char *dt, int maxlen, utime_t tim); +char *bstrftime_nc(char *dt, int maxlen, utime_t tim); +char *bstrftime_wd(char *dt, int maxlen, utime_t tim); +utime_t StrToUtime(const char *str); /* =========================================================== */ @@ -86,8 +86,8 @@ extern void date_time_decode(struct date_time *dt, extern int DateTimeCompare(struct date_time *dt1, struct date_time *dt2); extern void TmEncode(struct date_time *dt, struct tm *tm); -DLL_IMP_EXP extern void TmDecode(struct date_time *dt, struct tm *tm); -DLL_IMP_EXP extern void get_current_time(struct date_time *dt); +extern void TmDecode(struct date_time *dt, struct tm *tm); +extern void get_current_time(struct date_time *dt); #endif /* BAREOS_LIB_BTIME_H_ */ diff --git a/core/src/lib/btimers.h b/core/src/lib/btimers.h index 22ceac63d5e..8d5a483a0f9 100644 --- a/core/src/lib/btimers.h +++ b/core/src/lib/btimers.h @@ -41,11 +41,11 @@ struct btimer_t { JobControlRecord *jcr; /**< Pointer to job control record */ }; -DLL_IMP_EXP btimer_t *start_child_timer(JobControlRecord *jcr, pid_t pid, uint32_t wait); -DLL_IMP_EXP void StopChildTimer(btimer_t *wid); -DLL_IMP_EXP btimer_t *start_thread_timer(JobControlRecord *jcr, pthread_t tid, uint32_t wait); -DLL_IMP_EXP void StopThreadTimer(btimer_t *wid); -DLL_IMP_EXP btimer_t *StartBsockTimer(BareosSocket *bs, uint32_t wait); -DLL_IMP_EXP void StopBsockTimer(btimer_t *wid); +btimer_t *start_child_timer(JobControlRecord *jcr, pid_t pid, uint32_t wait); +void StopChildTimer(btimer_t *wid); +btimer_t *start_thread_timer(JobControlRecord *jcr, pthread_t tid, uint32_t wait); +void StopThreadTimer(btimer_t *wid); +btimer_t *StartBsockTimer(BareosSocket *bs, uint32_t wait); +void StopBsockTimer(btimer_t *wid); #endif /* BAREOS_LIB_BTIMERS_H_ */ diff --git a/core/src/lib/cbuf.h b/core/src/lib/cbuf.h index de1799b5a51..d881f134a32 100644 --- a/core/src/lib/cbuf.h +++ b/core/src/lib/cbuf.h @@ -29,7 +29,7 @@ #define QSIZE 10 /**< # of pointers in the queue */ -class DLL_IMP_EXP CircularBuffer : public SmartAlloc { +class CircularBuffer : public SmartAlloc { int size_; int next_in_; int next_out_; diff --git a/core/src/lib/compression.h b/core/src/lib/compression.h index 6dfb3bc6331..94a102374c8 100644 --- a/core/src/lib/compression.h +++ b/core/src/lib/compression.h @@ -21,16 +21,16 @@ #ifndef BAREOS_LIB_COMPRESSION_H_ #define BAREOS_LIB_COMPRESSION_H_ -DLL_IMP_EXP const char *cmprs_algo_to_text(uint32_t compression_algorithm); -DLL_IMP_EXP bool SetupCompressionBuffers(JobControlRecord *jcr, bool compatible, +const char *cmprs_algo_to_text(uint32_t compression_algorithm); +bool SetupCompressionBuffers(JobControlRecord *jcr, bool compatible, uint32_t compression_algorithm, uint32_t *compress_buf_size); -DLL_IMP_EXP bool SetupDecompressionBuffers(JobControlRecord *jcr, uint32_t *decompress_buf_size); -DLL_IMP_EXP bool CompressData(JobControlRecord *jcr, uint32_t compression_algorithm, char *rbuf, +bool SetupDecompressionBuffers(JobControlRecord *jcr, uint32_t *decompress_buf_size); +bool CompressData(JobControlRecord *jcr, uint32_t compression_algorithm, char *rbuf, uint32_t rsize, unsigned char *cbuf, uint32_t max_compress_len, uint32_t *compress_len); -DLL_IMP_EXP bool DecompressData(JobControlRecord *jcr, const char *last_fname, int32_t stream, +bool DecompressData(JobControlRecord *jcr, const char *last_fname, int32_t stream, char **data, uint32_t *length, bool want_data_stream); -DLL_IMP_EXP void CleanupCompression(JobControlRecord *jcr); +void CleanupCompression(JobControlRecord *jcr); #endif // BAREOS_LIB_COMPRESSION_H_ diff --git a/core/src/lib/connection_pool.h b/core/src/lib/connection_pool.h index 7d0aa75a084..8b506d0441a 100644 --- a/core/src/lib/connection_pool.h +++ b/core/src/lib/connection_pool.h @@ -28,7 +28,7 @@ #ifndef BAREOS_LIB_CONNECTION_POOL_H_ #define BAREOS_LIB_CONNECTION_POOL_H_ -class DLL_IMP_EXP Connection : public SmartAlloc { +class Connection : public SmartAlloc { public: Connection(const char* name, int protocol_version, BareosSocket* socket, bool authenticated = true); ~Connection(); @@ -57,7 +57,7 @@ class DLL_IMP_EXP Connection : public SmartAlloc { pthread_mutex_t mutex_; }; -class DLL_IMP_EXP ConnectionPool : public SmartAlloc { +class ConnectionPool : public SmartAlloc { public: ConnectionPool(); ~ConnectionPool(); diff --git a/core/src/lib/cram_md5.h b/core/src/lib/cram_md5.h index 8ed40e251e8..97a0fa231da 100644 --- a/core/src/lib/cram_md5.h +++ b/core/src/lib/cram_md5.h @@ -40,8 +40,8 @@ class CramMd5Handshake void InitRandom() const; }; -DLL_IMP_EXP bool cram_md5_respond(BareosSocket *bs, const char *password, uint32_t *remote_tls_policy, bool *compatible); -DLL_IMP_EXP bool cram_md5_challenge(BareosSocket *bs, const char *password, uint32_t local_tls_policy, bool compatible); -DLL_IMP_EXP void hmac_md5(uint8_t *text, int text_len, uint8_t *key, int key_len, uint8_t *hmac); +bool cram_md5_respond(BareosSocket *bs, const char *password, uint32_t *remote_tls_policy, bool *compatible); +bool cram_md5_challenge(BareosSocket *bs, const char *password, uint32_t local_tls_policy, bool compatible); +void hmac_md5(uint8_t *text, int text_len, uint8_t *key, int key_len, uint8_t *hmac); #endif // LIB_CRAM_MD5_H_ diff --git a/core/src/lib/crypto.h b/core/src/lib/crypto.h index b9eb86d5ff0..d4e845c77b1 100644 --- a/core/src/lib/crypto.h +++ b/core/src/lib/crypto.h @@ -130,39 +130,39 @@ typedef enum { #endif /* HAVE_OPENSSL */ -DLL_IMP_EXP int InitCrypto(void); -DLL_IMP_EXP int CleanupCrypto(void); -DLL_IMP_EXP DIGEST *crypto_digest_new(JobControlRecord *jcr, crypto_digest_t type); -DLL_IMP_EXP bool CryptoDigestUpdate(DIGEST *digest, const uint8_t *data, uint32_t length); -DLL_IMP_EXP bool CryptoDigestFinalize(DIGEST *digest, uint8_t *dest, uint32_t *length); -DLL_IMP_EXP void CryptoDigestFree(DIGEST *digest); -DLL_IMP_EXP SIGNATURE *crypto_sign_new(JobControlRecord *jcr); -DLL_IMP_EXP crypto_error_t CryptoSignGetDigest(SIGNATURE *sig, X509_KEYPAIR *keypair, +int InitCrypto(void); +int CleanupCrypto(void); +DIGEST *crypto_digest_new(JobControlRecord *jcr, crypto_digest_t type); +bool CryptoDigestUpdate(DIGEST *digest, const uint8_t *data, uint32_t length); +bool CryptoDigestFinalize(DIGEST *digest, uint8_t *dest, uint32_t *length); +void CryptoDigestFree(DIGEST *digest); +SIGNATURE *crypto_sign_new(JobControlRecord *jcr); +crypto_error_t CryptoSignGetDigest(SIGNATURE *sig, X509_KEYPAIR *keypair, crypto_digest_t &algorithm, DIGEST **digest); -DLL_IMP_EXP crypto_error_t CryptoSignVerify(SIGNATURE *sig, X509_KEYPAIR *keypair, DIGEST *digest); -DLL_IMP_EXP int CryptoSignAddSigner(SIGNATURE *sig, DIGEST *digest, X509_KEYPAIR *keypair); -DLL_IMP_EXP int CryptoSignEncode(SIGNATURE *sig, uint8_t *dest, uint32_t *length); -DLL_IMP_EXP SIGNATURE *crypto_sign_decode(JobControlRecord *jcr, const uint8_t *sigData, uint32_t length); -DLL_IMP_EXP void CryptoSignFree(SIGNATURE *sig); -DLL_IMP_EXP CRYPTO_SESSION *crypto_session_new(crypto_cipher_t cipher, alist *pubkeys); -DLL_IMP_EXP void CryptoSessionFree(CRYPTO_SESSION *cs); -DLL_IMP_EXP bool CryptoSessionEncode(CRYPTO_SESSION *cs, uint8_t *dest, uint32_t *length); -DLL_IMP_EXP crypto_error_t CryptoSessionDecode(const uint8_t *data, uint32_t length, alist *keypairs, CRYPTO_SESSION **session); -DLL_IMP_EXP CRYPTO_SESSION *CryptoSessionDecode(const uint8_t *data, uint32_t length); -DLL_IMP_EXP CIPHER_CONTEXT *crypto_cipher_new(CRYPTO_SESSION *cs, bool encrypt, uint32_t *blocksize); -DLL_IMP_EXP bool CryptoCipherUpdate(CIPHER_CONTEXT *cipher_ctx, const uint8_t *data, uint32_t length, const uint8_t *dest, uint32_t *written); -DLL_IMP_EXP bool CryptoCipherFinalize(CIPHER_CONTEXT *cipher_ctx, uint8_t *dest, uint32_t *written); -DLL_IMP_EXP void CryptoCipherFree(CIPHER_CONTEXT *cipher_ctx); -DLL_IMP_EXP X509_KEYPAIR *crypto_keypair_new(void); -DLL_IMP_EXP X509_KEYPAIR *crypto_keypair_dup(X509_KEYPAIR *keypair); -DLL_IMP_EXP int CryptoKeypairLoadCert(X509_KEYPAIR *keypair, const char *file); -DLL_IMP_EXP bool CryptoKeypairHasKey(const char *file); -DLL_IMP_EXP int CryptoKeypairLoadKey(X509_KEYPAIR *keypair, const char *file, CRYPTO_PEM_PASSWD_CB *pem_callback, const void *pem_userdata); -DLL_IMP_EXP void CryptoKeypairFree(X509_KEYPAIR *keypair); -DLL_IMP_EXP int CryptoDefaultPemCallback(char *buf, int size, const void *userdata); -DLL_IMP_EXP const char *crypto_digest_name(crypto_digest_t type); -DLL_IMP_EXP const char *crypto_digest_name(DIGEST *digest); -DLL_IMP_EXP crypto_digest_t CryptoDigestStreamType(int stream); -DLL_IMP_EXP const char *crypto_strerror(crypto_error_t error); +crypto_error_t CryptoSignVerify(SIGNATURE *sig, X509_KEYPAIR *keypair, DIGEST *digest); +int CryptoSignAddSigner(SIGNATURE *sig, DIGEST *digest, X509_KEYPAIR *keypair); +int CryptoSignEncode(SIGNATURE *sig, uint8_t *dest, uint32_t *length); +SIGNATURE *crypto_sign_decode(JobControlRecord *jcr, const uint8_t *sigData, uint32_t length); +void CryptoSignFree(SIGNATURE *sig); +CRYPTO_SESSION *crypto_session_new(crypto_cipher_t cipher, alist *pubkeys); +void CryptoSessionFree(CRYPTO_SESSION *cs); +bool CryptoSessionEncode(CRYPTO_SESSION *cs, uint8_t *dest, uint32_t *length); +crypto_error_t CryptoSessionDecode(const uint8_t *data, uint32_t length, alist *keypairs, CRYPTO_SESSION **session); +CRYPTO_SESSION *CryptoSessionDecode(const uint8_t *data, uint32_t length); +CIPHER_CONTEXT *crypto_cipher_new(CRYPTO_SESSION *cs, bool encrypt, uint32_t *blocksize); +bool CryptoCipherUpdate(CIPHER_CONTEXT *cipher_ctx, const uint8_t *data, uint32_t length, const uint8_t *dest, uint32_t *written); +bool CryptoCipherFinalize(CIPHER_CONTEXT *cipher_ctx, uint8_t *dest, uint32_t *written); +void CryptoCipherFree(CIPHER_CONTEXT *cipher_ctx); +X509_KEYPAIR *crypto_keypair_new(void); +X509_KEYPAIR *crypto_keypair_dup(X509_KEYPAIR *keypair); +int CryptoKeypairLoadCert(X509_KEYPAIR *keypair, const char *file); +bool CryptoKeypairHasKey(const char *file); +int CryptoKeypairLoadKey(X509_KEYPAIR *keypair, const char *file, CRYPTO_PEM_PASSWD_CB *pem_callback, const void *pem_userdata); +void CryptoKeypairFree(X509_KEYPAIR *keypair); +int CryptoDefaultPemCallback(char *buf, int size, const void *userdata); +const char *crypto_digest_name(crypto_digest_t type); +const char *crypto_digest_name(DIGEST *digest); +crypto_digest_t CryptoDigestStreamType(int stream); +const char *crypto_strerror(crypto_error_t error); #endif /* BAREOS_LIB_CRYPTO_H_ */ diff --git a/core/src/lib/crypto_cache.h b/core/src/lib/crypto_cache.h index 17b8e27fcd7..e0358bc7018 100644 --- a/core/src/lib/crypto_cache.h +++ b/core/src/lib/crypto_cache.h @@ -45,14 +45,14 @@ struct crypto_cache_entry_t { utime_t added; }; -DLL_IMP_EXP void ReadCryptoCache(const char *dir, const char *progname, int port); -DLL_IMP_EXP void ReadCryptoCache(const char *cache_file); -DLL_IMP_EXP void WriteCryptoCache(const char *dir, const char *progname, int port); -DLL_IMP_EXP void WriteCryptoCache(const char *cache_file); -DLL_IMP_EXP bool UpdateCryptoCache(const char *VolumeName, const char *EncryptionKey); -DLL_IMP_EXP char *lookup_crypto_cache_entry(const char *VolumeName); -DLL_IMP_EXP void DumpCryptoCache(int fd); -DLL_IMP_EXP void ResetCryptoCache(void); -DLL_IMP_EXP void FlushCryptoCache(void); +void ReadCryptoCache(const char *dir, const char *progname, int port); +void ReadCryptoCache(const char *cache_file); +void WriteCryptoCache(const char *dir, const char *progname, int port); +void WriteCryptoCache(const char *cache_file); +bool UpdateCryptoCache(const char *VolumeName, const char *EncryptionKey); +char *lookup_crypto_cache_entry(const char *VolumeName); +void DumpCryptoCache(int fd); +void ResetCryptoCache(void); +void FlushCryptoCache(void); #endif /* BAREOS_LIB_CRYPTO_CACHE_H_ */ diff --git a/core/src/lib/crypto_openssl.h b/core/src/lib/crypto_openssl.h index eeaa2a22775..cba86f11d1e 100644 --- a/core/src/lib/crypto_openssl.h +++ b/core/src/lib/crypto_openssl.h @@ -22,12 +22,12 @@ #define BAREOS_LIB_CRYPTO_OPENSSL_H_ #ifdef HAVE_OPENSSL -DLL_IMP_EXP void OpensslPostErrors(int code, const char *errstring); -DLL_IMP_EXP void OpensslPostErrors(JobControlRecord *jcr, int code, const char *errstring); -DLL_IMP_EXP int OpensslInitThreads(void); -DLL_IMP_EXP void OpensslCleanupThreads(void); -DLL_IMP_EXP int OpensslSeedPrng(void); -DLL_IMP_EXP int OpensslSavePrng(void); +void OpensslPostErrors(int code, const char *errstring); +void OpensslPostErrors(JobControlRecord *jcr, int code, const char *errstring); +int OpensslInitThreads(void); +void OpensslCleanupThreads(void); +int OpensslSeedPrng(void); +int OpensslSavePrng(void); #endif /* HAVE_OPENSSL */ #endif // BAREOS_LIB_CRYPTO_OPENSSL_H_ diff --git a/core/src/lib/crypto_wrap.h b/core/src/lib/crypto_wrap.h index 2aac823c1f9..480ba110f33 100644 --- a/core/src/lib/crypto_wrap.h +++ b/core/src/lib/crypto_wrap.h @@ -22,7 +22,7 @@ #ifndef BAREOS_LIB_CRYPTO_WRAP_H_ #define BAREOS_LIB_CRYPTO_WRAP_H_ -DLL_IMP_EXP void AesWrap(uint8_t *kek, int n, uint8_t *plain, uint8_t *cipher); -DLL_IMP_EXP int AesUnwrap(uint8_t *kek, int n, uint8_t *cipher, uint8_t *plain); +void AesWrap(uint8_t *kek, int n, uint8_t *plain, uint8_t *cipher); +int AesUnwrap(uint8_t *kek, int n, uint8_t *cipher, uint8_t *plain); #endif // BAREOS_LIB_CRYPTO_WRAP_H_ diff --git a/core/src/lib/daemon.h b/core/src/lib/daemon.h index 2357d7095a4..5ba6273f1bc 100644 --- a/core/src/lib/daemon.h +++ b/core/src/lib/daemon.h @@ -21,6 +21,6 @@ #ifndef BAREOS_LIB_DAEMON_H_ #define BAREOS_LIB_DAEMON_H_ -DLL_IMP_EXP void daemon_start(); +void daemon_start(); #endif // BAREOS_LIB_DAEMON_H_ diff --git a/core/src/lib/dlist.h b/core/src/lib/dlist.h index 1511c749619..dab494e825b 100644 --- a/core/src/lib/dlist.h +++ b/core/src/lib/dlist.h @@ -54,7 +54,7 @@ struct dlink { void *prev; }; -class DLL_IMP_EXP dlist : public SmartAlloc { +class dlist : public SmartAlloc { void *head; void *tail; int16_t loffset; @@ -199,5 +199,5 @@ class dlistString */ }; -DLL_IMP_EXP extern dlistString *new_dlistString(const char *str, int len); -DLL_IMP_EXP extern dlistString *new_dlistString(const char *str); +extern dlistString *new_dlistString(const char *str, int len); +extern dlistString *new_dlistString(const char *str); diff --git a/core/src/lib/edit.h b/core/src/lib/edit.h index 9cd0bf26958..3f9281de5c3 100644 --- a/core/src/lib/edit.h +++ b/core/src/lib/edit.h @@ -21,25 +21,25 @@ #ifndef BAREOS_LIB_EDIT_H_ #define BAREOS_LIB_EDIT_H_ -DLL_IMP_EXP uint64_t str_to_uint64(const char *str); -DLL_IMP_EXP int64_t str_to_int64(const char *str); +uint64_t str_to_uint64(const char *str); +int64_t str_to_int64(const char *str); #define str_to_int16(str)((int16_t)str_to_int64(str)) #define str_to_int32(str)((int32_t)str_to_int64(str)) -DLL_IMP_EXP char *edit_uint64_with_commas(uint64_t val, char *buf); -DLL_IMP_EXP char *edit_uint64_with_suffix(uint64_t val, char *buf); -DLL_IMP_EXP char *add_commas(char *val, char *buf); -DLL_IMP_EXP char *edit_uint64(uint64_t val, char *buf); -DLL_IMP_EXP char *edit_int64(int64_t val, char *buf); -DLL_IMP_EXP char *edit_int64_with_commas(int64_t val, char *buf); -DLL_IMP_EXP bool DurationToUtime(char *str, utime_t *value); -DLL_IMP_EXP bool size_to_uint64(char *str, uint64_t *value); -DLL_IMP_EXP bool speed_to_uint64(char *str, uint64_t *value); -DLL_IMP_EXP char *edit_utime(utime_t val, char *buf, int buf_len); -DLL_IMP_EXP char *edit_pthread(pthread_t val, char *buf, int buf_len); -DLL_IMP_EXP bool Is_a_number(const char *num); -DLL_IMP_EXP bool Is_a_number_list(const char *n); -DLL_IMP_EXP bool IsAnInteger(const char *n); -DLL_IMP_EXP bool IsNameValid(const char *name, POOLMEM *&msg); -DLL_IMP_EXP bool IsNameValid(const char *name); +char *edit_uint64_with_commas(uint64_t val, char *buf); +char *edit_uint64_with_suffix(uint64_t val, char *buf); +char *add_commas(char *val, char *buf); +char *edit_uint64(uint64_t val, char *buf); +char *edit_int64(int64_t val, char *buf); +char *edit_int64_with_commas(int64_t val, char *buf); +bool DurationToUtime(char *str, utime_t *value); +bool size_to_uint64(char *str, uint64_t *value); +bool speed_to_uint64(char *str, uint64_t *value); +char *edit_utime(utime_t val, char *buf, int buf_len); +char *edit_pthread(pthread_t val, char *buf, int buf_len); +bool Is_a_number(const char *num); +bool Is_a_number_list(const char *n); +bool IsAnInteger(const char *n); +bool IsNameValid(const char *name, POOLMEM *&msg); +bool IsNameValid(const char *name); #endif // BAREOS_LIB_EDIT_H_ diff --git a/core/src/lib/fnmatch.h b/core/src/lib/fnmatch.h index cbe45dce7ad..74546184963 100644 --- a/core/src/lib/fnmatch.h +++ b/core/src/lib/fnmatch.h @@ -50,6 +50,6 @@ #define FNM_IGNORECASE FNM_CASEFOLD #define FNM_FILE_NAME FNM_PATHNAME -extern "C" DLL_IMP_EXP int fnmatch(const char *, const char *, int); +extern "C" int fnmatch(const char *, const char *, int); #endif /* !BAREOS_LIB_FNMATCH_H_ */ diff --git a/core/src/lib/guid_to_name.h b/core/src/lib/guid_to_name.h index 11e4a68d07d..da65daca0b0 100644 --- a/core/src/lib/guid_to_name.h +++ b/core/src/lib/guid_to_name.h @@ -28,7 +28,7 @@ * for performance reasons. */ -class DLL_IMP_EXP guid_list { +class guid_list { public: dlist *uid_list; dlist *gid_list; @@ -37,5 +37,5 @@ class DLL_IMP_EXP guid_list { char *gid_to_name(gid_t gid, char *name, int maxlen); }; -DLL_IMP_EXP guid_list *new_guid_list(); -DLL_IMP_EXP void FreeGuidList(guid_list *list); +guid_list *new_guid_list(); +void FreeGuidList(guid_list *list); diff --git a/core/src/lib/htable.h b/core/src/lib/htable.h index 25d43238805..f3142424900 100644 --- a/core/src/lib/htable.h +++ b/core/src/lib/htable.h @@ -85,7 +85,7 @@ struct h_mem { #pragma pack(pop) #endif -class DLL_IMP_EXP htable : public SmartAlloc { +class htable : public SmartAlloc { hlink **table; /* Hash table */ int loffset; /* Link offset in item */ hlink *walkptr; /* Table walk pointer */ diff --git a/core/src/lib/jcr.h b/core/src/lib/jcr.h index 71b4ca99e65..252ed37ddf0 100644 --- a/core/src/lib/jcr.h +++ b/core/src/lib/jcr.h @@ -22,24 +22,24 @@ #define BAREOS_LIB_JCR_H_ class JobControlRecord; -DLL_IMP_EXP void InitLastJobsList(); -DLL_IMP_EXP void TermLastJobsList(); -DLL_IMP_EXP void LockLastJobsList(); -DLL_IMP_EXP void UnlockLastJobsList(); -DLL_IMP_EXP bool ReadLastJobsList(int fd, uint64_t addr); -DLL_IMP_EXP uint64_t WriteLastJobsList(int fd, uint64_t addr); -DLL_IMP_EXP void WriteStateFile(char *dir, const char *progname, int port); -DLL_IMP_EXP void RegisterJobEndCallback(JobControlRecord *jcr, void JobEndCb(JobControlRecord *jcr,void *), void *ctx); -DLL_IMP_EXP void LockJobs(); -DLL_IMP_EXP void UnlockJobs(); -DLL_IMP_EXP JobControlRecord *jcr_walk_start(); -DLL_IMP_EXP JobControlRecord *jcr_walk_next(JobControlRecord *prev_jcr); -DLL_IMP_EXP void JcrWalkEnd(JobControlRecord *jcr); -DLL_IMP_EXP int JobCount(); -DLL_IMP_EXP JobControlRecord *get_jcr_from_tsd(); -DLL_IMP_EXP void SetJcrInTsd(JobControlRecord *jcr); -DLL_IMP_EXP void RemoveJcrFromTsd(JobControlRecord *jcr); -DLL_IMP_EXP uint32_t GetJobidFromTsd(); -DLL_IMP_EXP uint32_t GetJobidFromTid(pthread_t tid); +void InitLastJobsList(); +void TermLastJobsList(); +void LockLastJobsList(); +void UnlockLastJobsList(); +bool ReadLastJobsList(int fd, uint64_t addr); +uint64_t WriteLastJobsList(int fd, uint64_t addr); +void WriteStateFile(char *dir, const char *progname, int port); +void RegisterJobEndCallback(JobControlRecord *jcr, void JobEndCb(JobControlRecord *jcr,void *), void *ctx); +void LockJobs(); +void UnlockJobs(); +JobControlRecord *jcr_walk_start(); +JobControlRecord *jcr_walk_next(JobControlRecord *prev_jcr); +void JcrWalkEnd(JobControlRecord *jcr); +int JobCount(); +JobControlRecord *get_jcr_from_tsd(); +void SetJcrInTsd(JobControlRecord *jcr); +void RemoveJcrFromTsd(JobControlRecord *jcr); +uint32_t GetJobidFromTsd(); +uint32_t GetJobidFromTid(pthread_t tid); #endif // BAREOS_LIB_JCR_H_ diff --git a/core/src/lib/json.h b/core/src/lib/json.h index 16065b9855c..ba3b4ba6f2a 100644 --- a/core/src/lib/json.h +++ b/core/src/lib/json.h @@ -21,6 +21,6 @@ #ifndef BAREOS_LIB_JSON_H_ #define BAREOS_LIB_JSON_H_ -DLL_IMP_EXP void InitializeJson(); +void InitializeJson(); #endif // BAREOS_LIB_JSON_H_ diff --git a/core/src/lib/lex.h b/core/src/lib/lex.h index e248d766353..4f1e579b120 100644 --- a/core/src/lib/lex.h +++ b/core/src/lib/lex.h @@ -169,23 +169,23 @@ lc->scan_warning(__FILE__, __LINE__, lc, msg, a1, a2, a3, a4, a5) #define scan_warn6(lc, msg, a1, a2, a3, a4, a5, a6) \ lc->scan_warning(__FILE__, __LINE__, lc, msg, a1, a2, a3, a4, a5, a6) -DLL_IMP_EXP void ScanToEol(LEX *lc); -DLL_IMP_EXP int ScanToNextNotEol(LEX * lc); +void ScanToEol(LEX *lc); +int ScanToNextNotEol(LEX * lc); -DLL_IMP_EXP LEX *lex_close_file(LEX *lf); -DLL_IMP_EXP LEX *lex_open_file(LEX *lf, +LEX *lex_close_file(LEX *lf); +LEX *lex_open_file(LEX *lf, const char *fname, LEX_ERROR_HANDLER *ScanError, LEX_WARNING_HANDLER *scan_warning); -DLL_IMP_EXP LEX *lex_new_buffer(LEX *lf, +LEX *lex_new_buffer(LEX *lf, LEX_ERROR_HANDLER *ScanError, LEX_WARNING_HANDLER *scan_warning); -DLL_IMP_EXP int LexGetChar(LEX *lf); -DLL_IMP_EXP void LexUngetChar(LEX *lf); -DLL_IMP_EXP const char *lex_tok_to_str(int token); -DLL_IMP_EXP int LexGetToken(LEX *lf, int expect); -DLL_IMP_EXP void LexSetDefaultErrorHandler(LEX *lf); -DLL_IMP_EXP void LexSetDefaultWarningHandler(LEX *lf); -DLL_IMP_EXP void LexSetErrorHandlerErrorType(LEX *lf, int err_type); +int LexGetChar(LEX *lf); +void LexUngetChar(LEX *lf); +const char *lex_tok_to_str(int token); +int LexGetToken(LEX *lf, int expect); +void LexSetDefaultErrorHandler(LEX *lf); +void LexSetDefaultWarningHandler(LEX *lf); +void LexSetErrorHandlerErrorType(LEX *lf, int err_type); #endif /* BAREOS_LIB_LEX_H_ */ diff --git a/core/src/lib/lockmgr.h b/core/src/lib/lockmgr.h index e41132d5d72..bf14267b245 100644 --- a/core/src/lib/lockmgr.h +++ b/core/src/lib/lockmgr.h @@ -32,8 +32,8 @@ /* * P and V op that don't use the lock manager (for memory allocation or on win32) */ -DLL_IMP_EXP void Lmgr_p(pthread_mutex_t *m); -DLL_IMP_EXP void Lmgr_v(pthread_mutex_t *m); +void Lmgr_p(pthread_mutex_t *m); +void Lmgr_v(pthread_mutex_t *m); #ifdef BAREOS_INCLUDE_VERSION_H_ diff --git a/core/src/lib/md5.h b/core/src/lib/md5.h index de0aeb62e83..ec5d4727642 100644 --- a/core/src/lib/md5.h +++ b/core/src/lib/md5.h @@ -42,8 +42,8 @@ typedef struct { MD5_u32plus block[16]; } MD5_CTX; -DLL_IMP_EXP extern void MD5_Init(MD5_CTX *ctx); -DLL_IMP_EXP extern void MD5_Update(MD5_CTX *ctx, const void *data, unsigned long size); -DLL_IMP_EXP extern void MD5_Final(unsigned char *result, MD5_CTX *ctx); +extern void MD5_Init(MD5_CTX *ctx); +extern void MD5_Update(MD5_CTX *ctx, const void *data, unsigned long size); +extern void MD5_Final(unsigned char *result, MD5_CTX *ctx); #endif diff --git a/core/src/lib/mem_pool.h b/core/src/lib/mem_pool.h index 99b8e4925b6..c7fc4c7f9b7 100644 --- a/core/src/lib/mem_pool.h +++ b/core/src/lib/mem_pool.h @@ -33,23 +33,23 @@ #ifdef SMARTALLOC #define GetPoolMemory(pool) sm_get_pool_memory(__FILE__, __LINE__, pool) -DLL_IMP_EXP POOLMEM *sm_get_pool_memory(const char *file, int line, int pool); +POOLMEM *sm_get_pool_memory(const char *file, int line, int pool); #define GetMemory(size) sm_get_memory(__FILE__, __LINE__, size) -DLL_IMP_EXP POOLMEM *sm_get_memory(const char *fname, int line, int32_t size); +POOLMEM *sm_get_memory(const char *fname, int line, int32_t size); #define SizeofPoolMemory(buf) sm_sizeof_pool_memory(__FILE__, __LINE__, buf) -DLL_IMP_EXP int32_t sm_sizeof_pool_memory(const char *fname, int line, POOLMEM *buf); +int32_t sm_sizeof_pool_memory(const char *fname, int line, POOLMEM *buf); #define ReallocPoolMemory(buf,size) sm_realloc_pool_memory(__FILE__, __LINE__, buf, size) -DLL_IMP_EXP POOLMEM *sm_realloc_pool_memory(const char *fname, int line, POOLMEM *buf, int32_t size); +POOLMEM *sm_realloc_pool_memory(const char *fname, int line, POOLMEM *buf, int32_t size); #define CheckPoolMemorySize(buf,size) sm_check_pool_memory_size(__FILE__, __LINE__, buf, size) -DLL_IMP_EXP POOLMEM *sm_check_pool_memory_size(const char *fname, int line, POOLMEM *buf, int32_t size); +POOLMEM *sm_check_pool_memory_size(const char *fname, int line, POOLMEM *buf, int32_t size); #define FreePoolMemory(x) SmFreePoolMemory(__FILE__, __LINE__, x) #define FreeMemory(x) SmFreePoolMemory(__FILE__, __LINE__, x) -DLL_IMP_EXP void SmFreePoolMemory(const char *fname, int line, POOLMEM *buf); +void SmFreePoolMemory(const char *fname, int line, POOLMEM *buf); #else @@ -68,11 +68,11 @@ void FreePoolMemory(POOLMEM *buf); */ #define FreeAndNullPoolMemory(a) do { if (a) { FreePoolMemory(a); (a) = NULL;} } while (0) -DLL_IMP_EXP void GarbageCollectMemoryPool(); -DLL_IMP_EXP void CloseMemoryPool(); -DLL_IMP_EXP void PrintMemoryPoolStats(); +void GarbageCollectMemoryPool(); +void CloseMemoryPool(); +void PrintMemoryPoolStats(); -DLL_IMP_EXP void GarbageCollectMemory(); +void GarbageCollectMemory(); enum { PM_NOPOOL = 0, /* Nonpooled memory */ @@ -86,7 +86,7 @@ enum { #define PM_MAX PM_RECORD /* Number of types */ -class DLL_IMP_EXP PoolMem { +class PoolMem { char *mem; public: PoolMem() { mem = GetPoolMemory(PM_NAME); *mem = 0; } @@ -112,18 +112,18 @@ class DLL_IMP_EXP PoolMem { int Bvsprintf(const char *fmt, va_list arg_ptr); }; -DLL_IMP_EXP int PmStrcat(POOLMEM *&pm, const char *str); -DLL_IMP_EXP int PmStrcat(POOLMEM *&pm, PoolMem &str); -DLL_IMP_EXP int PmStrcat(PoolMem &pm, const char *str); -DLL_IMP_EXP int PmStrcat(PoolMem *&pm, const char *str); +int PmStrcat(POOLMEM *&pm, const char *str); +int PmStrcat(POOLMEM *&pm, PoolMem &str); +int PmStrcat(PoolMem &pm, const char *str); +int PmStrcat(PoolMem *&pm, const char *str); -DLL_IMP_EXP int PmStrcpy(POOLMEM *&pm, const char *str); -DLL_IMP_EXP int PmStrcpy(POOLMEM *&pm, PoolMem &str); -DLL_IMP_EXP int PmStrcpy(PoolMem &pm, const char *str); -DLL_IMP_EXP int PmStrcpy(PoolMem *&pm, const char *str); +int PmStrcpy(POOLMEM *&pm, const char *str); +int PmStrcpy(POOLMEM *&pm, PoolMem &str); +int PmStrcpy(PoolMem &pm, const char *str); +int PmStrcpy(PoolMem *&pm, const char *str); -DLL_IMP_EXP int PmMemcpy(POOLMEM *&pm, const char *data, int32_t n); -DLL_IMP_EXP int PmMemcpy(POOLMEM *&pm, PoolMem &data, int32_t n); -DLL_IMP_EXP int PmMemcpy(PoolMem &pm, const char *data, int32_t n); -DLL_IMP_EXP int PmMemcpy(PoolMem *&pm, const char *data, int32_t n); +int PmMemcpy(POOLMEM *&pm, const char *data, int32_t n); +int PmMemcpy(POOLMEM *&pm, PoolMem &data, int32_t n); +int PmMemcpy(PoolMem &pm, const char *data, int32_t n); +int PmMemcpy(PoolMem *&pm, const char *data, int32_t n); #endif diff --git a/core/src/lib/message.h b/core/src/lib/message.h index 00e5b135be0..2840ebe4e84 100644 --- a/core/src/lib/message.h +++ b/core/src/lib/message.h @@ -164,48 +164,48 @@ extern "C" { typedef char *(*job_code_callback_t)(JobControlRecord *, const char *); } -DLL_IMP_EXP void Jmsg(JobControlRecord *jcr, int type, utime_t mtime, const char *fmt,...); -DLL_IMP_EXP void Qmsg(JobControlRecord *jcr, int type, utime_t mtime, const char *fmt,...); -DLL_IMP_EXP bool GetTrace(void); -DLL_IMP_EXP const char *get_basename(const char *pathname); -DLL_IMP_EXP void SetLogTimestampFormat(const char *format); +void Jmsg(JobControlRecord *jcr, int type, utime_t mtime, const char *fmt,...); +void Qmsg(JobControlRecord *jcr, int type, utime_t mtime, const char *fmt,...); +bool GetTrace(void); +const char *get_basename(const char *pathname); +void SetLogTimestampFormat(const char *format); typedef bool (*db_log_insert_func)(JobControlRecord *jcr, utime_t mtime, char *msg); -extern DLL_IMP_EXP db_log_insert_func p_db_log_insert; +extern db_log_insert_func p_db_log_insert; class MessagesResource; -extern DLL_IMP_EXP int debug_level; -extern DLL_IMP_EXP bool dbg_timestamp; /* print timestamp in debug output */ -extern DLL_IMP_EXP bool prt_kaboom; /* Print kaboom output */ -extern DLL_IMP_EXP int verbose; -extern DLL_IMP_EXP char my_name[]; -extern DLL_IMP_EXP const char *assert_msg; /* Assert error message */ -extern DLL_IMP_EXP const char *working_directory; -extern DLL_IMP_EXP utime_t daemon_start_time; - -extern DLL_IMP_EXP int console_msg_pending; -extern DLL_IMP_EXP FILE *con_fd; /* Console file descriptor */ -extern DLL_IMP_EXP brwlock_t con_lock; /* Console lock structure */ - -DLL_IMP_EXP void MyNameIs(int argc, char *argv[], const char *name); -DLL_IMP_EXP void InitMsg(JobControlRecord *jcr, MessagesResource *msg, job_code_callback_t job_code_callback = NULL); -DLL_IMP_EXP void TermMsg(void); -DLL_IMP_EXP void CloseMsg(JobControlRecord *jcr); -DLL_IMP_EXP void AddMsgDest(MessagesResource *msg, int dest, int type, +extern int debug_level; +extern bool dbg_timestamp; /* print timestamp in debug output */ +extern bool prt_kaboom; /* Print kaboom output */ +extern int verbose; +extern char my_name[]; +extern const char *assert_msg; /* Assert error message */ +extern const char *working_directory; +extern utime_t daemon_start_time; + +extern int console_msg_pending; +extern FILE *con_fd; /* Console file descriptor */ +extern brwlock_t con_lock; /* Console lock structure */ + +void MyNameIs(int argc, char *argv[], const char *name); +void InitMsg(JobControlRecord *jcr, MessagesResource *msg, job_code_callback_t job_code_callback = NULL); +void TermMsg(void); +void CloseMsg(JobControlRecord *jcr); +void AddMsgDest(MessagesResource *msg, int dest, int type, char *where, char *mail_cmd, char *timestamp_format); -DLL_IMP_EXP void RemMsgDest(MessagesResource *msg, int dest, int type, char *where); -DLL_IMP_EXP void Jmsg(JobControlRecord *jcr, int type, utime_t mtime, const char *fmt, ...); -DLL_IMP_EXP void DispatchMessage(JobControlRecord *jcr, int type, utime_t mtime, char *buf); -DLL_IMP_EXP void InitConsoleMsg(const char *wd); -DLL_IMP_EXP void FreeMsgsRes(MessagesResource *msgs); -DLL_IMP_EXP void DequeueMessages(JobControlRecord *jcr); -DLL_IMP_EXP void SetTrace(int trace_flag); -DLL_IMP_EXP bool GetTrace(void); -DLL_IMP_EXP void SetHangup(int hangup_value); -DLL_IMP_EXP bool GetHangup(void); -DLL_IMP_EXP void SetTimestamp(int timestamp_flag); -DLL_IMP_EXP bool GetTimestamp(void); -DLL_IMP_EXP void SetDbType(const char *name); -DLL_IMP_EXP void RegisterMessageCallback(void msg_callback(int type, char *msg)); +void RemMsgDest(MessagesResource *msg, int dest, int type, char *where); +void Jmsg(JobControlRecord *jcr, int type, utime_t mtime, const char *fmt, ...); +void DispatchMessage(JobControlRecord *jcr, int type, utime_t mtime, char *buf); +void InitConsoleMsg(const char *wd); +void FreeMsgsRes(MessagesResource *msgs); +void DequeueMessages(JobControlRecord *jcr); +void SetTrace(int trace_flag); +bool GetTrace(void); +void SetHangup(int hangup_value); +bool GetHangup(void); +void SetTimestamp(int timestamp_flag); +bool GetTimestamp(void); +void SetDbType(const char *name); +void RegisterMessageCallback(void msg_callback(int type, char *msg)); diff --git a/core/src/lib/mntent_cache.h b/core/src/lib/mntent_cache.h index e404bc0c0fd..38856cd5017 100644 --- a/core/src/lib/mntent_cache.h +++ b/core/src/lib/mntent_cache.h @@ -59,6 +59,6 @@ struct mntent_cache_entry_t { mntent_cache_entry_t *find_mntent_mapping(uint32_t dev); void ReleaseMntentMapping(mntent_cache_entry_t *mce); -DLL_IMP_EXP void FlushMntentCache(void); +void FlushMntentCache(void); #endif /* BAREOS_LIB_MNTENT_CACHE_H_ */ diff --git a/core/src/lib/output_formatter.h b/core/src/lib/output_formatter.h index 684259b0b8d..1c214e59662 100644 --- a/core/src/lib/output_formatter.h +++ b/core/src/lib/output_formatter.h @@ -103,7 +103,7 @@ typedef struct of_filter_tuple { /** * Actual output formatter class. */ -class DLL_IMP_EXP OutputFormatter : public SmartAlloc { +class OutputFormatter : public SmartAlloc { public: /* * Typedefs. diff --git a/core/src/lib/parse_bsr.h b/core/src/lib/parse_bsr.h index 6afe7eff74c..7613667515c 100644 --- a/core/src/lib/parse_bsr.h +++ b/core/src/lib/parse_bsr.h @@ -25,9 +25,9 @@ class JobControlRecord; namespace libbareos { -DLL_IMP_EXP storagedaemon::BootStrapRecord *parse_bsr(JobControlRecord *jcr, char *lf); -DLL_IMP_EXP void FreeBsr(storagedaemon::BootStrapRecord *bsr); -DLL_IMP_EXP void DumpBsr(storagedaemon::BootStrapRecord *bsr, bool recurse); +storagedaemon::BootStrapRecord *parse_bsr(JobControlRecord *jcr, char *lf); +void FreeBsr(storagedaemon::BootStrapRecord *bsr); +void DumpBsr(storagedaemon::BootStrapRecord *bsr, bool recurse); void DumpBsr(storagedaemon::BootStrapRecord *bsr, bool recurse); diff --git a/core/src/lib/parse_conf.h b/core/src/lib/parse_conf.h index ebc6356bf7d..d649cbb12f2 100644 --- a/core/src/lib/parse_conf.h +++ b/core/src/lib/parse_conf.h @@ -382,7 +382,7 @@ struct DatatypeName { /* * Base Class for all Resource Classes */ -class DLL_IMP_EXP BareosResource { +class BareosResource { public: CommonResourceHeader hdr; @@ -396,7 +396,7 @@ class DLL_IMP_EXP BareosResource { // virtual inline bool validate() { return true; }; }; -class DLL_IMP_EXP TlsResource : public BareosResource { +class TlsResource : public BareosResource { public: s_password password; /* UA server password */ TlsConfigCert tls_cert; /* TLS structure */ @@ -406,7 +406,7 @@ class DLL_IMP_EXP TlsResource : public BareosResource { /* * Message Resource */ -class DLL_IMP_EXP MessagesResource : public BareosResource { +class MessagesResource : public BareosResource { /* * Members */ @@ -469,7 +469,7 @@ class QualifiedResourceNameTypeConverter; /* * New C++ configuration routines */ -class DLL_IMP_EXP ConfigurationParser { +class ConfigurationParser { public: std::string cf_; /* Config file parameter */ LEX_ERROR_HANDLER *scan_error_; /* Error handler if non-null */ @@ -629,31 +629,31 @@ class DLL_IMP_EXP ConfigurationParser { char *timestamp_format); }; -DLL_IMP_EXP void PrintMessage(void *sock, const char *fmt, ...); +void PrintMessage(void *sock, const char *fmt, ...); /* * Data type routines */ -DLL_IMP_EXP DatatypeName *get_datatype(int number); -DLL_IMP_EXP const char *datatype_to_str(int type); -DLL_IMP_EXP const char *datatype_to_description(int type); +DatatypeName *get_datatype(int number); +const char *datatype_to_str(int type); +const char *datatype_to_description(int type); /* * Resource routines */ -DLL_IMP_EXP void IndentConfigItem(PoolMem &cfg_str, +void IndentConfigItem(PoolMem &cfg_str, int level, const char *config_item, bool inherited = false); -DLL_IMP_EXP void InitResource(int type, ResourceItem *item); +void InitResource(int type, ResourceItem *item); #ifdef HAVE_JANSSON /* * JSON output helper functions */ -DLL_IMP_EXP json_t *json_item(s_kw *item); -DLL_IMP_EXP json_t *json_item(ResourceItem *item); -DLL_IMP_EXP json_t *json_items(ResourceItem items[]); +json_t *json_item(s_kw *item); +json_t *json_item(ResourceItem *item); +json_t *json_items(ResourceItem items[]); #endif /* diff --git a/core/src/lib/passphrase.h b/core/src/lib/passphrase.h index 13f0eaca40f..b5eecb99a3c 100644 --- a/core/src/lib/passphrase.h +++ b/core/src/lib/passphrase.h @@ -21,6 +21,6 @@ #ifndef BAREOS_LIB_PASSPHRASE_H_ #define BAREOS_LIB_PASSPHRASE_H_ -DLL_IMP_EXP char *generate_crypto_passphrase(uint16_t length); +char *generate_crypto_passphrase(uint16_t length); #endif // BAREOS_LIB_PASSPHRASE_H_ diff --git a/core/src/lib/path_list.h b/core/src/lib/path_list.h index aa6834ade66..a8a3890ae7e 100644 --- a/core/src/lib/path_list.h +++ b/core/src/lib/path_list.h @@ -21,9 +21,9 @@ #ifndef BAREOS_LIB_PATH_LIST_H_ #define BAREOS_LIB_PATH_LIST_H_ -DLL_IMP_EXP htable *path_list_init(); -DLL_IMP_EXP bool PathListLookup(htable *path_list, const char *fname); -DLL_IMP_EXP bool PathListAdd(htable *path_list, uint32_t len, const char *fname); -DLL_IMP_EXP void FreePathList(htable *path_list); +htable *path_list_init(); +bool PathListLookup(htable *path_list, const char *fname); +bool PathListAdd(htable *path_list, uint32_t len, const char *fname); +void FreePathList(htable *path_list); #endif // BAREOS_LIB_PATH_LIST_H_ diff --git a/core/src/lib/plugins.h b/core/src/lib/plugins.h index 5d6f7c73171..0aa74d10808 100644 --- a/core/src/lib/plugins.h +++ b/core/src/lib/plugins.h @@ -94,20 +94,20 @@ typedef struct gen_pluginInfo { } genpInfo; /* Functions */ -DLL_IMP_EXP bool LoadPlugins(void *binfo, void *bfuncs, alist *plugin_list, +bool LoadPlugins(void *binfo, void *bfuncs, alist *plugin_list, const char *plugin_dir, alist *plugin_names, const char *type, bool IsPluginCompatible(Plugin *plugin)); -DLL_IMP_EXP void UnloadPlugins(alist *plugin_list); -DLL_IMP_EXP void UnloadPlugin(alist *plugin_list, Plugin *plugin, int index); -DLL_IMP_EXP int ListPlugins(alist *plugin_list, PoolMem &msg); +void UnloadPlugins(alist *plugin_list); +void UnloadPlugin(alist *plugin_list, Plugin *plugin, int index); +int ListPlugins(alist *plugin_list, PoolMem &msg); /* Each daemon can register a debug hook that will be called * after a fatal signal */ typedef void (dbg_plugin_hook_t)(Plugin *plug, FILE *fp); -DLL_IMP_EXP void DbgPluginAddHook(dbg_plugin_hook_t *fct); +void DbgPluginAddHook(dbg_plugin_hook_t *fct); typedef void(dbg_print_plugin_hook_t)(FILE *fp); -DLL_IMP_EXP void DbgPrintPluginAddHook(dbg_print_plugin_hook_t *fct); -DLL_IMP_EXP void DumpPlugins(alist *plugin_list, FILE *fp); +void DbgPrintPluginAddHook(dbg_print_plugin_hook_t *fct); +void DumpPlugins(alist *plugin_list, FILE *fp); #endif /* BAREOS_LIB_PLUGINS_H_ */ diff --git a/core/src/lib/pythonlib.h b/core/src/lib/pythonlib.h index a51e6cd290f..6a965726e91 100644 --- a/core/src/lib/pythonlib.h +++ b/core/src/lib/pythonlib.h @@ -21,6 +21,6 @@ #ifndef BAREOS_LIB_PYTHONLIB_H_ #define BAREOS_LIB_PYTHONLIB_H_ -DLL_IMP_EXP int GenerateDaemonEvent(JobControlRecord *jcr, const char *event); +int GenerateDaemonEvent(JobControlRecord *jcr, const char *event); #endif // BAREOS_LIB_PYTHONLIB_H_ diff --git a/core/src/lib/qualified_resource_name_type_converter.h b/core/src/lib/qualified_resource_name_type_converter.h index 2419e458dbf..b0b9c2e4cac 100644 --- a/core/src/lib/qualified_resource_name_type_converter.h +++ b/core/src/lib/qualified_resource_name_type_converter.h @@ -24,7 +24,7 @@ #include "include/bareos.h" -class DLL_IMP_EXP QualifiedResourceNameTypeConverter { +class QualifiedResourceNameTypeConverter { public: QualifiedResourceNameTypeConverter(const std::map &map); bool ResourceToString(const std::string &name_of_resource, const int &r_type, std::string &out) const; diff --git a/core/src/lib/queue.h b/core/src/lib/queue.h index 40b05dc885b..d9988ec1012 100644 --- a/core/src/lib/queue.h +++ b/core/src/lib/queue.h @@ -37,7 +37,7 @@ typedef struct b_queue BQUEUE; /** * Queue functions */ -DLL_IMP_EXP void qinsert(BQUEUE *qhead, BQUEUE *object); -DLL_IMP_EXP BQUEUE *qnext(BQUEUE *qhead, BQUEUE *qitem); -DLL_IMP_EXP BQUEUE *qdchain(BQUEUE *qitem); -DLL_IMP_EXP BQUEUE *qremove(BQUEUE *qhead); +void qinsert(BQUEUE *qhead, BQUEUE *object); +BQUEUE *qnext(BQUEUE *qhead, BQUEUE *qitem); +BQUEUE *qdchain(BQUEUE *qitem); +BQUEUE *qremove(BQUEUE *qhead); diff --git a/core/src/lib/rblist.h b/core/src/lib/rblist.h index 261e02b72fc..36a980917fd 100644 --- a/core/src/lib/rblist.h +++ b/core/src/lib/rblist.h @@ -51,7 +51,7 @@ struct rblink { bool red; }; -class DLL_IMP_EXP rblist : public SmartAlloc { +class rblist : public SmartAlloc { void *head; int16_t loffset; uint32_t num_items; diff --git a/core/src/lib/runscript.h b/core/src/lib/runscript.h index 11fde24fd54..a9c9df453bd 100644 --- a/core/src/lib/runscript.h +++ b/core/src/lib/runscript.h @@ -65,7 +65,7 @@ enum { /** * Structure for RunScript ressource */ -class DLL_IMP_EXP RunScript { +class RunScript { public: POOLMEM *command; /* Command string */ POOLMEM *target; /* Host target */ @@ -92,21 +92,21 @@ class DLL_IMP_EXP RunScript { }; /* create new RunScript (set all value to 0) */ -DLL_IMP_EXP RunScript *NewRunscript(); +RunScript *NewRunscript(); /* create new RunScript from another */ -DLL_IMP_EXP RunScript *copy_runscript(RunScript *src); +RunScript *copy_runscript(RunScript *src); /* launch each script from runscripts*/ -DLL_IMP_EXP int RunScripts(JobControlRecord *jcr, alist *runscripts, const char *name, +int RunScripts(JobControlRecord *jcr, alist *runscripts, const char *name, alist *allowed_script_dirs = NULL); /* free RunScript (and all POOLMEM) */ -DLL_IMP_EXP void FreeRunscript(RunScript *script); +void FreeRunscript(RunScript *script); /* foreach_alist free RunScript */ -DLL_IMP_EXP void FreeRunscripts(alist *runscripts); /* you have to free alist */ +void FreeRunscripts(alist *runscripts); /* you have to free alist */ -extern DLL_IMP_EXP bool (*console_command)(JobControlRecord *jcr, const char *cmd); +extern bool (*console_command)(JobControlRecord *jcr, const char *cmd); #endif /* BAREOS_LIB_RUNSCRIPT_H_ */ diff --git a/core/src/lib/rwlock.h b/core/src/lib/rwlock.h index 2d22c13513f..7bd94c5ff44 100644 --- a/core/src/lib/rwlock.h +++ b/core/src/lib/rwlock.h @@ -64,16 +64,16 @@ typedef struct s_rwlock_tag { /** * read/write lock prototypes */ -DLL_IMP_EXP extern int RwlInit(brwlock_t *rwl, int priority = 0); -DLL_IMP_EXP extern int RwlDestroy(brwlock_t *rwl); -DLL_IMP_EXP extern bool RwlIsInit(brwlock_t *rwl); -DLL_IMP_EXP extern int RwlReadlock(brwlock_t *rwl); -DLL_IMP_EXP extern int RwlReadtrylock(brwlock_t *rwl); -DLL_IMP_EXP extern int RwlReadunlock(brwlock_t *rwl); -DLL_IMP_EXP extern int RwlWritelock_p(brwlock_t *rwl, +extern int RwlInit(brwlock_t *rwl, int priority = 0); +extern int RwlDestroy(brwlock_t *rwl); +extern bool RwlIsInit(brwlock_t *rwl); +extern int RwlReadlock(brwlock_t *rwl); +extern int RwlReadtrylock(brwlock_t *rwl); +extern int RwlReadunlock(brwlock_t *rwl); +extern int RwlWritelock_p(brwlock_t *rwl, const char *file = "*unknown*", int line = 0); -DLL_IMP_EXP extern int RwlWritetrylock(brwlock_t *rwl); -DLL_IMP_EXP extern int RwlWriteunlock(brwlock_t *rwl); +extern int RwlWritetrylock(brwlock_t *rwl); +extern int RwlWriteunlock(brwlock_t *rwl); #endif /* BAREOS_LIB_RWLOCK_H_ */ diff --git a/core/src/lib/scan.h b/core/src/lib/scan.h index 5645e3bbe34..3da5feabbda 100644 --- a/core/src/lib/scan.h +++ b/core/src/lib/scan.h @@ -21,20 +21,20 @@ #ifndef BAREOS_LIB_SCAN_H_ #define BAREOS_LIB_SCAN_H_ -DLL_IMP_EXP void StripLeadingSpace(char *str); -DLL_IMP_EXP void StripTrailingJunk(char *str); -DLL_IMP_EXP void StripTrailingNewline(char *str); -DLL_IMP_EXP void StripTrailingSlashes(char *dir); -DLL_IMP_EXP bool SkipSpaces(char **msg); -DLL_IMP_EXP bool SkipNonspaces(char **msg); -DLL_IMP_EXP int fstrsch(const char *a, const char *b); -DLL_IMP_EXP char *next_arg(char **s); -DLL_IMP_EXP int ParseArgs(POOLMEM *cmd, POOLMEM *&args, int *argc, +void StripLeadingSpace(char *str); +void StripTrailingJunk(char *str); +void StripTrailingNewline(char *str); +void StripTrailingSlashes(char *dir); +bool SkipSpaces(char **msg); +bool SkipNonspaces(char **msg); +int fstrsch(const char *a, const char *b); +char *next_arg(char **s); +int ParseArgs(POOLMEM *cmd, POOLMEM *&args, int *argc, char **argk, char **argv, int max_args); -DLL_IMP_EXP int ParseArgsOnly(POOLMEM *cmd, POOLMEM *&args, int *argc, +int ParseArgsOnly(POOLMEM *cmd, POOLMEM *&args, int *argc, char **argk, char **argv, int max_args); -DLL_IMP_EXP void SplitPathAndFilename(const char *fname, POOLMEM *&path, +void SplitPathAndFilename(const char *fname, POOLMEM *&path, int *pnl, POOLMEM *&file, int *fnl); -DLL_IMP_EXP int bsscanf(const char *buf, const char *fmt, ...); +int bsscanf(const char *buf, const char *fmt, ...); #endif // BAREOS_LIB_SCAN_H_ diff --git a/core/src/lib/scsi_crypto.h b/core/src/lib/scsi_crypto.h index 855af56acec..73a96cb553f 100644 --- a/core/src/lib/scsi_crypto.h +++ b/core/src/lib/scsi_crypto.h @@ -378,13 +378,13 @@ typedef struct { uint8_t descriptor[SPP_DESCRIPTOR_LENGTH]; } SPP_KAD; -DLL_IMP_EXP bool ClearScsiEncryptionKey(int fd, const char *device); -DLL_IMP_EXP bool SetScsiEncryptionKey(int fd, const char *device, char *encryption_key); -DLL_IMP_EXP int GetScsiDriveEncryptionStatus(int fd, const char *device_name, +bool ClearScsiEncryptionKey(int fd, const char *device); +bool SetScsiEncryptionKey(int fd, const char *device, char *encryption_key); +int GetScsiDriveEncryptionStatus(int fd, const char *device_name, POOLMEM *&status, int indent); -DLL_IMP_EXP int GetScsiVolumeEncryptionStatus(int fd, const char *device_name, +int GetScsiVolumeEncryptionStatus(int fd, const char *device_name, POOLMEM *&status, int indent); -DLL_IMP_EXP bool NeedScsiCryptoKey(int fd, const char *device_name, bool use_drive_status); -DLL_IMP_EXP bool IsScsiEncryptionEnabled(int fd, const char *device_name); +bool NeedScsiCryptoKey(int fd, const char *device_name, bool use_drive_status); +bool IsScsiEncryptionEnabled(int fd, const char *device_name); #endif /* BAREOS_LIB_SCSI_CRYPTO_H_ */ diff --git a/core/src/lib/scsi_lli.h b/core/src/lib/scsi_lli.h index b52410bc2a7..5d730b71b99 100644 --- a/core/src/lib/scsi_lli.h +++ b/core/src/lib/scsi_lli.h @@ -166,11 +166,11 @@ typedef struct { uint8_t addSenseData[109]; } SCSI_PAGE_SENSE; -DLL_IMP_EXP bool RecvScsiCmdPage(int fd, const char *device_name, +bool RecvScsiCmdPage(int fd, const char *device_name, void *cdb, unsigned int cdb_len, void *cmd_page, unsigned int cmd_page_len); -DLL_IMP_EXP bool send_scsi_cmd_page(int fd, const char *device_name, +bool send_scsi_cmd_page(int fd, const char *device_name, void *cdb, unsigned int cdb_len, void *cmd_page, unsigned int cmd_page_len); -DLL_IMP_EXP bool CheckScsiAtEod(int fd); +bool CheckScsiAtEod(int fd); #endif /* BAREOS_LIB_SCSI_LLI_H_ */ diff --git a/core/src/lib/scsi_tapealert.h b/core/src/lib/scsi_tapealert.h index 9d6f65d7d33..2b27e2fd931 100644 --- a/core/src/lib/scsi_tapealert.h +++ b/core/src/lib/scsi_tapealert.h @@ -91,7 +91,7 @@ typedef struct { uint8_t parameter_value; /* Parameter Value, n bytes */ } TAPEALERT_PARAMETER; -DLL_IMP_EXP bool GetTapealertFlags(int fd, const char *device_name, uint64_t *flags); +bool GetTapealertFlags(int fd, const char *device_name, uint64_t *flags); #endif /* BAREOS_LIB_SCSI_TAPEALERT_H_ */ diff --git a/core/src/lib/serial.h b/core/src/lib/serial.h index 9f291be1a2b..8282cf42fe6 100644 --- a/core/src/lib/serial.h +++ b/core/src/lib/serial.h @@ -28,25 +28,25 @@ */ -DLL_IMP_EXP extern void serial_int16(uint8_t * * const ptr, const int16_t v); -DLL_IMP_EXP extern void serial_uint16(uint8_t * * const ptr, const uint16_t v); -DLL_IMP_EXP extern void serial_int32(uint8_t * * const ptr, const int32_t v); -DLL_IMP_EXP extern void serial_uint32(uint8_t * * const ptr, const uint32_t v); -DLL_IMP_EXP extern void serial_int64(uint8_t * * ptr, int64_t v); -DLL_IMP_EXP extern void serial_uint64(uint8_t * * const ptr, const uint64_t v); -DLL_IMP_EXP extern void SerialBtime(uint8_t * * const ptr, const btime_t v); -DLL_IMP_EXP extern void serial_float64(uint8_t * * const ptr, const float64_t v); -DLL_IMP_EXP extern void SerialString(uint8_t * * const ptr, const char * const str); - -DLL_IMP_EXP extern int16_t unserial_int16(uint8_t * * const ptr); -DLL_IMP_EXP extern uint16_t unserial_uint16(uint8_t * * const ptr); -DLL_IMP_EXP extern int32_t unserial_int32(uint8_t * * const ptr); -DLL_IMP_EXP extern uint32_t unserial_uint32(uint8_t * * const ptr); -DLL_IMP_EXP extern int64_t unserial_int64(uint8_t * * const ptr); -DLL_IMP_EXP extern uint64_t unserial_uint64(uint8_t * * const ptr); -DLL_IMP_EXP extern btime_t UnserialBtime(uint8_t * * const ptr); -DLL_IMP_EXP extern float64_t unserial_float64(uint8_t * * const ptr); -DLL_IMP_EXP extern void UnserialString(uint8_t * * const ptr, char * const str, int max); +extern void serial_int16(uint8_t * * const ptr, const int16_t v); +extern void serial_uint16(uint8_t * * const ptr, const uint16_t v); +extern void serial_int32(uint8_t * * const ptr, const int32_t v); +extern void serial_uint32(uint8_t * * const ptr, const uint32_t v); +extern void serial_int64(uint8_t * * ptr, int64_t v); +extern void serial_uint64(uint8_t * * const ptr, const uint64_t v); +extern void SerialBtime(uint8_t * * const ptr, const btime_t v); +extern void serial_float64(uint8_t * * const ptr, const float64_t v); +extern void SerialString(uint8_t * * const ptr, const char * const str); + +extern int16_t unserial_int16(uint8_t * * const ptr); +extern uint16_t unserial_uint16(uint8_t * * const ptr); +extern int32_t unserial_int32(uint8_t * * const ptr); +extern uint32_t unserial_uint32(uint8_t * * const ptr); +extern int64_t unserial_int64(uint8_t * * const ptr); +extern uint64_t unserial_uint64(uint8_t * * const ptr); +extern btime_t UnserialBtime(uint8_t * * const ptr); +extern float64_t unserial_float64(uint8_t * * const ptr); +extern void UnserialString(uint8_t * * const ptr, char * const str, int max); /** diff --git a/core/src/lib/smartall.h b/core/src/lib/smartall.h index e8a9ebd0393..90e701379b5 100644 --- a/core/src/lib/smartall.h +++ b/core/src/lib/smartall.h @@ -28,27 +28,27 @@ #ifndef BAREOS_LIB_SMARTALL_H_ #define BAREOS_LIB_SMARTALL_H_ -extern uint64_t DLL_IMP_EXP sm_max_bytes; -extern uint64_t DLL_IMP_EXP sm_bytes; -extern uint32_t DLL_IMP_EXP sm_max_buffers; -extern uint32_t DLL_IMP_EXP sm_buffers; +extern uint64_t sm_max_bytes; +extern uint64_t sm_bytes; +extern uint32_t sm_max_buffers; +extern uint32_t sm_buffers; #ifdef SMARTALLOC #undef SMARTALLOC #define SMARTALLOC SMARTALLOC -DLL_IMP_EXP extern void *sm_malloc(const char *fname, int lineno, unsigned int nbytes), +extern void *sm_malloc(const char *fname, int lineno, unsigned int nbytes), *sm_calloc(const char *fname, int lineno, unsigned int nelem, unsigned int elsize), *sm_realloc(const char *fname, int lineno, void *ptr, unsigned int size), *actuallymalloc(unsigned int size), *actuallycalloc(unsigned int nelem, unsigned int elsize), *actuallyrealloc(void *ptr, unsigned int size); -DLL_IMP_EXP extern void sm_free(const char *fname, int lineno, void *fp); -DLL_IMP_EXP extern void Actuallyfree(void *cp), +extern void sm_free(const char *fname, int lineno, void *fp); +extern void Actuallyfree(void *cp), sm_dump(bool bufdump, bool in_use=false), SmStatic(int mode); -DLL_IMP_EXP extern void SmNewOwner(const char *fname, int lineno, char *buf); +extern void SmNewOwner(const char *fname, int lineno, char *buf); #ifdef SMCHECK #define Dsm_check(lvl) if ((lvl)<=debug_level) sm_check(__FILE__, __LINE__, true) diff --git a/core/src/lib/tls.h b/core/src/lib/tls.h index 10a0db54252..7748355e05e 100644 --- a/core/src/lib/tls.h +++ b/core/src/lib/tls.h @@ -48,39 +48,39 @@ class Tls { kTlsOpenSsl, kTlsGnuTls }; - static DLL_IMP_EXP Tls *CreateNewTlsContext(Tls::TlsImplementationType type); + static Tls *CreateNewTlsContext(Tls::TlsImplementationType type); - virtual DLL_IMP_EXP void SetTlsPskClientContext(const PskCredentials &credentials) = 0; - virtual DLL_IMP_EXP void SetTlsPskServerContext(ConfigurationParser *config, + virtual void SetTlsPskClientContext(const PskCredentials &credentials) = 0; + virtual void SetTlsPskServerContext(ConfigurationParser *config, GetTlsPskByFullyQualifiedResourceNameCb_t cb) = 0; - virtual DLL_IMP_EXP bool TlsPostconnectVerifyHost(JobControlRecord *jcr, const char *host) = 0; - virtual DLL_IMP_EXP bool TlsPostconnectVerifyCn(JobControlRecord *jcr, + virtual bool TlsPostconnectVerifyHost(JobControlRecord *jcr, const char *host) = 0; + virtual bool TlsPostconnectVerifyCn(JobControlRecord *jcr, const std::vector &verify_list) = 0; - virtual DLL_IMP_EXP bool TlsBsockAccept(BareosSocket *bsock) = 0; - virtual DLL_IMP_EXP int TlsBsockWriten(BareosSocket *bsock, char *ptr, int32_t nbytes) = 0; - virtual DLL_IMP_EXP int TlsBsockReadn(BareosSocket *bsock, char *ptr, int32_t nbytes) = 0; - virtual DLL_IMP_EXP bool TlsBsockConnect(BareosSocket *bsock) = 0; - virtual DLL_IMP_EXP void TlsBsockShutdown(BareosSocket *bsock) = 0; - virtual DLL_IMP_EXP void TlsLogConninfo(JobControlRecord *jcr, + virtual bool TlsBsockAccept(BareosSocket *bsock) = 0; + virtual int TlsBsockWriten(BareosSocket *bsock, char *ptr, int32_t nbytes) = 0; + virtual int TlsBsockReadn(BareosSocket *bsock, char *ptr, int32_t nbytes) = 0; + virtual bool TlsBsockConnect(BareosSocket *bsock) = 0; + virtual void TlsBsockShutdown(BareosSocket *bsock) = 0; + virtual void TlsLogConninfo(JobControlRecord *jcr, const char *host, int port, const char *who) const = 0; - virtual DLL_IMP_EXP std::string TlsCipherGetName() const { return std::string(); } - - virtual DLL_IMP_EXP void SetCipherList(const std::string &cipherlist) = 0; - - virtual DLL_IMP_EXP void SetCaCertfile(const std::string &ca_certfile) = 0; - virtual DLL_IMP_EXP void SetCaCertdir(const std::string &ca_certdir) = 0; - virtual DLL_IMP_EXP void SetCrlfile(const std::string &crlfile) = 0; - virtual DLL_IMP_EXP void SetCertfile(const std::string &certfile) = 0; - virtual DLL_IMP_EXP void SetKeyfile(const std::string &keyfile) = 0; - virtual DLL_IMP_EXP void SetPemCallback(CRYPTO_PEM_PASSWD_CB pem_callback) = 0; - virtual DLL_IMP_EXP void SetPemUserdata(void *pem_userdata) = 0; - virtual DLL_IMP_EXP void SetDhFile(const std::string &dhfile) = 0; - virtual DLL_IMP_EXP void SetVerifyPeer(const bool &verify_peer) = 0; - virtual DLL_IMP_EXP void SetTcpFileDescriptor(const int &fd) = 0; + virtual std::string TlsCipherGetName() const { return std::string(); } + + virtual void SetCipherList(const std::string &cipherlist) = 0; + + virtual void SetCaCertfile(const std::string &ca_certfile) = 0; + virtual void SetCaCertdir(const std::string &ca_certdir) = 0; + virtual void SetCrlfile(const std::string &crlfile) = 0; + virtual void SetCertfile(const std::string &certfile) = 0; + virtual void SetKeyfile(const std::string &keyfile) = 0; + virtual void SetPemCallback(CRYPTO_PEM_PASSWD_CB pem_callback) = 0; + virtual void SetPemUserdata(void *pem_userdata) = 0; + virtual void SetDhFile(const std::string &dhfile) = 0; + virtual void SetVerifyPeer(const bool &verify_peer) = 0; + virtual void SetTcpFileDescriptor(const int &fd) = 0; }; #endif /* BAREOS_LIB_TLS_H_ */ diff --git a/core/src/lib/tls_conf_base.h b/core/src/lib/tls_conf_base.h index 060b91eec88..f9f4ecfae4d 100644 --- a/core/src/lib/tls_conf_base.h +++ b/core/src/lib/tls_conf_base.h @@ -24,7 +24,7 @@ struct PskCredentials; -class DLL_IMP_EXP TlsConfigBase { +class TlsConfigBase { public: bool enable; /*!< Enable TLS */ bool require; /*!< Require TLS */ diff --git a/core/src/lib/tls_conf_cert.h b/core/src/lib/tls_conf_cert.h index 4bea3b1d715..789ceb2102c 100644 --- a/core/src/lib/tls_conf_cert.h +++ b/core/src/lib/tls_conf_cert.h @@ -22,7 +22,7 @@ #ifndef BAREOS_LIB_TLS_CONF_CERT_H_ #define BAREOS_LIB_TLS_CONF_CERT_H_ -class DLL_IMP_EXP TlsConfigCert : public TlsConfigBase { +class TlsConfigCert : public TlsConfigBase { public: bool authenticate; /* Authenticate with TLS */ bool VerifyPeer; /* TLS Verify Peer Certificate */ diff --git a/core/src/lib/tls_conf_none.h b/core/src/lib/tls_conf_none.h index 389c3b9b003..2144afd8a01 100644 --- a/core/src/lib/tls_conf_none.h +++ b/core/src/lib/tls_conf_none.h @@ -22,7 +22,7 @@ #ifndef BAREOS_LIB_TLS_CONF_NONE_H_ #define BAREOS_LIB_TLS_CONF_NONE_H_ -class DLL_IMP_EXP TlsConfigNone : public TlsConfigBase { +class TlsConfigNone : public TlsConfigBase { public: char *cipherlist; /* TLS Cipher List */ diff --git a/core/src/lib/tls_conf_psk.h b/core/src/lib/tls_conf_psk.h index e903d8fab0f..9dc7de9b1ef 100644 --- a/core/src/lib/tls_conf_psk.h +++ b/core/src/lib/tls_conf_psk.h @@ -27,7 +27,7 @@ #include "include/bareos.h" -class DLL_IMP_EXP TlsConfigPsk : public TlsConfigBase { +class TlsConfigPsk : public TlsConfigBase { public: char *cipherlist; /* TLS Cipher List */ diff --git a/core/src/lib/tls_gnutls.h b/core/src/lib/tls_gnutls.h index 443c0196fa1..c2621e81c96 100644 --- a/core/src/lib/tls_gnutls.h +++ b/core/src/lib/tls_gnutls.h @@ -30,37 +30,37 @@ class TlsGnuTls : public Tls TlsGnuTls(); virtual ~TlsGnuTls(); - DLL_IMP_EXP bool init() override; + bool init() override; - DLL_IMP_EXP void FreeTlsConnection(); - DLL_IMP_EXP void FreeTlsContext(std::shared_ptr &ctx); + void FreeTlsConnection(); + void FreeTlsContext(std::shared_ptr &ctx); - virtual DLL_IMP_EXP void SetTlsPskClientContext(const PskCredentials &credentials) override; - virtual DLL_IMP_EXP void SetTlsPskServerContext(ConfigurationParser *config, + virtual void SetTlsPskClientContext(const PskCredentials &credentials) override; + virtual void SetTlsPskServerContext(ConfigurationParser *config, GetTlsPskByFullyQualifiedResourceNameCb_t cb) override; - virtual DLL_IMP_EXP bool TlsPostconnectVerifyHost(JobControlRecord *jcr, const char *host) override; - virtual DLL_IMP_EXP bool TlsPostconnectVerifyCn(JobControlRecord *jcr, const std::vector &verify_list) override; + virtual bool TlsPostconnectVerifyHost(JobControlRecord *jcr, const char *host) override; + virtual bool TlsPostconnectVerifyCn(JobControlRecord *jcr, const std::vector &verify_list) override; - virtual DLL_IMP_EXP bool TlsBsockAccept(BareosSocket *bsock); - virtual DLL_IMP_EXP int TlsBsockWriten(BareosSocket *bsock, char *ptr, int32_t nbytes); - virtual DLL_IMP_EXP int TlsBsockReadn(BareosSocket *bsock, char *ptr, int32_t nbytes); - virtual DLL_IMP_EXP bool TlsBsockConnect(BareosSocket *bsock); - virtual DLL_IMP_EXP void TlsBsockShutdown(BareosSocket *bsock); - virtual DLL_IMP_EXP void TlsLogConninfo(JobControlRecord *jcr, const char *host, int port, const char *who) const ; + virtual bool TlsBsockAccept(BareosSocket *bsock); + virtual int TlsBsockWriten(BareosSocket *bsock, char *ptr, int32_t nbytes); + virtual int TlsBsockReadn(BareosSocket *bsock, char *ptr, int32_t nbytes); + virtual bool TlsBsockConnect(BareosSocket *bsock); + virtual void TlsBsockShutdown(BareosSocket *bsock); + virtual void TlsLogConninfo(JobControlRecord *jcr, const char *host, int port, const char *who) const ; - virtual DLL_IMP_EXP void SetCipherList(const std::string &cipherlist) override {}; + virtual void SetCipherList(const std::string &cipherlist) override {}; - virtual DLL_IMP_EXP void SetCaCertfile(const std::string &ca_certfile) override {}; - virtual DLL_IMP_EXP void SetCaCertdir(const std::string &ca_certdir) override {}; - virtual DLL_IMP_EXP void SetCrlfile(const std::string &crlfile) override {}; - virtual DLL_IMP_EXP void SetCertfile(const std::string &certfile) override {}; - virtual DLL_IMP_EXP void SetKeyfile(const std::string &keyfile) override {}; - virtual DLL_IMP_EXP void SetPemCallback(CRYPTO_PEM_PASSWD_CB pem_callback) override {}; - virtual DLL_IMP_EXP void SetPemUserdata(void *pem_userdata) override {}; - virtual DLL_IMP_EXP void SetDhFile(const std::string &dhfile) override {}; - virtual DLL_IMP_EXP void SetVerifyPeer(const bool &verify_peer) override {}; - virtual DLL_IMP_EXP void SetTcpFileDescriptor(const int& fd) override {}; + virtual void SetCaCertfile(const std::string &ca_certfile) override {}; + virtual void SetCaCertdir(const std::string &ca_certdir) override {}; + virtual void SetCrlfile(const std::string &crlfile) override {}; + virtual void SetCertfile(const std::string &certfile) override {}; + virtual void SetKeyfile(const std::string &keyfile) override {}; + virtual void SetPemCallback(CRYPTO_PEM_PASSWD_CB pem_callback) override {}; + virtual void SetPemUserdata(void *pem_userdata) override {}; + virtual void SetDhFile(const std::string &dhfile) override {}; + virtual void SetVerifyPeer(const bool &verify_peer) override {}; + virtual void SetTcpFileDescriptor(const int& fd) override {}; }; #endif /* BAREOS_LIB_TLS_GNUTLS_H_ */ diff --git a/core/src/lib/tls_openssl.h b/core/src/lib/tls_openssl.h index 6e457f55824..679e11c7b1c 100644 --- a/core/src/lib/tls_openssl.h +++ b/core/src/lib/tls_openssl.h @@ -33,38 +33,38 @@ class TlsOpenSsl : public Tls { TlsOpenSsl(); virtual ~TlsOpenSsl(); - DLL_IMP_EXP bool init() override; + bool init() override; - DLL_IMP_EXP bool TlsPostconnectVerifyHost(JobControlRecord *jcr, const char *host) override; - DLL_IMP_EXP bool TlsPostconnectVerifyCn(JobControlRecord *jcr, + bool TlsPostconnectVerifyHost(JobControlRecord *jcr, const char *host) override; + bool TlsPostconnectVerifyCn(JobControlRecord *jcr, const std::vector &verify_list) override; - DLL_IMP_EXP bool TlsBsockAccept(BareosSocket *bsock) override; - DLL_IMP_EXP int TlsBsockWriten(BareosSocket *bsock, char *ptr, int32_t nbytes) override; - DLL_IMP_EXP int TlsBsockReadn(BareosSocket *bsock, char *ptr, int32_t nbytes) override; - DLL_IMP_EXP bool TlsBsockConnect(BareosSocket *bsock) override; - DLL_IMP_EXP void TlsBsockShutdown(BareosSocket *bsock) override; + bool TlsBsockAccept(BareosSocket *bsock) override; + int TlsBsockWriten(BareosSocket *bsock, char *ptr, int32_t nbytes) override; + int TlsBsockReadn(BareosSocket *bsock, char *ptr, int32_t nbytes) override; + bool TlsBsockConnect(BareosSocket *bsock) override; + void TlsBsockShutdown(BareosSocket *bsock) override; - DLL_IMP_EXP std::string TlsCipherGetName() const; - DLL_IMP_EXP void SetCipherList(const std::string &cipherlist) override; - DLL_IMP_EXP void TlsLogConninfo(JobControlRecord *jcr, + std::string TlsCipherGetName() const; + void SetCipherList(const std::string &cipherlist) override; + void TlsLogConninfo(JobControlRecord *jcr, const char *host, int port, const char *who) const override; - DLL_IMP_EXP void SetTlsPskClientContext(const PskCredentials &credentials) override; - DLL_IMP_EXP void SetTlsPskServerContext(ConfigurationParser *config, + void SetTlsPskClientContext(const PskCredentials &credentials) override; + void SetTlsPskServerContext(ConfigurationParser *config, GetTlsPskByFullyQualifiedResourceNameCb_t cb) override; - DLL_IMP_EXP void SetCaCertfile(const std::string &ca_certfile) override; - DLL_IMP_EXP void SetCaCertdir(const std::string &ca_certdir) override; - DLL_IMP_EXP void SetCrlfile(const std::string &crlfile) override; - DLL_IMP_EXP void SetCertfile(const std::string &certfile) override; - DLL_IMP_EXP void SetKeyfile(const std::string &keyfile) override; - DLL_IMP_EXP void SetPemCallback(CRYPTO_PEM_PASSWD_CB pem_callback) override; - DLL_IMP_EXP void SetPemUserdata(void *pem_userdata) override; - DLL_IMP_EXP void SetDhFile(const std::string &dhfile) override; - DLL_IMP_EXP void SetVerifyPeer(const bool &verify_peer) override; - DLL_IMP_EXP void SetTcpFileDescriptor(const int &fd) override; + void SetCaCertfile(const std::string &ca_certfile) override; + void SetCaCertdir(const std::string &ca_certdir) override; + void SetCrlfile(const std::string &crlfile) override; + void SetCertfile(const std::string &certfile) override; + void SetKeyfile(const std::string &keyfile) override; + void SetPemCallback(CRYPTO_PEM_PASSWD_CB pem_callback) override; + void SetPemUserdata(void *pem_userdata) override; + void SetDhFile(const std::string &dhfile) override; + void SetVerifyPeer(const bool &verify_peer) override; + void SetTcpFileDescriptor(const int &fd) override; private: std::unique_ptr d_; /* private data */ diff --git a/core/src/lib/tree.h b/core/src/lib/tree.h index 471c80b99f3..aa6101405c2 100644 --- a/core/src/lib/tree.h +++ b/core/src/lib/tree.h @@ -141,17 +141,17 @@ typedef struct s_hl_entry HL_ENTRY; #define TN_FILE 5 /* file entry */ /* External interface */ -DLL_IMP_EXP TREE_ROOT *new_tree(int count); -DLL_IMP_EXP TREE_NODE *insert_tree_node(char *path, char *fname, int type, +TREE_ROOT *new_tree(int count); +TREE_NODE *insert_tree_node(char *path, char *fname, int type, TREE_ROOT *root, TREE_NODE *parent); -DLL_IMP_EXP TREE_NODE *make_tree_path(char *path, TREE_ROOT *root); -DLL_IMP_EXP TREE_NODE *tree_cwd(char *path, TREE_ROOT *root, TREE_NODE *node); -DLL_IMP_EXP TREE_NODE *tree_relcwd(char *path, TREE_ROOT *root, TREE_NODE *node); -DLL_IMP_EXP void TreeAddDeltaPart(TREE_ROOT *root, TREE_NODE *node, +TREE_NODE *make_tree_path(char *path, TREE_ROOT *root); +TREE_NODE *tree_cwd(char *path, TREE_ROOT *root, TREE_NODE *node); +TREE_NODE *tree_relcwd(char *path, TREE_ROOT *root, TREE_NODE *node); +void TreeAddDeltaPart(TREE_ROOT *root, TREE_NODE *node, JobId_t JobId, int32_t FileIndex); -DLL_IMP_EXP void FreeTree(TREE_ROOT *root); -DLL_IMP_EXP POOLMEM *tree_getpath(TREE_NODE *node); -DLL_IMP_EXP void TreeRemoveNode(TREE_ROOT *root, TREE_NODE *node); +void FreeTree(TREE_ROOT *root); +POOLMEM *tree_getpath(TREE_NODE *node); +void TreeRemoveNode(TREE_ROOT *root, TREE_NODE *node); /** * Use the following for traversing the whole tree. It will be diff --git a/core/src/lib/util.h b/core/src/lib/util.h index c2740e93dfa..a8e62824197 100644 --- a/core/src/lib/util.h +++ b/core/src/lib/util.h @@ -21,32 +21,32 @@ #ifndef BAREOS_LIB_UTIL_H_ #define BAREOS_LIB_UTIL_H_ -DLL_IMP_EXP void EscapeString(PoolMem &snew, char *old, int len); -DLL_IMP_EXP bool IsBufZero(char *buf, int len); -DLL_IMP_EXP void lcase(char *str); -DLL_IMP_EXP void BashSpaces(char *str); -DLL_IMP_EXP void BashSpaces(PoolMem &pm); -DLL_IMP_EXP void UnbashSpaces(char *str); -DLL_IMP_EXP void UnbashSpaces(PoolMem &pm); -DLL_IMP_EXP const char* IndentMultilineString(PoolMem &resultbuffer, const char *multilinestring, const char *separator); -DLL_IMP_EXP char *encode_time(utime_t time, char *buf); -DLL_IMP_EXP bool ConvertTimeoutToTimespec(timespec &timeout, int timeout_in_seconds); -DLL_IMP_EXP char *encode_mode(mode_t mode, char *buf); -DLL_IMP_EXP int DoShellExpansion(char *name, int name_len); -DLL_IMP_EXP void JobstatusToAscii(int JobStatus, char *msg, int maxlen); -DLL_IMP_EXP void JobstatusToAsciiGui(int JobStatus, char *msg, int maxlen); -DLL_IMP_EXP int RunProgram(char *prog, int wait, POOLMEM *&results); -DLL_IMP_EXP int RunProgramFullOutput(char *prog, int wait, POOLMEM *&results); -DLL_IMP_EXP char *action_on_purge_to_string(int aop, PoolMem &ret); -DLL_IMP_EXP const char *job_type_to_str(int type); -DLL_IMP_EXP const char *job_status_to_str(int stat); -DLL_IMP_EXP const char *job_level_to_str(int level); -DLL_IMP_EXP const char *volume_status_to_str(const char *status); -DLL_IMP_EXP void MakeSessionKey(char *key, char *seed, int mode); -DLL_IMP_EXP void EncodeSessionKey(char *encode, char *session, char *key, int maxlen); -DLL_IMP_EXP void DecodeSessionKey(char *decode, char *session, char *key, int maxlen); -DLL_IMP_EXP POOLMEM *edit_job_codes(JobControlRecord *jcr, char *omsg, char *imsg, const char *to, job_code_callback_t job_code_callback = NULL); -DLL_IMP_EXP void SetWorkingDirectory(char *wd); -DLL_IMP_EXP const char *last_path_separator(const char *str); +void EscapeString(PoolMem &snew, char *old, int len); +bool IsBufZero(char *buf, int len); +void lcase(char *str); +void BashSpaces(char *str); +void BashSpaces(PoolMem &pm); +void UnbashSpaces(char *str); +void UnbashSpaces(PoolMem &pm); +const char* IndentMultilineString(PoolMem &resultbuffer, const char *multilinestring, const char *separator); +char *encode_time(utime_t time, char *buf); +bool ConvertTimeoutToTimespec(timespec &timeout, int timeout_in_seconds); +char *encode_mode(mode_t mode, char *buf); +int DoShellExpansion(char *name, int name_len); +void JobstatusToAscii(int JobStatus, char *msg, int maxlen); +void JobstatusToAsciiGui(int JobStatus, char *msg, int maxlen); +int RunProgram(char *prog, int wait, POOLMEM *&results); +int RunProgramFullOutput(char *prog, int wait, POOLMEM *&results); +char *action_on_purge_to_string(int aop, PoolMem &ret); +const char *job_type_to_str(int type); +const char *job_status_to_str(int stat); +const char *job_level_to_str(int level); +const char *volume_status_to_str(const char *status); +void MakeSessionKey(char *key, char *seed, int mode); +void EncodeSessionKey(char *encode, char *session, char *key, int maxlen); +void DecodeSessionKey(char *decode, char *session, char *key, int maxlen); +POOLMEM *edit_job_codes(JobControlRecord *jcr, char *omsg, char *imsg, const char *to, job_code_callback_t job_code_callback = NULL); +void SetWorkingDirectory(char *wd); +const char *last_path_separator(const char *str); #endif // BAREOS_LIB_UTIL_H_ diff --git a/core/src/lib/var.h b/core/src/lib/var.h index 2db402edab3..4704ce5db86 100644 --- a/core/src/lib/var.h +++ b/core/src/lib/var.h @@ -131,13 +131,13 @@ typedef var_rc_t (*var_cb_operation_t)( ); -DLL_IMP_EXP var_rc_t var_create (var_t **var); -DLL_IMP_EXP var_rc_t var_destroy (var_t *var); -DLL_IMP_EXP var_rc_t var_config (var_t *var, var_config_t mode, ...); -DLL_IMP_EXP var_rc_t var_unescape (var_t *var, const char *src_ptr, int src_len, char *dst_ptr, int dst_len, int all); -DLL_IMP_EXP var_rc_t var_expand (var_t *var, const char *src_ptr, int src_len, char **dst_ptr, int *dst_len, int force_expand); -DLL_IMP_EXP var_rc_t var_formatv (var_t *var, char **dst_ptr, int force_expand, const char *fmt, va_list ap); -DLL_IMP_EXP var_rc_t var_format (var_t *var, char **dst_ptr, int force_expand, const char *fmt, ...); -DLL_IMP_EXP const char *var_strerror (var_t *var, var_rc_t rc); +var_rc_t var_create (var_t **var); +var_rc_t var_destroy (var_t *var); +var_rc_t var_config (var_t *var, var_config_t mode, ...); +var_rc_t var_unescape (var_t *var, const char *src_ptr, int src_len, char *dst_ptr, int dst_len, int all); +var_rc_t var_expand (var_t *var, const char *src_ptr, int src_len, char **dst_ptr, int *dst_len, int force_expand); +var_rc_t var_formatv (var_t *var, char **dst_ptr, int force_expand, const char *fmt, va_list ap); +var_rc_t var_format (var_t *var, char **dst_ptr, int force_expand, const char *fmt, ...); +const char *var_strerror (var_t *var, var_rc_t rc); #endif /* BAREOS_LIB_VAR_H_ */ diff --git a/core/src/lib/watchdog.h b/core/src/lib/watchdog.h index 58deecd2170..3056e18a0df 100644 --- a/core/src/lib/watchdog.h +++ b/core/src/lib/watchdog.h @@ -48,11 +48,11 @@ struct s_watchdog_t { typedef struct s_watchdog_t watchdog_t; /* Exported globals */ -extern utime_t DLL_IMP_EXP watchdog_time; /* this has granularity of SLEEP_TIME */ -extern utime_t DLL_IMP_EXP watchdog_sleep_time; /* examine things every 60 seconds */ -DLL_IMP_EXP int StartWatchdog(void); -DLL_IMP_EXP int StopWatchdog(void); -DLL_IMP_EXP watchdog_t *new_watchdog(void); -DLL_IMP_EXP bool RegisterWatchdog(watchdog_t *wd); -DLL_IMP_EXP bool UnregisterWatchdog(watchdog_t *wd); -DLL_IMP_EXP bool IsWatchdog(); +extern utime_t watchdog_time; /* this has granularity of SLEEP_TIME */ +extern utime_t watchdog_sleep_time; /* examine things every 60 seconds */ +int StartWatchdog(void); +int StopWatchdog(void); +watchdog_t *new_watchdog(void); +bool RegisterWatchdog(watchdog_t *wd); +bool UnregisterWatchdog(watchdog_t *wd); +bool IsWatchdog(); diff --git a/core/src/plugins/dird/example-plugin-dir.cc b/core/src/plugins/dird/example-plugin-dir.cc index 99011397472..323581a77b1 100644 --- a/core/src/plugins/dird/example-plugin-dir.cc +++ b/core/src/plugins/dird/example-plugin-dir.cc @@ -83,7 +83,7 @@ extern "C" { * * External entry point called by Bareos to "load" the plugin */ -bRC DLL_IMP_EXP loadPlugin(bDirInfo *lbinfo, +bRC loadPlugin(bDirInfo *lbinfo, bDirFuncs *lbfuncs, genpInfo **pinfo, pDirFuncs **pfuncs) @@ -101,7 +101,7 @@ bRC DLL_IMP_EXP loadPlugin(bDirInfo *lbinfo, /** * External entry point to unload the plugin */ -bRC DLL_IMP_EXP unloadPlugin() +bRC unloadPlugin() { printf("plugin: Unloaded\n"); return bRC_OK; diff --git a/core/src/plugins/dird/python-dir.cc b/core/src/plugins/dird/python-dir.cc index 9d0a00d4019..5f376b0831f 100644 --- a/core/src/plugins/dird/python-dir.cc +++ b/core/src/plugins/dird/python-dir.cc @@ -129,7 +129,7 @@ extern "C" { * * External entry point called by Bareos to "load" the plugin */ -bRC DLL_IMP_EXP loadPlugin(bDirInfo *lbinfo, +bRC loadPlugin(bDirInfo *lbinfo, bDirFuncs *lbfuncs, genpInfo **pinfo, pDirFuncs **pfuncs) @@ -153,7 +153,7 @@ bRC DLL_IMP_EXP loadPlugin(bDirInfo *lbinfo, /** * External entry point to unload the plugin */ -bRC DLL_IMP_EXP unloadPlugin() +bRC unloadPlugin() { /* * Terminate Python diff --git a/core/src/plugins/filed/bpipe-fd.cc b/core/src/plugins/filed/bpipe-fd.cc index fa5a1ddc313..c29b7b20e34 100644 --- a/core/src/plugins/filed/bpipe-fd.cc +++ b/core/src/plugins/filed/bpipe-fd.cc @@ -159,7 +159,7 @@ extern "C" { /** * External entry point called by Bareos to "load" the plugin */ -bRC DLL_IMP_EXP loadPlugin(bInfo *lbinfo, +bRC loadPlugin(bInfo *lbinfo, bFuncs *lbfuncs, genpInfo **pinfo, pFuncs **pfuncs) @@ -175,7 +175,7 @@ bRC DLL_IMP_EXP loadPlugin(bInfo *lbinfo, /** * External entry point to unload the plugin */ -bRC DLL_IMP_EXP unloadPlugin() +bRC unloadPlugin() { return bRC_OK; } diff --git a/core/src/plugins/filed/cephfs-fd.cc b/core/src/plugins/filed/cephfs-fd.cc index 88a1c9cc19d..3d9723030a8 100644 --- a/core/src/plugins/filed/cephfs-fd.cc +++ b/core/src/plugins/filed/cephfs-fd.cc @@ -195,7 +195,7 @@ extern "C" { * * External entry point called by Bareos to "load" the plugin */ -bRC DLL_IMP_EXP loadPlugin(bInfo *lbinfo, +bRC loadPlugin(bInfo *lbinfo, bFuncs *lbfuncs, genpInfo **pinfo, pFuncs **pfuncs) @@ -211,7 +211,7 @@ bRC DLL_IMP_EXP loadPlugin(bInfo *lbinfo, /** * External entry point to unload the plugin */ -bRC DLL_IMP_EXP unloadPlugin() +bRC unloadPlugin() { return bRC_OK; } diff --git a/core/src/plugins/filed/example-plugin-fd.cc b/core/src/plugins/filed/example-plugin-fd.cc index 6a246565af7..f98b9590680 100644 --- a/core/src/plugins/filed/example-plugin-fd.cc +++ b/core/src/plugins/filed/example-plugin-fd.cc @@ -90,7 +90,7 @@ extern "C" { /* * Plugin called here when it is first loaded */ -bRC DLL_IMP_EXP loadPlugin(bInfo *lbinfo, +bRC loadPlugin(bInfo *lbinfo, bFuncs *lbfuncs, genpInfo **pinfo, pFuncs **pfuncs) diff --git a/core/src/plugins/filed/fd_common.h b/core/src/plugins/filed/fd_common.h index d8941790ecc..d25e595a1ae 100644 --- a/core/src/plugins/filed/fd_common.h +++ b/core/src/plugins/filed/fd_common.h @@ -34,18 +34,8 @@ #define L_INCREMENTAL 'I' /* since last backup */ #define L_DIFFERENTIAL 'D' /* since last full backup */ -#ifndef DLL_IMP_EXP -#if defined(BUILDING_DLL) -#define DLL_IMP_EXP _declspec(dllexport) -#elif defined(USING_DLL) -#define DLL_IMP_EXP _declspec(dllimport) -#else -#define DLL_IMP_EXP -#endif -#endif - -DLL_IMP_EXP void *reallymalloc(const char *fname, int lineno, unsigned int nbytes); -DLL_IMP_EXP void Reallyfree(const char *file, int line, void *fp); +void *reallymalloc(const char *fname, int lineno, unsigned int nbytes); +void Reallyfree(const char *file, int line, void *fp); #ifdef SMARTALLOC #ifndef bmalloc @@ -63,8 +53,8 @@ DLL_IMP_EXP void Reallyfree(const char *file, int line, void *fp); #define malloc(s) sm_malloc(__FILE__, __LINE__, (s)) #define free(o) sm_free(__FILE__, __LINE__, (o)) -DLL_IMP_EXP void *sm_malloc(const char *fname, int lineno, unsigned int nbytes); -DLL_IMP_EXP void sm_free(const char *file, int line, void *fp); +void *sm_malloc(const char *fname, int lineno, unsigned int nbytes); +void sm_free(const char *file, int line, void *fp); void *operator new(size_t size, char const * file, int line) { diff --git a/core/src/plugins/filed/gfapi-fd.cc b/core/src/plugins/filed/gfapi-fd.cc index 011b22f589e..85f5333d2e9 100644 --- a/core/src/plugins/filed/gfapi-fd.cc +++ b/core/src/plugins/filed/gfapi-fd.cc @@ -317,7 +317,7 @@ extern "C" { * * External entry point called by Bareos to "load" the plugin */ -bRC DLL_IMP_EXP loadPlugin(bInfo *lbinfo, +bRC loadPlugin(bInfo *lbinfo, bFuncs *lbfuncs, genpInfo **pinfo, pFuncs **pfuncs) @@ -333,7 +333,7 @@ bRC DLL_IMP_EXP loadPlugin(bInfo *lbinfo, /** * External entry point to unload the plugin */ -bRC DLL_IMP_EXP unloadPlugin() +bRC unloadPlugin() { return bRC_OK; } diff --git a/core/src/plugins/filed/python-fd.cc b/core/src/plugins/filed/python-fd.cc index 72181d222f5..bd59d6ad491 100644 --- a/core/src/plugins/filed/python-fd.cc +++ b/core/src/plugins/filed/python-fd.cc @@ -170,7 +170,7 @@ extern "C" { /** * Plugin called here when it is first loaded */ -bRC DLL_IMP_EXP loadPlugin(bInfo *lbinfo, +bRC loadPlugin(bInfo *lbinfo, bFuncs *lbfuncs, genpInfo **pinfo, pFuncs **pfuncs) @@ -194,7 +194,7 @@ bRC DLL_IMP_EXP loadPlugin(bInfo *lbinfo, /** * Plugin called here when it is unloaded, normally when Bareos is going to exit. */ -bRC DLL_IMP_EXP unloadPlugin() +bRC unloadPlugin() { /* * Terminate Python diff --git a/core/src/plugins/filed/rados-fd.cc b/core/src/plugins/filed/rados-fd.cc index 777d78b1583..d2046546fdc 100644 --- a/core/src/plugins/filed/rados-fd.cc +++ b/core/src/plugins/filed/rados-fd.cc @@ -192,7 +192,7 @@ extern "C" { * * External entry point called by Bareos to "load" the plugin */ -bRC DLL_IMP_EXP loadPlugin(bInfo *lbinfo, +bRC loadPlugin(bInfo *lbinfo, bFuncs *lbfuncs, genpInfo **pinfo, pFuncs **pfuncs) @@ -208,7 +208,7 @@ bRC DLL_IMP_EXP loadPlugin(bInfo *lbinfo, /** * External entry point to unload the plugin */ -bRC DLL_IMP_EXP unloadPlugin() +bRC unloadPlugin() { return bRC_OK; } diff --git a/core/src/plugins/filed/test-deltaseq-fd.cc b/core/src/plugins/filed/test-deltaseq-fd.cc index 4429361240b..2cf9e542bfb 100644 --- a/core/src/plugins/filed/test-deltaseq-fd.cc +++ b/core/src/plugins/filed/test-deltaseq-fd.cc @@ -133,7 +133,7 @@ extern "C" { /** * External entry point called by Bareos to "load" the plugin */ -bRC DLL_IMP_EXP loadPlugin(bInfo *lbinfo, +bRC loadPlugin(bInfo *lbinfo, bFuncs *lbfuncs, genpInfo **pinfo, pFuncs **pfuncs) @@ -154,7 +154,7 @@ bRC DLL_IMP_EXP loadPlugin(bInfo *lbinfo, /** * External entry point to unload the plugin */ -bRC DLL_IMP_EXP unloadPlugin() +bRC unloadPlugin() { // Dmsg(NULL, debuglevel, "delta-test-fd: Unloaded\n"); return bRC_OK; diff --git a/core/src/plugins/filed/test-plugin-fd.cc b/core/src/plugins/filed/test-plugin-fd.cc index ee26eb32af8..a9344ac4480 100644 --- a/core/src/plugins/filed/test-plugin-fd.cc +++ b/core/src/plugins/filed/test-plugin-fd.cc @@ -143,7 +143,7 @@ extern "C" { /** * External entry point called by Bareos to "load" the plugin */ -bRC DLL_IMP_EXP loadPlugin(bInfo *lbinfo, +bRC loadPlugin(bInfo *lbinfo, bFuncs *lbfuncs, genpInfo **pinfo, pFuncs **pfuncs) @@ -159,7 +159,7 @@ bRC DLL_IMP_EXP loadPlugin(bInfo *lbinfo, /** * External entry point to unload the plugin */ -bRC DLL_IMP_EXP unloadPlugin() +bRC unloadPlugin() { return bRC_OK; } diff --git a/core/src/plugins/stored/autoxflate-sd.cc b/core/src/plugins/stored/autoxflate-sd.cc index f0d3ae044d8..2c9bcc48953 100644 --- a/core/src/plugins/stored/autoxflate-sd.cc +++ b/core/src/plugins/stored/autoxflate-sd.cc @@ -141,7 +141,7 @@ extern "C" { * * External entry point called by Bareos to "load the plugin */ -bRC DLL_IMP_EXP loadPlugin(bsdInfo *lbinfo, +bRC loadPlugin(bsdInfo *lbinfo, bsdFuncs *lbfuncs, genpInfo **pinfo, psdFuncs **pfuncs) @@ -162,7 +162,7 @@ bRC DLL_IMP_EXP loadPlugin(bsdInfo *lbinfo, /** * External entry point to unload the plugin */ -bRC DLL_IMP_EXP unloadPlugin() +bRC unloadPlugin() { return bRC_OK; } diff --git a/core/src/plugins/stored/example-plugin-sd.cc b/core/src/plugins/stored/example-plugin-sd.cc index 09ac6714b0c..f8c2e1af908 100644 --- a/core/src/plugins/stored/example-plugin-sd.cc +++ b/core/src/plugins/stored/example-plugin-sd.cc @@ -81,7 +81,7 @@ extern "C" { * * External entry point called by Bareos to "load" the plugin */ -bRC DLL_IMP_EXP loadPlugin(bsdInfo *lbinfo, +bRC loadPlugin(bsdInfo *lbinfo, bsdFuncs *lbfuncs, genpInfo **pinfo, psdFuncs **pfuncs) @@ -98,7 +98,7 @@ bRC DLL_IMP_EXP loadPlugin(bsdInfo *lbinfo, /** * External entry point to unload the plugin */ -bRC DLL_IMP_EXP unloadPlugin() +bRC unloadPlugin() { printf("example-plugin-sd: Unloaded\n"); return bRC_OK; diff --git a/core/src/plugins/stored/python-sd.cc b/core/src/plugins/stored/python-sd.cc index bd0319b06fa..f895ae537c1 100644 --- a/core/src/plugins/stored/python-sd.cc +++ b/core/src/plugins/stored/python-sd.cc @@ -128,7 +128,7 @@ extern "C" { * * External entry point called by Bareos to "load" the plugin */ -bRC DLL_IMP_EXP loadPlugin(bsdInfo *lbinfo, +bRC loadPlugin(bsdInfo *lbinfo, bsdFuncs *lbfuncs, genpInfo **pinfo, psdFuncs **pfuncs) @@ -152,7 +152,7 @@ bRC DLL_IMP_EXP loadPlugin(bsdInfo *lbinfo, /** * External entry point to unload the plugin */ -bRC DLL_IMP_EXP unloadPlugin() +bRC unloadPlugin() { /* * Terminate Python diff --git a/core/src/plugins/stored/scsicrypto-sd.cc b/core/src/plugins/stored/scsicrypto-sd.cc index b5f8d1e276b..a43f5dde4fe 100644 --- a/core/src/plugins/stored/scsicrypto-sd.cc +++ b/core/src/plugins/stored/scsicrypto-sd.cc @@ -133,7 +133,7 @@ extern "C" { * * External entry point called by Bareos to "load the plugin */ -bRC DLL_IMP_EXP loadPlugin(bsdInfo *lbinfo, +bRC loadPlugin(bsdInfo *lbinfo, bsdFuncs *lbfuncs, genpInfo **pinfo, psdFuncs **pfuncs) @@ -150,7 +150,7 @@ bRC DLL_IMP_EXP loadPlugin(bsdInfo *lbinfo, /** * External entry point to unload the plugin */ -bRC DLL_IMP_EXP unloadPlugin() +bRC unloadPlugin() { return bRC_OK; } diff --git a/core/src/plugins/stored/scsitapealert-sd.cc b/core/src/plugins/stored/scsitapealert-sd.cc index 32203c9ecab..ac41440238a 100644 --- a/core/src/plugins/stored/scsitapealert-sd.cc +++ b/core/src/plugins/stored/scsitapealert-sd.cc @@ -94,7 +94,7 @@ extern "C" { * * External entry point called by Bareos to "load the plugin */ -bRC DLL_IMP_EXP loadPlugin(bsdInfo *lbinfo, +bRC loadPlugin(bsdInfo *lbinfo, bsdFuncs *lbfuncs, genpInfo **pinfo, psdFuncs **pfuncs) @@ -111,7 +111,7 @@ bRC DLL_IMP_EXP loadPlugin(bsdInfo *lbinfo, /** * External entry point to unload the plugin */ -bRC DLL_IMP_EXP unloadPlugin() +bRC unloadPlugin() { return bRC_OK; } diff --git a/core/src/stored/backends/cephfs_device.cc b/core/src/stored/backends/cephfs_device.cc index 84b8d5e32ac..8bb337ddcc5 100644 --- a/core/src/stored/backends/cephfs_device.cc +++ b/core/src/stored/backends/cephfs_device.cc @@ -400,7 +400,7 @@ cephfs_device::cephfs_device() } #ifdef HAVE_DYNAMIC_SD_BACKENDS -extern "C" Device SD_IMP_EXP *backend_instantiate(JobControlRecord *jcr, int device_type) +extern "C" Device *backend_instantiate(JobControlRecord *jcr, int device_type) { Device *dev = NULL; @@ -416,7 +416,7 @@ extern "C" Device SD_IMP_EXP *backend_instantiate(JobControlRecord *jcr, int dev return dev; } -extern "C" void SD_IMP_EXP flush_backend(void) +extern "C" void flush_backend(void) { } #endif diff --git a/core/src/stored/backends/droplet_device.cc b/core/src/stored/backends/droplet_device.cc index 3046abab641..92de6408a10 100644 --- a/core/src/stored/backends/droplet_device.cc +++ b/core/src/stored/backends/droplet_device.cc @@ -936,7 +936,7 @@ droplet_device::droplet_device() } #ifdef HAVE_DYNAMIC_SD_BACKENDS -extern "C" Device SD_IMP_EXP *backend_instantiate(JobControlRecord *jcr, int device_type) +extern "C" Device *backend_instantiate(JobControlRecord *jcr, int device_type) { Device *dev = NULL; @@ -952,7 +952,7 @@ extern "C" Device SD_IMP_EXP *backend_instantiate(JobControlRecord *jcr, int dev return dev; } -extern "C" void SD_IMP_EXP flush_backend(void) +extern "C" void flush_backend(void) { } #endif diff --git a/core/src/stored/backends/elasto_device.cc b/core/src/stored/backends/elasto_device.cc index d87805d4398..67ac8e1dcac 100644 --- a/core/src/stored/backends/elasto_device.cc +++ b/core/src/stored/backends/elasto_device.cc @@ -394,7 +394,7 @@ elasto_device::elasto_device() } #ifdef HAVE_DYNAMIC_SD_BACKENDS -extern "C" Device SD_IMP_EXP *backend_instantiate(JobControlRecord *jcr, int device_type) +extern "C" Device *backend_instantiate(JobControlRecord *jcr, int device_type) { Device *dev = NULL; @@ -410,7 +410,7 @@ extern "C" Device SD_IMP_EXP *backend_instantiate(JobControlRecord *jcr, int dev return dev; } -extern "C" void SD_IMP_EXP flush_backend(void) +extern "C" void flush_backend(void) { } #endif diff --git a/core/src/stored/backends/gfapi_device.cc b/core/src/stored/backends/gfapi_device.cc index 22ce982e909..30451cc0f4e 100644 --- a/core/src/stored/backends/gfapi_device.cc +++ b/core/src/stored/backends/gfapi_device.cc @@ -637,7 +637,7 @@ gfapi_device::gfapi_device() } #ifdef HAVE_DYNAMIC_SD_BACKENDS -extern "C" Device SD_IMP_EXP *backend_instantiate(JobControlRecord *jcr, int device_type) +extern "C" Device *backend_instantiate(JobControlRecord *jcr, int device_type) { Device *dev = NULL; @@ -653,7 +653,7 @@ extern "C" Device SD_IMP_EXP *backend_instantiate(JobControlRecord *jcr, int dev return dev; } -extern "C" void SD_IMP_EXP flush_backend(void) +extern "C" void flush_backend(void) { } #endif diff --git a/core/src/stored/backends/object_store_device.cc b/core/src/stored/backends/object_store_device.cc index f1327fe3345..8b52a120e63 100644 --- a/core/src/stored/backends/object_store_device.cc +++ b/core/src/stored/backends/object_store_device.cc @@ -552,7 +552,7 @@ object_store_device::object_store_device() } #ifdef HAVE_DYNAMIC_SD_BACKENDS -extern "C" Device SD_IMP_EXP *backend_instantiate(JobControlRecord *jcr, int device_type) +extern "C" Device *backend_instantiate(JobControlRecord *jcr, int device_type) { Device *dev = NULL; @@ -568,7 +568,7 @@ extern "C" Device SD_IMP_EXP *backend_instantiate(JobControlRecord *jcr, int dev return dev; } -extern "C" void SD_IMP_EXP flush_backend(void) +extern "C" void flush_backend(void) { } #endif diff --git a/core/src/stored/backends/rados_device.cc b/core/src/stored/backends/rados_device.cc index 80544b54714..17e3f187de4 100644 --- a/core/src/stored/backends/rados_device.cc +++ b/core/src/stored/backends/rados_device.cc @@ -660,7 +660,7 @@ rados_device::rados_device() } #ifdef HAVE_DYNAMIC_SD_BACKENDS -extern "C" Device SD_IMP_EXP *backend_instantiate(JobControlRecord *jcr, int device_type) +extern "C" Device *backend_instantiate(JobControlRecord *jcr, int device_type) { Device *dev = NULL; @@ -676,7 +676,7 @@ extern "C" Device SD_IMP_EXP *backend_instantiate(JobControlRecord *jcr, int dev return dev; } -extern "C" void SD_IMP_EXP flush_backend(void) +extern "C" void flush_backend(void) { } #endif diff --git a/core/src/stored/backends/unix_fifo_device.cc b/core/src/stored/backends/unix_fifo_device.cc index 53f0297bc7f..a3eadf2e646 100644 --- a/core/src/stored/backends/unix_fifo_device.cc +++ b/core/src/stored/backends/unix_fifo_device.cc @@ -349,7 +349,7 @@ unix_fifo_device::unix_fifo_device() } #ifdef HAVE_DYNAMIC_SD_BACKENDS -extern "C" Device SD_IMP_EXP *backend_instantiate(JobControlRecord *jcr, int device_type) +extern "C" Device *backend_instantiate(JobControlRecord *jcr, int device_type) { Device *dev = NULL; @@ -365,7 +365,7 @@ extern "C" Device SD_IMP_EXP *backend_instantiate(JobControlRecord *jcr, int dev return dev; } -extern "C" void SD_IMP_EXP flush_backend(void) +extern "C" void flush_backend(void) { } #endif diff --git a/core/src/stored/backends/unix_tape_device.cc b/core/src/stored/backends/unix_tape_device.cc index d7194704bf4..25a7fee8c38 100644 --- a/core/src/stored/backends/unix_tape_device.cc +++ b/core/src/stored/backends/unix_tape_device.cc @@ -63,7 +63,7 @@ unix_tape_device::unix_tape_device() } #ifdef HAVE_DYNAMIC_SD_BACKENDS -extern "C" Device SD_IMP_EXP *backend_instantiate(JobControlRecord *jcr, int device_type) +extern "C" Device *backend_instantiate(JobControlRecord *jcr, int device_type) { Device *dev = NULL; @@ -79,7 +79,7 @@ extern "C" Device SD_IMP_EXP *backend_instantiate(JobControlRecord *jcr, int dev return dev; } -extern "C" void SD_IMP_EXP flush_backend(void) +extern "C" void flush_backend(void) { } #endif diff --git a/core/src/stored/butil.cc b/core/src/stored/butil.cc index 55b2e6c42ab..f3a72af36e4 100644 --- a/core/src/stored/butil.cc +++ b/core/src/stored/butil.cc @@ -43,7 +43,7 @@ #include "lib/parse_bsr.h" #include "include/jcr.h" -ConfigurationParser SD_IMP_EXP *my_config = NULL; /* Our Global config */ +ConfigurationParser *my_config = NULL; /* Our Global config */ namespace storagedaemon { diff --git a/core/src/stored/dev.h b/core/src/stored/dev.h index 209553f25ba..0188aea30bd 100644 --- a/core/src/stored/dev.h +++ b/core/src/stored/dev.h @@ -601,7 +601,7 @@ enum get_vol_info_rw { * same DeviceControlRecord. Consequently, when creating/attaching/detaching * and freeing the DeviceControlRecord we must lock it (mutex_). */ -class SD_IMP_EXP DeviceControlRecord : public SmartAlloc { +class DeviceControlRecord : public SmartAlloc { private: bool dev_locked_; /**< Set if dev already locked */ int dev_lock_; /**< Non-zero if rLock already called */ @@ -762,7 +762,7 @@ class SD_IMP_EXP DeviceControlRecord : public SmartAlloc { bool RewriteVolumeLabel(bool recycle); }; -class SD_IMP_EXP StorageDaemonDeviceControlRecord : public DeviceControlRecord { +class StorageDaemonDeviceControlRecord : public DeviceControlRecord { public: /* * Virtual Destructor. diff --git a/core/src/stored/read.h b/core/src/stored/read.h index 122fed1147a..1d199c41402 100644 --- a/core/src/stored/read.h +++ b/core/src/stored/read.h @@ -23,7 +23,7 @@ namespace storagedaemon { -DLL_IMP_EXP bool DoReadData(JobControlRecord *jcr); +bool DoReadData(JobControlRecord *jcr); } /* namespace storagedaemon */ diff --git a/core/src/stored/read_record.h b/core/src/stored/read_record.h index fd731a59f87..7413ccfd85c 100644 --- a/core/src/stored/read_record.h +++ b/core/src/stored/read_record.h @@ -25,18 +25,18 @@ namespace storagedaemon { -DLL_IMP_EXP READ_CTX *new_read_context(void); -DLL_IMP_EXP void FreeReadContext(READ_CTX *rctx); -DLL_IMP_EXP void ReadContextSetRecord(DeviceControlRecord *dcr, READ_CTX *rctx); -DLL_IMP_EXP bool ReadNextBlockFromDevice(DeviceControlRecord *dcr, +READ_CTX *new_read_context(void); +void FreeReadContext(READ_CTX *rctx); +void ReadContextSetRecord(DeviceControlRecord *dcr, READ_CTX *rctx); +bool ReadNextBlockFromDevice(DeviceControlRecord *dcr, SESSION_LABEL *sessrec, bool RecordCb(DeviceControlRecord *dcr, DeviceRecord *rec), bool mount_cb(DeviceControlRecord *dcr), bool *status); -DLL_IMP_EXP bool ReadNextRecordFromBlock(DeviceControlRecord *dcr, +bool ReadNextRecordFromBlock(DeviceControlRecord *dcr, READ_CTX *rctx, bool *done); -DLL_IMP_EXP bool ReadRecords(DeviceControlRecord *dcr, +bool ReadRecords(DeviceControlRecord *dcr, bool RecordCb(DeviceControlRecord *dcr, DeviceRecord *rec), bool mount_cb(DeviceControlRecord *dcr)); diff --git a/core/src/stored/record.h b/core/src/stored/record.h index 5c44e5008f4..979d135963a 100644 --- a/core/src/stored/record.h +++ b/core/src/stored/record.h @@ -268,18 +268,18 @@ struct DelayedDataStream { class DeviceControlRecord; /* Forward Reference */ class DeviceBlock; /* Forward Reference */ -DLL_IMP_EXP const char *FI_to_ascii(char *buf, int fi); -DLL_IMP_EXP const char *stream_to_ascii(char *buf, int stream, int fi); -DLL_IMP_EXP const char *record_to_str(PoolMem &resultbuffer, JobControlRecord *jcr, const DeviceRecord *rec); -DLL_IMP_EXP void DumpRecord(const char *tag, const DeviceRecord *rec); -DLL_IMP_EXP bool WriteRecordToBlock(DeviceControlRecord *dcr, DeviceRecord *rec); -DLL_IMP_EXP bool CanWriteRecordToBlock(DeviceBlock *block, const DeviceRecord *rec); -DLL_IMP_EXP bool ReadRecordFromBlock(DeviceControlRecord *dcr, DeviceRecord *rec); -DLL_IMP_EXP DeviceRecord *new_record(bool with_data = true); -DLL_IMP_EXP void EmptyRecord(DeviceRecord *rec); -DLL_IMP_EXP void CopyRecordState(DeviceRecord *dst, DeviceRecord *src); -DLL_IMP_EXP void FreeRecord(DeviceRecord *rec); -DLL_IMP_EXP uint64_t GetRecordAddress(const DeviceRecord *rec); +const char *FI_to_ascii(char *buf, int fi); +const char *stream_to_ascii(char *buf, int stream, int fi); +const char *record_to_str(PoolMem &resultbuffer, JobControlRecord *jcr, const DeviceRecord *rec); +void DumpRecord(const char *tag, const DeviceRecord *rec); +bool WriteRecordToBlock(DeviceControlRecord *dcr, DeviceRecord *rec); +bool CanWriteRecordToBlock(DeviceBlock *block, const DeviceRecord *rec); +bool ReadRecordFromBlock(DeviceControlRecord *dcr, DeviceRecord *rec); +DeviceRecord *new_record(bool with_data = true); +void EmptyRecord(DeviceRecord *rec); +void CopyRecordState(DeviceRecord *dst, DeviceRecord *src); +void FreeRecord(DeviceRecord *rec); +uint64_t GetRecordAddress(const DeviceRecord *rec); } /* namespace storagedaemon */ diff --git a/core/src/stored/reserve.h b/core/src/stored/reserve.h index 06915d0cb62..6c73f6bdbdf 100644 --- a/core/src/stored/reserve.h +++ b/core/src/stored/reserve.h @@ -74,23 +74,23 @@ class ReserveContext { }; -DLL_IMP_EXP void InitReservationsLock(); -DLL_IMP_EXP void TermReservationsLock(); -DLL_IMP_EXP void _lockReservations(const char *file = "**Unknown**", int line = 0); -DLL_IMP_EXP void _unLockReservations(); -DLL_IMP_EXP void _lockVolumes(const char *file = "**Unknown**", int line = 0); -DLL_IMP_EXP void _unLockVolumes(); -DLL_IMP_EXP void _lockReadVolumes(const char *file = "**Unknown**", int line = 0); -DLL_IMP_EXP void _unLockReadVolumes(); -DLL_IMP_EXP void UnreserveDevice(DeviceControlRecord *dcr); -DLL_IMP_EXP bool FindSuitableDeviceForJob(JobControlRecord *jcr, ReserveContext &rctx); -DLL_IMP_EXP int SearchResForDevice(ReserveContext &rctx); -DLL_IMP_EXP void ReleaseReserveMessages(JobControlRecord *jcr); +void InitReservationsLock(); +void TermReservationsLock(); +void _lockReservations(const char *file = "**Unknown**", int line = 0); +void _unLockReservations(); +void _lockVolumes(const char *file = "**Unknown**", int line = 0); +void _unLockVolumes(); +void _lockReadVolumes(const char *file = "**Unknown**", int line = 0); +void _unLockReadVolumes(); +void UnreserveDevice(DeviceControlRecord *dcr); +bool FindSuitableDeviceForJob(JobControlRecord *jcr, ReserveContext &rctx); +int SearchResForDevice(ReserveContext &rctx); +void ReleaseReserveMessages(JobControlRecord *jcr); #ifdef SD_DEBUG_LOCK -DLL_IMP_EXP extern int reservations_lock_count; -DLL_IMP_EXP extern int vol_list_lock_count; -DLL_IMP_EXP extern int read_vol_list_lock_count; +extern int reservations_lock_count; +extern int vol_list_lock_count; +extern int read_vol_list_lock_count; #define LockReservations() \ do { Dmsg3(sd_debuglevel, "LockReservations at %s:%d precnt=%d\n", \ diff --git a/core/src/stored/stored.h b/core/src/stored/stored.h index f80cfeeff37..d3d909a6756 100644 --- a/core/src/stored/stored.h +++ b/core/src/stored/stored.h @@ -79,11 +79,11 @@ int Readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result); #include "sd_plugins.h" -extern ConfigurationParser SD_IMP_EXP *my_config; /* Our Global config */ +extern ConfigurationParser *my_config; /* Our Global config */ namespace storagedaemon { -extern bool SD_IMP_EXP forge_on; /* Proceed inspite of I/O errors */ +extern bool forge_on; /* Proceed inspite of I/O errors */ uint32_t new_VolSessionId(); } /* namespace storagedaemon */ diff --git a/core/src/win32/compat/compat.cc b/core/src/win32/compat/compat.cc index 8a0fc474ba3..bec70451313 100644 --- a/core/src/win32/compat/compat.cc +++ b/core/src/win32/compat/compat.cc @@ -415,7 +415,7 @@ static inline void conv_unix_to_vss_win32_path(const char *name, char *win32_nam /** * Conversion of a Unix filename to a Win32 filename */ -DLL_IMP_EXP void unix_name_to_win32(POOLMEM *&win32_name, const char *name) +void unix_name_to_win32(POOLMEM *&win32_name, const char *name) { DWORD dwSize; diff --git a/core/src/win32/compat/glob.cc b/core/src/win32/compat/glob.cc index afcaf11efc8..5a2a32c9086 100644 --- a/core/src/win32/compat/glob.cc +++ b/core/src/win32/compat/glob.cc @@ -1037,7 +1037,7 @@ static glob_t *glob_registry( int request, glob_t *gl_data ) return gl_data; } -DLL_IMP_EXP int +int __mingw_glob( const char *pattern, int flags, int (*errfn)(const char *, int), glob_t *gl_data ) { /* Module entry point for the glob() function. @@ -1065,7 +1065,7 @@ __mingw_glob( const char *pattern, int flags, int (*errfn)(const char *, int), g return status; } -DLL_IMP_EXP void +void __mingw_globfree( glob_t *gl_data ) { /* Module entry point for globfree() function; the activity is diff --git a/core/src/win32/compat/include/compat.h b/core/src/win32/compat/include/compat.h index bd933b49cf2..f8fc8bcf2b5 100644 --- a/core/src/win32/compat/include/compat.h +++ b/core/src/win32/compat/include/compat.h @@ -35,12 +35,6 @@ #define _STAT_H /* don't pull in MinGW stat.h */ #endif - -#define DLL_IMP_EXP -#define CATS_IMP_EXP -#define SD_IMP_EXP - - #ifndef _STAT_DEFINED #define _STAT_DEFINED 1 /* don't pull in MinGW struct stat from wchar.h */ #endif @@ -98,7 +92,7 @@ typedef struct _REPARSE_DATA_BUFFER { #define INT64 long long int #endif -DLL_IMP_EXP void sleep(int); +void sleep(int); typedef UINT32 key_t; @@ -145,7 +139,7 @@ struct timezone { #ifndef HAVE_MINGW int strcasecmp(const char*, const char *); #endif -DLL_IMP_EXP int gettimeofday(struct timeval *, struct timezone *); +int gettimeofday(struct timeval *, struct timezone *); #if !defined(EETXTBUSY) #define EETXTBUSY 26 @@ -236,17 +230,17 @@ struct stat #define iscsym __iscsym #endif -DLL_IMP_EXP bool InitializeComSecurity(); +bool InitializeComSecurity(); bool CreateJunction(const char *szJunction, const char *szPath); const char *errorString(void); typedef bool (*t_pVSSPathConvert)(const char *szFilePath, char *szShadowPath, int nBuflen); typedef bool (*t_pVSSPathConvertW)(const wchar_t *szFilePath, wchar_t *szShadowPath, int nBuflen); -DLL_IMP_EXP bool SetVSSPathConvert(t_pVSSPathConvert pPathConvert, t_pVSSPathConvertW pPathConvertW); +bool SetVSSPathConvert(t_pVSSPathConvert pPathConvert, t_pVSSPathConvertW pPathConvertW); -DLL_IMP_EXP int lchown(const char *, uid_t uid, gid_t gid); -DLL_IMP_EXP int chown(const char *, uid_t uid, gid_t gid); +int lchown(const char *, uid_t uid, gid_t gid); +int chown(const char *, uid_t uid, gid_t gid); #define O_NONBLOCK 04000 #define F_GETFL 3 #define F_SETFL 4 @@ -255,14 +249,14 @@ DLL_IMP_EXP int chown(const char *, uid_t uid, gid_t gid); #define open _open #endif -DLL_IMP_EXP int fcntl(int fd, int cmd, long arg); -DLL_IMP_EXP int fstat(intptr_t fd, struct stat *sb); +int fcntl(int fd, int cmd, long arg); +int fstat(intptr_t fd, struct stat *sb); -DLL_IMP_EXP int inet_aton(const char *cp, struct in_addr *inp); -DLL_IMP_EXP int kill(int pid, int signo); -DLL_IMP_EXP int pipe(int []); -DLL_IMP_EXP int fork(); -DLL_IMP_EXP int waitpid(int, int *, int); +int inet_aton(const char *cp, struct in_addr *inp); +int kill(int pid, int signo); +int pipe(int []); +int fork(); +int waitpid(int, int *, int); #if !defined(HAVE_MINGW) #define strncasecmp strnicmp @@ -283,24 +277,24 @@ int utime(const char *filename, struct utimbuf *buf); #define HAVE_OLD_SOCKOPT struct timespec; -DLL_IMP_EXP int readdir(unsigned int fd, struct dirent *dirp, unsigned int count); -DLL_IMP_EXP int nanosleep(const struct timespec *rqtp, struct timespec *rmtp); -DLL_IMP_EXP long int random(void); -DLL_IMP_EXP void srandom(unsigned int seed); -DLL_IMP_EXP int lstat(const char *filename, struct stat *sb); -DLL_IMP_EXP int stat(const char *file, struct stat *sb); -DLL_IMP_EXP long pathconf(const char *path, int name); -DLL_IMP_EXP ssize_t readlink(const char *path, char *buf, size_t bufsiz); -DLL_IMP_EXP int win32_symlink(const char *name1, const char *name2, _dev_t st_rdev); -DLL_IMP_EXP int link(const char *existing, const char *newfile); +int readdir(unsigned int fd, struct dirent *dirp, unsigned int count); +int nanosleep(const struct timespec *rqtp, struct timespec *rmtp); +long int random(void); +void srandom(unsigned int seed); +int lstat(const char *filename, struct stat *sb); +int stat(const char *file, struct stat *sb); +long pathconf(const char *path, int name); +ssize_t readlink(const char *path, char *buf, size_t bufsiz); +int win32_symlink(const char *name1, const char *name2, _dev_t st_rdev); +int link(const char *existing, const char *newfile); #define _PC_PATH_MAX 1 #define _PC_NAME_MAX 2 -DLL_IMP_EXP int geteuid(); +int geteuid(); -DLL_IMP_EXP DIR *opendir(const char *filename); -DLL_IMP_EXP int closedir(DIR *dir); +DIR *opendir(const char *filename); +int closedir(DIR *dir); struct passwd { char *foo; @@ -350,29 +344,29 @@ extern "C" void * __cdecl _alloca(size_t); #define getcwd win32_getcwd #define chdir win32_chdir #define fputs win32_fputs -DLL_IMP_EXP char *win32_getcwd(char *buf, int maxlen); -DLL_IMP_EXP int win32_chdir(const char *buf); -DLL_IMP_EXP int win32_mkdir(const char *buf); -DLL_IMP_EXP int win32_fputs(const char *string, FILE *stream); -DLL_IMP_EXP int win32_unlink(const char *filename); -DLL_IMP_EXP int win32_chmod(const char *, mode_t, _dev_t); +char *win32_getcwd(char *buf, int maxlen); +int win32_chdir(const char *buf); +int win32_mkdir(const char *buf); +int win32_fputs(const char *string, FILE *stream); +int win32_unlink(const char *filename); +int win32_chmod(const char *, mode_t, _dev_t); -DLL_IMP_EXP char* win32_cgets (char* buffer, int len); +char* win32_cgets (char* buffer, int len); -DLL_IMP_EXP int WSA_Init(void); -DLL_IMP_EXP void Win32TSDCleanup(); -DLL_IMP_EXP void Win32ClearCompatible(); -DLL_IMP_EXP void Win32SetCompatible(); -DLL_IMP_EXP bool Win32IsCompatible(); +int WSA_Init(void); +void Win32TSDCleanup(); +void Win32ClearCompatible(); +void Win32SetCompatible(); +bool Win32IsCompatible(); #if defined(HAVE_MINGW) -DLL_IMP_EXP void closelog(); -DLL_IMP_EXP void openlog(const char *ident, int option, int facility); +void closelog(); +void openlog(const char *ident, int option, int facility); #endif //HAVE_MINGW /* Don't let OS go to sleep (usually a Laptop) while we are backing up */ -DLL_IMP_EXP void PreventOsSuspensions(); -DLL_IMP_EXP void AllowOsSuspensions(); +void PreventOsSuspensions(); +void AllowOsSuspensions(); typedef DWORD EXECUTION_STATE; #ifndef ES_CONTINUOUS @@ -411,9 +405,9 @@ inline unsigned long ffs(unsigned long word) #define ffs __builtin_ffs #endif -DLL_IMP_EXP bool win32_get_vmp_devicename(const char *filename, POOLMEM *&device); -DLL_IMP_EXP int win32_ftruncate(int fd, int64_t length); -DLL_IMP_EXP bool win32_restore_file_attributes(POOLMEM *ofname, +bool win32_get_vmp_devicename(const char *filename, POOLMEM *&device); +int win32_ftruncate(int fd, int64_t length); +bool win32_restore_file_attributes(POOLMEM *ofname, HANDLE handle, WIN32_FILE_ATTRIBUTE_DATA *atts); diff --git a/core/src/win32/compat/include/dlfcn.h b/core/src/win32/compat/include/dlfcn.h index 3299f9e49c8..9cfd44a97d3 100644 --- a/core/src/win32/compat/include/dlfcn.h +++ b/core/src/win32/compat/include/dlfcn.h @@ -32,9 +32,9 @@ #define RTLD_GLOBAL 0x00100 /* Export symbols to others */ #define RTLD_LOCAL 0x00000 /* Symbols are only available to group members */ -DLL_IMP_EXP void *dlopen(const char *file, int mode); -DLL_IMP_EXP void *dlsym(void *handle, const char *name); -DLL_IMP_EXP int dlclose(void *handle); -DLL_IMP_EXP char *dlerror(void); +void *dlopen(const char *file, int mode); +void *dlsym(void *handle, const char *name); +int dlclose(void *handle); +char *dlerror(void); #endif /* __DLFCN_H_ */ diff --git a/core/src/win32/compat/include/winhost.h b/core/src/win32/compat/include/winhost.h index f83fa3e5cc8..aa7a0c07af9 100644 --- a/core/src/win32/compat/include/winhost.h +++ b/core/src/win32/compat/include/winhost.h @@ -39,8 +39,8 @@ extern char win_os[]; #else -extern DLL_IMP_EXP char WIN_VERSION_LONG[]; -extern DLL_IMP_EXP char WIN_VERSION[]; +extern char WIN_VERSION_LONG[]; +extern char WIN_VERSION[]; #define HOST_OS WIN_VERSION_LONG #define DISTNAME "MVS" diff --git a/core/src/win32/findlib/win32.h b/core/src/win32/findlib/win32.h index 72868c5d53a..9687bb9a8b5 100644 --- a/core/src/win32/findlib/win32.h +++ b/core/src/win32/findlib/win32.h @@ -23,12 +23,12 @@ #define BAREOS_WIN32_FINDLIB_WIN32_H_ -DLL_IMP_EXP bool expand_win32_fileset(findFILESET *fileset); -DLL_IMP_EXP bool exclude_win32_not_to_backup_registry_entries(JobControlRecord *jcr, FindFilesPacket *ff); -DLL_IMP_EXP int get_win32_driveletters(findFILESET *fileset, char *szDrives); -DLL_IMP_EXP bool win32_onefs_is_disabled(findFILESET *fileset); -DLL_IMP_EXP void win32_cleanup_copy_thread(JobControlRecord *jcr); -DLL_IMP_EXP void win32_flush_copy_thread(JobControlRecord *jcr); -DLL_IMP_EXP int win32_send_to_copy_thread(JobControlRecord *jcr, BareosWinFilePacket *bfd, char *data, const int32_t length); +bool expand_win32_fileset(findFILESET *fileset); +bool exclude_win32_not_to_backup_registry_entries(JobControlRecord *jcr, FindFilesPacket *ff); +int get_win32_driveletters(findFILESET *fileset, char *szDrives); +bool win32_onefs_is_disabled(findFILESET *fileset); +void win32_cleanup_copy_thread(JobControlRecord *jcr); +void win32_flush_copy_thread(JobControlRecord *jcr); +int win32_send_to_copy_thread(JobControlRecord *jcr, BareosWinFilePacket *bfd, char *data, const int32_t length); #endif // BAREOS_WIN32_FINDLIB_WIN32_H_ diff --git a/core/src/win32/generic/main.cc b/core/src/win32/generic/main.cc index c2c0f64157a..f5e3a769bd3 100644 --- a/core/src/win32/generic/main.cc +++ b/core/src/win32/generic/main.cc @@ -61,7 +61,7 @@ bool have_service_api; DWORD service_thread_id = 0; char win_os[300]; -DLL_IMP_EXP bool GetWindowsVersionString(LPTSTR osbuf, int maxsiz); +bool GetWindowsVersionString(LPTSTR osbuf, int maxsiz); #define MAX_COMMAND_ARGS 100 @@ -79,7 +79,7 @@ const char usage[] = APP_NAME "[/debug] [/service] [/run] [/kill] [/install] [/r * We parse the command line and either calls the main App * or starts up the service. */ -DLL_IMP_EXP int WINAPI WinMain(HINSTANCE Instance, HINSTANCE /*PrevInstance*/, PSTR CmdLine, +int WINAPI WinMain(HINSTANCE Instance, HINSTANCE /*PrevInstance*/, PSTR CmdLine, int /*show*/) { char *cmdLine = CmdLine; diff --git a/core/src/win32/generic/protos.h b/core/src/win32/generic/protos.h index 302a414609d..a1535927862 100644 --- a/core/src/win32/generic/protos.h +++ b/core/src/win32/generic/protos.h @@ -24,25 +24,25 @@ #define LogErrorMessage(msg) LogLastErrorMsg((msg), __FILE__, __LINE__) -DLL_IMP_EXP extern int BareosAppMain(); -DLL_IMP_EXP extern void LogLastErrorMsg(const char *msg, const char *fname, int lineno); -DLL_IMP_EXP extern int BareosMain(int argc, char *argv[]); -DLL_IMP_EXP extern BOOL ReportStatus(DWORD state, DWORD exitcode, DWORD waithint); -DLL_IMP_EXP extern void d_msg(const char *, int, int, const char *, ...); -DLL_IMP_EXP extern char *bareos_status(char *buf, int buf_len); +extern int BareosAppMain(); +extern void LogLastErrorMsg(const char *msg, const char *fname, int lineno); +extern int BareosMain(int argc, char *argv[]); +extern BOOL ReportStatus(DWORD state, DWORD exitcode, DWORD waithint); +extern void d_msg(const char *, int, int, const char *, ...); +extern char *bareos_status(char *buf, int buf_len); /* service.cpp */ -DLL_IMP_EXP bool postToBareos(UINT message, WPARAM wParam, LPARAM lParam); -DLL_IMP_EXP bool isAService(); -DLL_IMP_EXP int installService(const char *svc); -DLL_IMP_EXP int removeService(); -DLL_IMP_EXP int stopRunningBareos(); -DLL_IMP_EXP int bareosServiceMain(); +bool postToBareos(UINT message, WPARAM wParam, LPARAM lParam); +bool isAService(); +int installService(const char *svc); +int removeService(); +int stopRunningBareos(); +int bareosServiceMain(); /* Globals */ -DLL_IMP_EXP extern DWORD service_thread_id; -DLL_IMP_EXP extern DWORD service_error; -DLL_IMP_EXP extern bool opt_debug; -DLL_IMP_EXP extern bool have_service_api; -DLL_IMP_EXP extern HINSTANCE appInstance; -DLL_IMP_EXP extern int bareosstat; +extern DWORD service_thread_id; +extern DWORD service_error; +extern bool opt_debug; +extern bool have_service_api; +extern HINSTANCE appInstance; +extern int bareosstat; diff --git a/core/src/win32/include/winapi.h b/core/src/win32/include/winapi.h index 69038cf4471..563ee182791 100644 --- a/core/src/win32/include/winapi.h +++ b/core/src/win32/include/winapi.h @@ -62,17 +62,17 @@ typedef char POOLMEM; // "\\?\" to the path. For more information, see Naming a File. #define MAX_PATH_W 32767 -DLL_IMP_EXP int wchar_2_UTF8(POOLMEM *&pszUTF, const wchar_t *pszUCS); -DLL_IMP_EXP int UTF8_2_wchar(POOLMEM *&pszUCS, const char *pszUTF); -DLL_IMP_EXP int wchar_2_UTF8(char *pszUTF, const wchar_t *pszUCS, int cchChar); -DLL_IMP_EXP BSTR str_2_BSTR(const char *pSrc); -DLL_IMP_EXP char *BSTR_2_str(const BSTR pSrc); -DLL_IMP_EXP DLL_IMP_EXP int make_win32_path_UTF8_2_wchar(POOLMEM *&pszUCS, const char *pszUTF, BOOL* pBIsRawPath = NULL); +int wchar_2_UTF8(POOLMEM *&pszUTF, const wchar_t *pszUCS); +int UTF8_2_wchar(POOLMEM *&pszUCS, const char *pszUTF); +int wchar_2_UTF8(char *pszUTF, const wchar_t *pszUCS, int cchChar); +BSTR str_2_BSTR(const char *pSrc); +char *BSTR_2_str(const BSTR pSrc); +int make_win32_path_UTF8_2_wchar(POOLMEM *&pszUCS, const char *pszUTF, BOOL* pBIsRawPath = NULL); // init with win9x, but maybe set to NT in InitWinAPI -extern DWORD DLL_IMP_EXP g_platform_id; -extern DWORD DLL_IMP_EXP g_MinorVersion; -extern DWORD DLL_IMP_EXP g_MajorVersion; +extern DWORD g_platform_id; +extern DWORD g_MinorVersion; +extern DWORD g_MajorVersion; /* In ADVAPI32.DLL */ typedef BOOL (WINAPI * t_OpenProcessToken)(HANDLE, DWORD, PHANDLE); @@ -80,17 +80,17 @@ typedef BOOL (WINAPI * t_AdjustTokenPrivileges)(HANDLE, BOOL, PTOKEN_PRIVILEGES, DWORD, PTOKEN_PRIVILEGES, PDWORD); typedef BOOL (WINAPI * t_LookupPrivilegeValue)(LPCTSTR, LPCTSTR, PLUID); -extern t_OpenProcessToken DLL_IMP_EXP p_OpenProcessToken; -extern t_AdjustTokenPrivileges DLL_IMP_EXP p_AdjustTokenPrivileges; -extern t_LookupPrivilegeValue DLL_IMP_EXP p_LookupPrivilegeValue; +extern t_OpenProcessToken p_OpenProcessToken; +extern t_AdjustTokenPrivileges p_AdjustTokenPrivileges; +extern t_LookupPrivilegeValue p_LookupPrivilegeValue; /* In MSVCRT.DLL */ typedef int (__cdecl * t_wunlink) (const wchar_t *); typedef int (__cdecl * t_wmkdir) (const wchar_t *); typedef int (__cdecl * t_wopen) (const wchar_t *, int, ...); -extern t_wunlink DLL_IMP_EXP p_wunlink; -extern t_wmkdir DLL_IMP_EXP p_wmkdir; +extern t_wunlink p_wunlink; +extern t_wmkdir p_wmkdir; /* In KERNEL32.DLL */ typedef BOOL (WINAPI * t_GetFileAttributesExA)(LPCSTR, GET_FILEEX_INFO_LEVELS, LPVOID); @@ -152,78 +152,78 @@ typedef BOOL (WINAPI *t_CreateProcessA) (LPCSTR, LPSTR, LPSECURITY_ATTRIBUTES, L typedef BOOL (WINAPI *t_CreateProcessW) (LPCWSTR, LPWSTR, LPSECURITY_ATTRIBUTES, LPSECURITY_ATTRIBUTES, BOOL, DWORD, PVOID, LPCWSTR, LPSTARTUPINFOW, LPPROCESS_INFORMATION); -extern t_CreateProcessA DLL_IMP_EXP p_CreateProcessA; -extern t_CreateProcessW DLL_IMP_EXP p_CreateProcessW; +extern t_CreateProcessA p_CreateProcessA; +extern t_CreateProcessW p_CreateProcessW; #if (_WIN32_WINNT >= 0x0600) -extern t_GetFileInformationByHandleEx DLL_IMP_EXP p_GetFileInformationByHandleEx; +extern t_GetFileInformationByHandleEx p_GetFileInformationByHandleEx; #endif -extern t_GetFileAttributesA DLL_IMP_EXP p_GetFileAttributesA; -extern t_GetFileAttributesW DLL_IMP_EXP p_GetFileAttributesW; +extern t_GetFileAttributesA p_GetFileAttributesA; +extern t_GetFileAttributesW p_GetFileAttributesW; -extern t_GetFileAttributesExA DLL_IMP_EXP p_GetFileAttributesExA; -extern t_GetFileAttributesExW DLL_IMP_EXP p_GetFileAttributesExW; +extern t_GetFileAttributesExA p_GetFileAttributesExA; +extern t_GetFileAttributesExW p_GetFileAttributesExW; -extern t_SetFileAttributesA DLL_IMP_EXP p_SetFileAttributesA; -extern t_SetFileAttributesW DLL_IMP_EXP p_SetFileAttributesW; +extern t_SetFileAttributesA p_SetFileAttributesA; +extern t_SetFileAttributesW p_SetFileAttributesW; -extern t_CreateFileA DLL_IMP_EXP p_CreateFileA; -extern t_CreateFileW DLL_IMP_EXP p_CreateFileW; +extern t_CreateFileA p_CreateFileA; +extern t_CreateFileW p_CreateFileW; -extern t_CreateDirectoryA DLL_IMP_EXP p_CreateDirectoryA; -extern t_CreateDirectoryW DLL_IMP_EXP p_CreateDirectoryW; +extern t_CreateDirectoryA p_CreateDirectoryA; +extern t_CreateDirectoryW p_CreateDirectoryW; -extern t_CreateSymbolicLinkA DLL_IMP_EXP p_CreateSymbolicLinkA; -extern t_CreateSymbolicLinkW DLL_IMP_EXP p_CreateSymbolicLinkW; +extern t_CreateSymbolicLinkA p_CreateSymbolicLinkA; +extern t_CreateSymbolicLinkW p_CreateSymbolicLinkW; -extern t_OpenEncryptedFileRawA DLL_IMP_EXP p_OpenEncryptedFileRawA; -extern t_OpenEncryptedFileRawW DLL_IMP_EXP p_OpenEncryptedFileRawW; -extern t_ReadEncryptedFileRaw DLL_IMP_EXP p_ReadEncryptedFileRaw; -extern t_WriteEncryptedFileRaw DLL_IMP_EXP p_WriteEncryptedFileRaw; -extern t_CloseEncryptedFileRaw DLL_IMP_EXP p_CloseEncryptedFileRaw; +extern t_OpenEncryptedFileRawA p_OpenEncryptedFileRawA; +extern t_OpenEncryptedFileRawW p_OpenEncryptedFileRawW; +extern t_ReadEncryptedFileRaw p_ReadEncryptedFileRaw; +extern t_WriteEncryptedFileRaw p_WriteEncryptedFileRaw; +extern t_CloseEncryptedFileRaw p_CloseEncryptedFileRaw; -extern t_BackupRead DLL_IMP_EXP p_BackupRead; -extern t_BackupWrite DLL_IMP_EXP p_BackupWrite; +extern t_BackupRead p_BackupRead; +extern t_BackupWrite p_BackupWrite; -extern t_SetProcessShutdownParameters DLL_IMP_EXP p_SetProcessShutdownParameters; +extern t_SetProcessShutdownParameters p_SetProcessShutdownParameters; -extern t_WideCharToMultiByte DLL_IMP_EXP p_WideCharToMultiByte; -extern t_MultiByteToWideChar DLL_IMP_EXP p_MultiByteToWideChar; +extern t_WideCharToMultiByte p_WideCharToMultiByte; +extern t_MultiByteToWideChar p_MultiByteToWideChar; -extern t_FindFirstFileA DLL_IMP_EXP p_FindFirstFileA; -extern t_FindFirstFileW DLL_IMP_EXP p_FindFirstFileW; +extern t_FindFirstFileA p_FindFirstFileA; +extern t_FindFirstFileW p_FindFirstFileW; -extern t_FindNextFileA DLL_IMP_EXP p_FindNextFileA; -extern t_FindNextFileW DLL_IMP_EXP p_FindNextFileW; +extern t_FindNextFileA p_FindNextFileA; +extern t_FindNextFileW p_FindNextFileW; -extern t_SetCurrentDirectoryA DLL_IMP_EXP p_SetCurrentDirectoryA; -extern t_SetCurrentDirectoryW DLL_IMP_EXP p_SetCurrentDirectoryW; +extern t_SetCurrentDirectoryA p_SetCurrentDirectoryA; +extern t_SetCurrentDirectoryW p_SetCurrentDirectoryW; -extern t_GetCurrentDirectoryA DLL_IMP_EXP p_GetCurrentDirectoryA; -extern t_GetCurrentDirectoryW DLL_IMP_EXP p_GetCurrentDirectoryW; +extern t_GetCurrentDirectoryA p_GetCurrentDirectoryA; +extern t_GetCurrentDirectoryW p_GetCurrentDirectoryW; -extern t_GetVolumePathNameW DLL_IMP_EXP p_GetVolumePathNameW; -extern t_GetVolumeNameForVolumeMountPointW DLL_IMP_EXP p_GetVolumeNameForVolumeMountPointW; +extern t_GetVolumePathNameW p_GetVolumePathNameW; +extern t_GetVolumeNameForVolumeMountPointW p_GetVolumeNameForVolumeMountPointW; -extern t_GetLogicalDriveStringsA DLL_IMP_EXP p_GetLogicalDriveStringsA; -extern t_GetLogicalDriveStringsW DLL_IMP_EXP p_GetLogicalDriveStringsW; +extern t_GetLogicalDriveStringsA p_GetLogicalDriveStringsA; +extern t_GetLogicalDriveStringsW p_GetLogicalDriveStringsW; -extern t_AttachConsole DLL_IMP_EXP p_AttachConsole; +extern t_AttachConsole p_AttachConsole; -DLL_IMP_EXP void InitWinAPIWrapper(); +void InitWinAPIWrapper(); /* * In SHFOLDER.DLL on older systems, and now SHELL32.DLL */ typedef BOOL (WINAPI * t_SHGetFolderPath)(HWND, int, HANDLE, DWORD, LPTSTR); -extern t_SHGetFolderPath DLL_IMP_EXP p_SHGetFolderPath; +extern t_SHGetFolderPath p_SHGetFolderPath; /* * In WS2_32.DLL */ typedef INT (WSAAPI * t_InetPton)(INT Family, PCTSTR pszAddrString, PVOID pAddrBuf); -extern t_InetPton DLL_IMP_EXP p_InetPton; +extern t_InetPton p_InetPton; #endif #endif /* __WINAPI_H */ diff --git a/core/src/win32/plugins/filed/mssqlvdi-fd.cc b/core/src/win32/plugins/filed/mssqlvdi-fd.cc index 30cf9249dc3..3eb92141386 100644 --- a/core/src/win32/plugins/filed/mssqlvdi-fd.cc +++ b/core/src/win32/plugins/filed/mssqlvdi-fd.cc @@ -233,7 +233,7 @@ extern "C" { * * External entry point called by Bareos to "load" the plugin */ -bRC DLL_IMP_EXP loadPlugin(bInfo *lbinfo, +bRC loadPlugin(bInfo *lbinfo, bFuncs *lbfuncs, genpInfo **pinfo, pFuncs **pfuncs) @@ -249,7 +249,7 @@ bRC DLL_IMP_EXP loadPlugin(bInfo *lbinfo, /** * External entry point to unload the plugin */ -bRC DLL_IMP_EXP unloadPlugin() +bRC unloadPlugin() { return bRC_OK; }