From 05357d16df8a0a5e79702f2686bc867febd48d12 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Wed, 27 Aug 2008 21:11:04 +0000 Subject: [PATCH] kes Apply most of changes in a patch from: Michael Stapelberg that allow the Bacula FD to compile on IRIX 6.5. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7513 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/bacula.h | 2 ++ bacula/src/console/authenticate.c | 4 ++-- bacula/src/console/conio.c | 5 +++++ bacula/src/findlib/attribs.c | 2 ++ bacula/src/lib/rblist.h | 19 ++++++++++--------- bacula/src/lib/smartall.h | 12 ++++-------- bacula/technotes-2.5 | 4 ++++ 7 files changed, 29 insertions(+), 19 deletions(-) diff --git a/bacula/src/bacula.h b/bacula/src/bacula.h index e54f653c85..0104a6eae1 100644 --- a/bacula/src/bacula.h +++ b/bacula/src/bacula.h @@ -58,8 +58,10 @@ /* System includes */ #if HAVE_STDINT_H +#ifndef __sgi #include #endif +#endif #if HAVE_STDARG_H #include #endif diff --git a/bacula/src/console/authenticate.c b/bacula/src/console/authenticate.c index cd10b99f0a..2297943b98 100644 --- a/bacula/src/console/authenticate.c +++ b/bacula/src/console/authenticate.c @@ -47,10 +47,10 @@ void senditf(const char *fmt, ...); void sendit(const char *buf); /* Commands sent to Director */ -static char hello[] = N_("Hello %s calling\n"); +static char hello[] = "Hello %s calling\n"; /* Response from Director */ -static char OKhello[] = N_("1000 OK:"); +static char OKhello[] = "1000 OK:"; /* Forward referenced functions */ diff --git a/bacula/src/console/conio.c b/bacula/src/console/conio.c index 33ff8f77fa..cf695716d3 100755 --- a/bacula/src/console/conio.c +++ b/bacula/src/console/conio.c @@ -72,6 +72,11 @@ extern "C" char *tgoto (const char *, int, int); #elif HAVE_AIX_OS #include #include +#elif defined(__sgi) +extern "C" int tgetent(char *, char *); +extern "C" int tgetnum(char id[2]); +extern "C" char *tgetstr(char id[2], char **); +extern "C" char *tgoto(char *, int, int); #elif defined (__digital__) && defined (__unix__) extern "C" int tgetent(void *, const char *); extern "C" int tgetnum(const char *); diff --git a/bacula/src/findlib/attribs.c b/bacula/src/findlib/attribs.c index ecef708b18..9b51d1a903 100644 --- a/bacula/src/findlib/attribs.c +++ b/bacula/src/findlib/attribs.c @@ -226,6 +226,8 @@ void encode_stat(char *buf, FF_PKT *ff_pkt, int data_stream) #if !HAVE_GCC & HAVE_SUN_OS /* Sun compiler does not handle templates correctly */ #define plug(st, val) st = val + #elif __sgi + #define plug(st, val) st = val #else /* Use templates to do the casting */ template void plug(T &st, uint64_t val) diff --git a/bacula/src/lib/rblist.h b/bacula/src/lib/rblist.h index 940cd9fe9b..b44b64e313 100644 --- a/bacula/src/lib/rblist.h +++ b/bacula/src/lib/rblist.h @@ -93,15 +93,6 @@ public: void destroy(void); }; -inline rblist::rblist(void *item, rblink *link) -{ - init(item, link); -} - -/* Constructor with link at head of item */ -inline rblist::rblist(void): head(0), loffset(0), num_items(0) -{ -} /* * This allows us to do explicit initialization, @@ -118,6 +109,16 @@ inline void rblist::init(void *item, rblink *link) num_items = 0; } +inline rblist::rblist(void *item, rblink *link) +{ + init(item, link); +} + +/* Constructor with link at head of item */ +inline rblist::rblist(void): head(0), loffset(0), num_items(0) +{ +} + inline void rblist::set_parent(void *item, void *parent) { ((rblink *)(((char *)item)+loffset))->parent = parent; diff --git a/bacula/src/lib/smartall.h b/bacula/src/lib/smartall.h index 4041d5fda3..734b910090 100644 --- a/bacula/src/lib/smartall.h +++ b/bacula/src/lib/smartall.h @@ -20,7 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - Bacula® is a registered trademark ofJohn Walker. + Bacula® is a registered trademark of Kern Sibbald. The licensor of Bacula is the Free Software Foundation Europe (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich, Switzerland, email:ftf@fsfeurope.org. @@ -99,7 +99,6 @@ extern void *b_malloc(); #endif #ifdef SMARTALLOC -// #ifdef xxx #define New(type) new(__FILE__, __LINE__) type @@ -121,20 +120,17 @@ void operator delete(void *ptr) { free(ptr); } -void operator delete[](void *ptr, size_t i) +void operator delete[](void *ptr, size_t /*i*/) { - (void)i; /* eliminate compiler complaints */ free(ptr); } -void operator delete(void *ptr, const char *fname, int line) +void operator delete(void *ptr, const char * /*fname*/, int /*line*/) { - (void)fname; (void)line; /* eliminate compiler complaints */ free(ptr); } -void operator delete[](void *ptr, size_t i, const char *fname, int line) +void operator delete[](void *ptr, size_t /*i*/, const char * /*fname*/, int /*line*/) { - (void)i; (void)fname; (void)line; /* eliminate compiler complaints */ free(ptr); } diff --git a/bacula/technotes-2.5 b/bacula/technotes-2.5 index 21cb952256..35b0f93fef 100644 --- a/bacula/technotes-2.5 +++ b/bacula/technotes-2.5 @@ -32,6 +32,10 @@ separator in console (!$%&'()*+,-/:;<>?[]^`{|}~) General: +27Aug08 +kes Apply most of changes in a patch from: + Michael Stapelberg + that allow the Bacula FD to compile on IRIX 6.5. 26Aug08 kes Apply patch from Bastian Friedrich that accepts a yes on a delete volume command line. -- 2.39.5