From: Eric Bollengier Date: Wed, 12 Nov 2008 09:58:33 +0000 (+0000) Subject: ebl Apply Riccardo's patch that fix some win32 compilation errors X-Git-Tag: Release-7.0.0~3740 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b5bfc199f7c508f8ac3205532e049b40a5e160af;p=bacula%2Fbacula ebl Apply Riccardo's patch that fix some win32 compilation errors and a bug with bat version browser. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8037 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/dird/inc_conf.c b/bacula/src/dird/inc_conf.c index 7fa7399357..c8a7dfa2a4 100644 --- a/bacula/src/dird/inc_conf.c +++ b/bacula/src/dird/inc_conf.c @@ -75,7 +75,7 @@ extern "C" { // work around visual compiler mangling variables #else extern URES res_all; #endif -extern int res_all_size; +extern int32_t res_all_size; /* We build the current new Include and Exclude items here */ static INCEXE res_incexe; diff --git a/bacula/src/findlib/find.h b/bacula/src/findlib/find.h index 895ecbf46b..86568bda08 100644 --- a/bacula/src/findlib/find.h +++ b/bacula/src/findlib/find.h @@ -44,7 +44,9 @@ #endif #include +#if !defined(HAVE_WIN32) || defined(HAVE_MINGW) #include +#endif #if HAVE_UTIME_H #include #else diff --git a/bacula/src/jcr.h b/bacula/src/jcr.h index 1339948812..a07b6dc429 100644 --- a/bacula/src/jcr.h +++ b/bacula/src/jcr.h @@ -468,6 +468,6 @@ extern void free_jcr(JCR *jcr); /* Used to display specific job information after a fatal signal */ typedef void (dbg_jcr_hook_t)(JCR *jcr, FILE *fp); -void dbg_jcr_add_hook(dbg_jcr_hook_t *fct); +extern void dbg_jcr_add_hook(dbg_jcr_hook_t *fct); #endif /* __JCR_H_ */ diff --git a/bacula/src/qt-console/bat.h b/bacula/src/qt-console/bat.h index afa423c75b..3a8182be21 100644 --- a/bacula/src/qt-console/bat.h +++ b/bacula/src/qt-console/bat.h @@ -53,7 +53,6 @@ extern MainWin *mainWin; extern QApplication *app; -int bvsnprintf(char *str, int32_t size, const char *format, va_list ap); bool isWin32Path(QString &fullPath); #endif /* _BAT_H_ */ diff --git a/bacula/src/qt-console/bat_conf.cpp b/bacula/src/qt-console/bat_conf.cpp index 407b1fee83..13a4725049 100644 --- a/bacula/src/qt-console/bat_conf.cpp +++ b/bacula/src/qt-console/bat_conf.cpp @@ -69,11 +69,10 @@ RES **res_head = sres_head; * then move it to allocated memory when the resource * scan is complete. */ -#if defined(MSC_VER) -extern "C" URES res_all; /* visual c mangles variable names */ -#else -URES res_all; +#if defined(_MSC_VER) +extern "C" URES res_all; /* declare as C to avoid name mangling by visual c */ #endif +URES res_all; int32_t res_all_size = sizeof(res_all); /* Definition of records permitted within each diff --git a/bacula/src/qt-console/pages.cpp b/bacula/src/qt-console/pages.cpp index 7325e5092d..4dbe17f121 100644 --- a/bacula/src/qt-console/pages.cpp +++ b/bacula/src/qt-console/pages.cpp @@ -37,10 +37,11 @@ /* A global function */ bool isWin32Path(QString &fullPath) { - char *buf = fullPath.left(2).toUtf8().data(); + if (fullPath.size()<2) { + return false; + } - //bool toret = B_ISALPHA(buf[1]); - bool toret = buf[1] == ':' && B_ISALPHA(buf[0]); + bool toret = fullPath[1].toAscii() == ':' && fullPath[0].isLetter(); if (mainWin->m_miscDebug) { if (toret) Pmsg1(000, "returning from isWin32Path true %s\n", fullPath.toUtf8().data()); diff --git a/bacula/technotes-2.5 b/bacula/technotes-2.5 index 78777a790a..f2f5760b34 100644 --- a/bacula/technotes-2.5 +++ b/bacula/technotes-2.5 @@ -10,6 +10,9 @@ filepattern (restore with regex in bsr) mixed priorities General: +12Nov08 +ebl Apply Riccardo's patch that fix some win32 compilation errors + and a bug with bat version browser. 11Nov08 ebl Add Plugin debug after a fatal signal. ebl Add db and rwlock debug after a fatal signal.