X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fsrc%2Fbacula.h;h=4d92290ef325de1657ddb2678ad77e64d574794f;hb=d9b7c3a08c08c031a44519f497dcce964f219234;hp=69b43828af159dadc700e311511e80970be527ae;hpb=8e94b30da91f44a8a0d39de5c493983cfd08884e;p=bacula%2Fbacula diff --git a/bacula/src/bacula.h b/bacula/src/bacula.h index 69b43828af..4d92290ef3 100644 --- a/bacula/src/bacula.h +++ b/bacula/src/bacula.h @@ -1,26 +1,46 @@ +/* + Bacula® - The Network Backup Solution + + 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. + This program is Free Software; you can redistribute it and/or + modify it under the terms of version two of the GNU General Public + License as published by the Free Software Foundation and included + in the file LICENSE. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. + + 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. +*/ /* * bacula.h -- main header file to include in all Bacula source * * Version $Id$ */ -/* - 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 - version 2 as amended with additional clauses defined in the - file LICENSE in the main source directory. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - the file LICENSE for additional details. - - */ #ifndef _BACULA_H #define _BACULA_H 1 +/* Disable FORTIFY_SOURCE, because bacula uses is own memory + * manager + */ +#ifdef _FORTIFY_SOURCE +#undef _FORTIFY_SOURCE +#endif + #ifdef __cplusplus /* Workaround for SGI IRIX 6.5 */ #define _LANGUAGE_C_PLUS_PLUS 1 @@ -29,16 +49,13 @@ #if defined(HAVE_WIN32) #if defined(HAVE_MINGW) #include "mingwconfig.h" -#define _STAT_H /* don't pull in MinGW stat.h */ -#define _STAT_DEFINED /* don't pull in MinGW stat.h */ #else #include "winconfig.h" #endif -#include "winhost.h" #else #include "config.h" -#include "host.h" #endif +#define __CONFIG_H #define _REENTRANT 1 @@ -48,8 +65,10 @@ /* System includes */ #if HAVE_STDINT_H +#ifndef __sgi #include #endif +#endif #if HAVE_STDARG_H #include #endif @@ -66,7 +85,11 @@ #if HAVE_ALLOCA_H #include #endif - +#if defined(_MSC_VER) +#include +#include +#include +#endif #include #include @@ -75,6 +98,12 @@ #define O_NOATIME 0 #endif +#if defined(_MSC_VER) +extern "C" { +#include "getopt.h" +} +#endif + #ifdef xxxxx #ifdef HAVE_GETOPT_LONG #include @@ -107,9 +136,10 @@ #endif #if defined(HAVE_WIN32) & !defined(HAVE_MINGW) #include -#else -//#include -#endif +#endif +#if !defined(HAVE_WIN32) & !defined(HAVE_MINGW) +#include +#endif #include #if HAVE_SYS_WAIT_H #include @@ -143,13 +173,25 @@ #include "baconfig.h" #include "lib/lib.h" +/* + * For wx-console compiles, we undo some Bacula defines. + * This prevents conflicts between wx-Widgets and Bacula. + * In wx-console files that malloc or free() Bacula structures + * config/resources and interface to the Bacula libraries, + * you must use bmalloc() and bfree(). + */ #ifdef HAVE_WXCONSOLE #undef New #undef _ +#undef free +#undef malloc #endif #if defined(HAVE_WIN32) -#include "lib/winapi.h" +#include "win32/winapi.h" +#include "winhost.h" +#else +#include "host.h" #endif #ifndef HAVE_ZLIB_H