From 1d5ecd7a77278ed04a929a576a420bca74bed0a1 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Wed, 26 Apr 2006 05:20:17 +0000 Subject: [PATCH] Implement cross compiled bconsole git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2971 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/kes-1.39 | 2 ++ bacula/src/console/console.c | 5 +---- bacula/src/filed/filed.c | 10 +--------- bacula/src/filed/filed.h | 2 +- bacula/src/lib/Makefile.in | 4 ++-- bacula/src/lib/attr.c | 4 ++-- bacula/src/lib/bget_msg.c | 6 +++--- bacula/src/lib/message.c | 3 ++- bacula/src/lib/winapi.c | 7 +++++++ bacula/src/version.h | 4 ++-- 10 files changed, 23 insertions(+), 24 deletions(-) diff --git a/bacula/kes-1.39 b/bacula/kes-1.39 index 9b7b094c83..b8a864255f 100644 --- a/bacula/kes-1.39 +++ b/bacula/kes-1.39 @@ -2,6 +2,8 @@ Kern Sibbald General: +26Apr06 +- Implement cross compiled bconsole 25Apr06 - Fix barcode test, eliminate BOOL (doesn't exist on Linux). - Write first cut of README.mingw32 diff --git a/bacula/src/console/console.c b/bacula/src/console/console.c index 7611e9008e..9f20f6de0a 100644 --- a/bacula/src/console/console.c +++ b/bacula/src/console/console.c @@ -7,7 +7,7 @@ * Version $Id$ */ /* - Copyright (C) 2000-2005 Kern Sibbald + Copyright (C) 2000-2006 Kern Sibbald This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -53,9 +53,6 @@ extern int rl_catch_signals; /* Imported functions */ int authenticate_director(JCR *jcr, DIRRES *director, CONRES *cons); -/* Dummy functions */ -int generate_daemon_event(JCR *jcr, const char *event) { return 1; } - /* Forward referenced functions */ static void terminate_console(int sig); static int check_resources(); diff --git a/bacula/src/filed/filed.c b/bacula/src/filed/filed.c index f274444fe6..ae021bbf2c 100644 --- a/bacula/src/filed/filed.c +++ b/bacula/src/filed/filed.c @@ -7,7 +7,7 @@ * */ /* - Copyright (C) 2000-2005 Kern Sibbald + Copyright (C) 2000-2006 Kern Sibbald This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -36,16 +36,8 @@ static int check_resources(); /* Exported variables */ CLIENT *me; /* my resource */ -char OK_msg[] = "2000 OK\n"; -char TERM_msg[] = "2999 Terminate\n"; bool no_signals = false; -#if defined(HAVE_CYGWIN) || defined(HAVE_WIN32) -const int win32_client = 1; -#else -const int win32_client = 0; -#endif - #define CONFIG_FILE "./bacula-fd.conf" /* default config file */ diff --git a/bacula/src/filed/filed.h b/bacula/src/filed/filed.h index cfe3e56dec..906aab7c6c 100644 --- a/bacula/src/filed/filed.h +++ b/bacula/src/filed/filed.h @@ -32,6 +32,6 @@ #define uLongf uint32_t #endif -extern const int win32_client; /* Are we running on Windows? */ +extern int win32_client; /* Are we running on Windows? */ extern CLIENT *me; /* "Global" Client resource */ diff --git a/bacula/src/lib/Makefile.in b/bacula/src/lib/Makefile.in index 1256c46f86..b7693cfc3b 100644 --- a/bacula/src/lib/Makefile.in +++ b/bacula/src/lib/Makefile.in @@ -32,7 +32,7 @@ LIBSRCS = alloc.c attr.c base64.c berrno.c bsys.c bget_msg.c \ res.c rwlock.c scan.c serial.c sha1.c \ semlock.c signal.c smartall.c tls.c tree.c \ util.c var.c watchdog.c workq.c btimers.c \ - address_conf.c pythonlib.c + address_conf.c pythonlib.c winapi.c LIBOBJS = alloc.o attr.o base64.o berrno.o bsys.o bget_msg.o \ @@ -45,7 +45,7 @@ LIBOBJS = alloc.o attr.o base64.o berrno.o bsys.o bget_msg.o \ res.o rwlock.o scan.o serial.o sha1.o \ semlock.o signal.o smartall.o tls.o tree.o \ util.o var.o watchdog.o workq.o btimers.o \ - address_conf.o pythonlib.o + address_conf.o pythonlib.o winapi.o EXTRAOBJS = @OBJLIST@ diff --git a/bacula/src/lib/attr.c b/bacula/src/lib/attr.c index 1b56f86618..c041f5fd56 100644 --- a/bacula/src/lib/attr.c +++ b/bacula/src/lib/attr.c @@ -6,7 +6,7 @@ * Version $Id$ */ /* - Copyright (C) 2003-2005 Kern Sibbald + Copyright (C) 2003-2006 Kern Sibbald This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -23,7 +23,7 @@ #include "bacula.h" #include "jcr.h" -extern const int win32_client; +extern int win32_client; ATTR *new_attr() { diff --git a/bacula/src/lib/bget_msg.c b/bacula/src/lib/bget_msg.c index 912aa5786b..9a5005b4fb 100644 --- a/bacula/src/lib/bget_msg.c +++ b/bacula/src/lib/bget_msg.c @@ -8,7 +8,7 @@ * */ /* - Copyright (C) 2001-2005 Kern Sibbald + Copyright (C) 2001-2006 Kern Sibbald This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -24,8 +24,8 @@ #include "bacula.h" /* pull in global headers */ -extern char OK_msg[]; -extern char TERM_msg[]; +static char OK_msg[] = "2000 OK\n"; +static char TERM_msg[] = "2999 Terminate\n"; #define msglvl 500 diff --git a/bacula/src/lib/message.c b/bacula/src/lib/message.c index 724015463e..a394f0dac5 100755 --- a/bacula/src/lib/message.c +++ b/bacula/src/lib/message.c @@ -7,7 +7,7 @@ * */ /* - Copyright (C) 2000-2005 Kern Sibbald + Copyright (C) 2000-2006 Kern Sibbald This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -51,6 +51,7 @@ char con_fname[500]; /* Console filename */ FILE *con_fd = NULL; /* Console file descriptor */ brwlock_t con_lock; /* Console lock structure */ + #ifdef HAVE_POSTGRESQL char catalog_db[] = "PostgreSQL"; #else diff --git a/bacula/src/lib/winapi.c b/bacula/src/lib/winapi.c index d8f8bbc420..5f649edcc4 100644 --- a/bacula/src/lib/winapi.c +++ b/bacula/src/lib/winapi.c @@ -26,6 +26,8 @@ #include "winapi.h" +int win32_client = 1; + #ifdef WIN32_VSS #include "vss.h" #endif @@ -244,4 +246,9 @@ InitWinAPIWrapper() #endif /* WIN32_VSS */ } +#else + +/* Not Windows */ +int win32_client = 0; + #endif diff --git a/bacula/src/version.h b/bacula/src/version.h index 77fa477a42..e0810e5c87 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -4,8 +4,8 @@ #undef VERSION #define VERSION "1.39.10" -#define BDATE "25 April 2006" -#define LSMDATE "25Apr06" +#define BDATE "26 April 2006" +#define LSMDATE "26Apr06" /* Debug flags */ #undef DEBUG -- 2.39.5