From dfdd89757a3570099e34deafff860dc38cde52fc Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Thu, 3 Jul 2008 10:06:43 +0000 Subject: [PATCH] kes Remove const char that causes problems with Python, which has older 'incorrect' headers. kes Add const char in dbd.c to avoid compiler warnings. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/branches/Branch-2.4@7295 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/cats/bdb.c | 30 +++++++++++++++--------------- bacula/src/dird/pythondir.c | 2 +- bacula/src/filed/pythonfd.c | 2 +- bacula/src/stored/pythonsd.c | 22 +++++++++++----------- bacula/technotes-2.4 | 4 ++++ 5 files changed, 32 insertions(+), 28 deletions(-) diff --git a/bacula/src/cats/bdb.c b/bacula/src/cats/bdb.c index d9862abab1..ad92c76e33 100644 --- a/bacula/src/cats/bdb.c +++ b/bacula/src/cats/bdb.c @@ -1,20 +1,7 @@ -/* - * Bacula Catalog Database routines written specifically - * for Bacula. Note, these routines are VERY dumb and - * do not provide all the functionality of an SQL database. - * The purpose of these routines is to ensure that Bacula - * can limp along if no real database is loaded on the - * system. - * - * Kern Sibbald, January MMI - * - * Version $Id$ - * - */ /* Bacula® - The Network Backup Solution - Copyright (C) 2000-2006 Free Software Foundation Europe e.V. + Copyright (C) 2000-2008 Free Software Foundation Europe e.V. The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -38,6 +25,19 @@ (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich, Switzerland, email:ftf@fsfeurope.org. */ +/* + * Bacula Catalog Database routines written specifically + * for Bacula. Note, these routines are VERY dumb and + * do not provide all the functionality of an SQL database. + * The purpose of these routines is to ensure that Bacula + * can limp along if no real database is loaded on the + * system. + * + * Kern Sibbald, January MMI + * + * Version $Id$ + * + */ /* The following is necessary so that we do not include @@ -86,7 +86,7 @@ dbid_list::~dbid_list() free(DBId); } -static POOLMEM *make_filename(B_DB *mdb, char *name) +static POOLMEM *make_filename(B_DB *mdb, const char *name) { char sep; POOLMEM *dbf; diff --git a/bacula/src/dird/pythondir.c b/bacula/src/dird/pythondir.c index 60a2fe2503..c17606e2f4 100644 --- a/bacula/src/dird/pythondir.c +++ b/bacula/src/dird/pythondir.c @@ -67,7 +67,7 @@ PyMethodDef JobMethods[] = { struct s_vars { const char *name; - const char *fmt; + char *fmt; }; /* Read-only variables */ diff --git a/bacula/src/filed/pythonfd.c b/bacula/src/filed/pythonfd.c index be6f185dd5..130f494e11 100644 --- a/bacula/src/filed/pythonfd.c +++ b/bacula/src/filed/pythonfd.c @@ -72,7 +72,7 @@ ssize_t my_python_read(BFILE *bfd, void *buf, size_t count); struct s_vars { const char *name; - const char *fmt; + char *fmt; }; /* Read-only variables */ diff --git a/bacula/src/stored/pythonsd.c b/bacula/src/stored/pythonsd.c index 1db1aa5423..52568c2222 100644 --- a/bacula/src/stored/pythonsd.c +++ b/bacula/src/stored/pythonsd.c @@ -1,16 +1,7 @@ -/* - * - * Bacula interface to Python for the Storage Daemon - * - * Kern Sibbald, January MMV - * - * Version $Id$ - * - */ /* Bacula® - The Network Backup Solution - Copyright (C) 2005-2006 Free Software Foundation Europe e.V. + Copyright (C) 2005-2008 Free Software Foundation Europe e.V. The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -34,6 +25,15 @@ (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich, Switzerland, email:ftf@fsfeurope.org. */ +/* + * + * Bacula interface to Python for the Storage Daemon + * + * Kern Sibbald, January MMV + * + * Version $Id$ + * + */ #include "bacula.h" @@ -59,7 +59,7 @@ PyMethodDef JobMethods[] = { struct s_vars { const char *name; - const char *fmt; + char *fmt; }; static struct s_vars getvars[] = { diff --git a/bacula/technotes-2.4 b/bacula/technotes-2.4 index cee3704066..28f2aadb20 100644 --- a/bacula/technotes-2.4 +++ b/bacula/technotes-2.4 @@ -1,6 +1,10 @@ Technical notes on version 2.4 General: +03Jul08 +kes Remove const char that causes problems with Python, which has + older 'incorrect' headers. +kes Add const char in dbd.c to avoid compiler warnings. 02Jul08 kes Fix mtx-changer to detect both versions of Ubuntu (Debian) mt. This fixes bug #1116. -- 2.39.5