]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix header file includes.
authorRobert Nelson <robertn@the-nelsons.org>
Mon, 3 Jul 2006 07:51:06 +0000 (07:51 +0000)
committerRobert Nelson <robertn@the-nelsons.org>
Mon, 3 Jul 2006 07:51:06 +0000 (07:51 +0000)
Move externs from source files to header files.
Fix the old mingw Makefile so it builds with the new dependencies.
Replace #ifdef'ed InitWinAPIWrapper with OSDependentInit macro.

git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3114 91ce42f0-d328-0410-95d8-f526ca767f89

77 files changed:
bacula/src/baconfig.h
bacula/src/bacula.h
bacula/src/console/console.c
bacula/src/dird/authenticate.c
bacula/src/dird/fd_cmds.c
bacula/src/dird/job.c
bacula/src/dird/ua_cmds.c
bacula/src/dird/ua_dotcmds.c
bacula/src/dird/ua_output.c
bacula/src/dird/ua_server.c
bacula/src/dird/ua_status.c
bacula/src/dird/verify.c
bacula/src/filed/filed.c
bacula/src/filed/filed.h
bacula/src/filed/job.c
bacula/src/filed/status.c
bacula/src/filed/win32/winabout.cpp
bacula/src/filed/win32/winbacula.h
bacula/src/filed/win32/winevents.cpp
bacula/src/filed/win32/winmain.cpp
bacula/src/filed/win32/winservice.cpp
bacula/src/filed/win32/winstat.cpp
bacula/src/filed/win32/wintray.cpp
bacula/src/findlib/Makefile.in
bacula/src/findlib/attribs.c
bacula/src/findlib/bfile.h
bacula/src/findlib/match.c
bacula/src/jcr.h
bacula/src/lib/attr.c
bacula/src/lib/events.c
bacula/src/lib/lib.h
bacula/src/lib/message.c
bacula/src/lib/message.h
bacula/src/lib/parse_conf.c
bacula/src/lib/smartall.h
bacula/src/lib/var.c
bacula/src/lib/watchdog.h
bacula/src/stored/bcopy.c
bacula/src/stored/bextract.c
bacula/src/stored/block.c
bacula/src/stored/bls.c
bacula/src/stored/bscan.c
bacula/src/stored/btape.c
bacula/src/stored/device.c
bacula/src/stored/label.c
bacula/src/stored/record.c
bacula/src/stored/status.c
bacula/src/stored/stored_conf.c
bacula/src/tools/bregex.c
bacula/src/tools/bwild.c
bacula/src/tools/dbcheck.c
bacula/src/tools/fstype.c
bacula/src/tools/testls.c
bacula/src/win32/Makefile.in
bacula/src/win32/compat/compat.cpp
bacula/src/win32/compat/compat.h
bacula/src/win32/compat/dirent.h
bacula/src/win32/compat/mingwconfig.h
bacula/src/win32/compat/mswinver.h
bacula/src/win32/compat/pwd.h
bacula/src/win32/compat/stdint.h
bacula/src/win32/compat/sys/ioctl.h
bacula/src/win32/compat/unistd.h
bacula/src/win32/compat/vss_generic.cpp
bacula/src/wx-console/authenticate.c
bacula/src/wx-console/console_conf.c
bacula/src/wx-console/console_thread.cpp
bacula/src/wx-console/main.cpp
bacula/src/wx-console/wxbconfigfileeditor.cpp
bacula/src/wx-console/wxbconfigpanel.cpp
bacula/src/wx-console/wxbhistorytextctrl.cpp
bacula/src/wx-console/wxblistctrl.cpp
bacula/src/wx-console/wxbmainframe.cpp
bacula/src/wx-console/wxbrestorepanel.cpp
bacula/src/wx-console/wxbtableparser.cpp
bacula/src/wx-console/wxbtreectrl.cpp
bacula/src/wx-console/wxbutils.cpp

index f052b13cdead87fc852e32849673cfcfc8584b17..c6c6854e771e54cbba4744777482a5e995399e14 100644 (file)
 #define NPRT(x) (x)?(x):_("*None*")
  
 #if defined(HAVE_WIN32)
+void InitWinAPIWrapper();
+
+#define  OSDependentInit()    InitWinAPIWrapper()
+
 #undef ENABLE_NLS
+#  define DLL_IMP_EXP
+#else
+
+#define DLL_IMP_EXP
+
+#define  OSDependentInit()
 #endif
 
 #ifdef ENABLE_NLS
@@ -476,7 +486,7 @@ int  m_msg(const char *file, int line, POOLMEM *&pool_buf, const char *fmt, ...)
 
 
 /* Use our strdup with smartalloc */
-#ifndef __WXGTK__
+#ifndef HAVE_WXCONSOLE
 #undef strdup
 #define strdup(buf) bad_call_on_strdup_use_bstrdup(buf)
 #endif
index f677f2458a5cd44c0002499046633a18872a1878..69b43828af159dadc700e311511e80970be527ae 100644 (file)
 #if defined(HAVE_WIN32)
 #if defined(HAVE_MINGW)
 #include "mingwconfig.h"
-#include "winhost.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"
-#include "winhost.h"
 #endif
+#include "winhost.h"
 #else
 #include "config.h"
 #include "host.h"
 /* Local Bacula includes. Be sure to put all the system
  *  includes before these.
  */
+#if defined(HAVE_WIN32)
+#include <windows.h>
+#include "win32/compat/compat.h"
+#endif
+
 #include "version.h"
 #include "bc_types.h"
 #include "baconfig.h"
 #include "lib/lib.h"
 
+#ifdef HAVE_WXCONSOLE
+#undef New
+#undef _
+#endif
+
+#if defined(HAVE_WIN32)
+#include "lib/winapi.h"
+#endif
+
 #ifndef HAVE_ZLIB_H
 #undef HAVE_LIBZ                      /* no good without headers */
 #endif
index b4392f2b06748d9e843bf4c5feec80e2739a632b..abdfc8f0f51fc97693a1425600835b39c3dd04c3 100644 (file)
@@ -37,8 +37,6 @@
 #endif
 
 #ifdef HAVE_WIN32
-#include <windows.h>
-#include "../lib/winapi.h"
 #define isatty(fd) (fd==0)
 #endif
 
@@ -388,10 +386,9 @@ int main(int argc, char *argv[])
    signal(SIGTTIN, got_sigtin);
    signal(SIGTTOU, got_sigtout);
    trapctlc();
-#else
-   InitWinAPIWrapper();
 #endif
-     
+
+   OSDependentInit();
 
    if (argc) {
       usage();
index 93d33ce29f3717fff8f727388b592df6a906e948..f0bcd4f026b149cab5619ca09e1192b490499bd4 100644 (file)
@@ -29,7 +29,6 @@
 #include "dird.h"
 
 extern DIRRES *director;
-extern char my_name[];
 
 /* Commands sent to Storage daemon and File daemon and received
  *  from the User Agent */
index 3d884f4663b81140e4628e5a65915eb7dcd27f0e..4a858abdc59b9b541947d3cd889666ca01f5455b 100644 (file)
@@ -49,7 +49,6 @@ static char OKRunBeforeNow[] = "2000 OK RunBeforeNow\n";
 /* Forward referenced functions */
 
 /* External functions */
-extern int debug_level;
 extern DIRRES *director;
 extern int FDConnectTimeout;
 
index 984f932041df1e7dda2ff5a823e36afc2d0c9a8b..44812a1d7b375efe9d47ff8ba1382f9b3d3dc9c7 100644 (file)
@@ -36,7 +36,6 @@ extern void term_scheduler();
 extern void term_ua_server();
 
 /* Imported variables */
-extern time_t watchdog_time;
 
 jobq_t job_queue;
 
index 7e71408bb4f3ccf0d4cdb6f91c601033d8d60b7a..f2d2bf2f8d654ac778368565d0121fed4a0080ab 100644 (file)
@@ -30,7 +30,6 @@
 extern int r_first;
 extern int r_last;
 extern struct s_res resources[];
-extern char my_name[];
 extern jobq_t job_queue;              /* job queue */
 
 
index 613d17c7ed91c215c2f85c8210a6f992c9751b6c..f39d3a5d0644a24052531d31cb72a8eb7ea7006a 100644 (file)
@@ -32,9 +32,7 @@
 extern int r_first;
 extern int r_last;
 extern struct s_res resources[];
-extern char my_name[];
 extern const char *client_backups;
-extern int console_msg_pending;
 
 /* Imported functions */
 extern void do_messages(UAContext *ua, const char *cmd);
index a738dfe326aab085c81c65efc16304ee70ef9d28..f53628e974032130f25c14191a0f47a9d54bf8d9 100644 (file)
@@ -33,9 +33,6 @@ extern int r_first;
 extern int r_last;
 extern RES_TABLE resources[];
 extern RES **res_head;
-extern int console_msg_pending;
-extern FILE *con_fd;
-extern brwlock_t con_lock;
 
 /* Imported functions */
 
index 7f0c6b795cfb0e0ef674bf8a4af5abb388cb177b..5ebaa79f75246142fb06f9c59f7b82d8fbe99d65 100644 (file)
@@ -28,8 +28,6 @@
 extern int r_first;
 extern int r_last;
 extern struct s_res resources[];
-extern int console_msg_pending;
-extern char my_name[];
 
 
 /* Forward referenced functions */
index c69d2526ad209d8eac7412dfb888ed6091271ca5..49ddebd316e4c8f4b680649e4c40f2621ba0a1d5 100644 (file)
 #include "bacula.h"
 #include "dird.h"
 
-extern char my_name[];
-extern time_t daemon_start_time;
-extern int num_jobs_run;
-
 static void list_scheduled_jobs(UAContext *ua);
 static void list_running_jobs(UAContext *ua);
 static void list_terminated_jobs(UAContext *ua);
index 3a46402ba65c1966d1794609eaf0669fc280c306..84a2ba196c88efeed50e20f05e33f71a873222fd 100644 (file)
@@ -33,9 +33,6 @@
 #include "dird.h"
 #include "findlib/find.h"
 
-/* Imported Global Variables */
-extern int debug_level;
-
 /* Commands sent to File daemon */
 static char verifycmd[]    = "verify level=%s\n";
 static char storaddr[]     = "storage address=%s port=%d ssl=0\n";
index 5145735a1cab7b41c4428a31f52d59b018b55302..623de061a32d95f75225c99cd162fe7292231ef0 100644 (file)
@@ -27,9 +27,6 @@
 /* Imported Functions */
 extern void *handle_client_request(void *dir_sock);
 
-/* Imported Variables */
-extern time_t watchdog_sleep_time;
-
 /* Forward referenced functions */
 void terminate_filed(int sig);
 static int check_resources();
index 2c59f340c180545e0627b44f37483b9e409ee0b7..c107d30ff5fb19c015e29831a5a023c186ed9525 100644 (file)
@@ -33,6 +33,4 @@
 #define uLongf uint32_t
 #endif
 
-extern int win32_client;              /* Are we running on Windows? */
-
 extern CLIENT *me;                    /* "Global" Client resource */
index 5b88dd67729646844273160c199592b49f5eccbf..9768fe2e30f7d66eb0a1b7f14e28b64ee1c2f3c4 100644 (file)
@@ -28,7 +28,6 @@
 static pthread_mutex_t vss_mutex = PTHREAD_MUTEX_INITIALIZER;
 #endif
 
-extern char my_name[];
 extern CLIENT *me;                    /* our client resource */
 
 int enable_vss = 0;                   /* set to use vss */
index 2c90d7a0a9d1d810891d77ee204e9bbdc185e9f1..7df988108cba8f14e9d14afa5e4756f68446ff9a 100755 (executable)
 #include "bacula.h"
 #include "filed.h"
 
-extern char my_name[];
-extern int num_jobs_run;
-extern time_t daemon_start_time;
-extern bool get_trace(void);
-
 /* Forward referenced functions */
 static void  list_terminated_jobs(void sendit(const char *msg, int len, void *sarg), void *arg);
 static void bsock_sendit(const char *msg, int len, void *arg);
@@ -403,8 +398,6 @@ static const char *level_to_str(int level)
 
 
 #if defined(HAVE_WIN32)
-#include <windows.h>
-
 int bacstat = 0;
 
 struct s_win32_arg {
index 69ace2286a3863a42e8bef55642044be31170d4f..5fbccae3a93b561bceb3d91a414d4b2303fdae8a 100755 (executable)
    Kern E. Sibbald, 2000
 */
 
+#include "bacula.h"
 #include "winbacula.h"
 #include "winabout.h"
+#include "winres.h"
 
 bacAbout::bacAbout()
 {
index c61d39e8d4d7138569cfc87215207c4ee1788392..088205be332f6589bafb604ba8c69d4ed7464e3c 100755 (executable)
 //
 
 
-// WinUPS header file
-
-#ifdef HAVE_MINGW
-#include "compat.h"
-#endif
-
-#define STRICT 1
-#include <windows.h>
-#include <stdio.h>
-#include <process.h>
-#include "winres.h"
-
-
 // Application specific messages
 
 // Message used for system tray notifications
index c41cf7cd983065abfcce4ea99fcb03d65a64c93d..50edd0a5f5c0507b8394a3015ae7743224a40a81 100755 (executable)
 
 /* Code for the Events dialogue */
 
+#include "bacula.h"
 #include "winbacula.h"
 #include "winevents.h"
+#include "winres.h"
 
 extern "C" void FillEventsBox(HWND hwnd, int id_list);
 
index 2cda05ad2b52cf3e01cd44f68446827f1690de17..4a662a56e7dcb4bed1526635b407bf97926eb793 100755 (executable)
   
 */
 
-#ifndef HAVE_WIN32
-#define HAVE_CYGWIN 1
-#endif
-
 #include <unistd.h>
-#include <lmcons.h>
 #include <ctype.h>
+
+#include "bacula.h"
 #include "winbacula.h"
 #include "wintray.h"
 #include "winservice.h"
 #include <signal.h>
 #include <pthread.h>
-#include "../../lib/winapi.h"
-#include "baconfig.h"
 
 extern int BaculaMain(int argc, char *argv[]);
 extern void terminate_filed(int sig);
@@ -40,7 +35,7 @@ extern void d_msg(const char *, int, int, const char *, ...);
 HINSTANCE       hAppInstance;
 const char      *szAppName = "Bacula";
 DWORD           mainthreadId;
-bool silent = false;
+bool            silent = false;
 
 /* Imported variables */
 extern DWORD    g_servicethread;
index a1c7ddd009c2b2b6ac458d9ca61aaf8c04fa2a37..7fc85b2e7dacaf3a005b2b64a5379c93a14ef4b7 100755 (executable)
 // show events, ...)
 
 
-#include <lmcons.h>
-#undef PASCAL
+#include "bacula.h"
 #include "winbacula.h"
 #include "winservice.h"
 #include "wintray.h"
-#include "bacula.h" 
 
 void set_service_description(SC_HANDLE hSCManager, SC_HANDLE hService,
                              LPSTR lpDesc);
index 79da6dcc7ed8ecbdd3c68c82dd3e90aa6e2e9737..45e3c41ad180efac253094a4f4a49b8e8117c63a 100755 (executable)
    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  */
 
+#include "bacula.h"
 #include "winbacula.h"
 #include "winstat.h"
+#include "winres.h"
 
 extern void FillStatusBox(HWND hwnd, int id_list);
 
index 3a5518de106bb46c83e4f0db6eed40fe41746c75..044d34b7ce86b76b4188ad5b39ef2e8c6be0f568 100755 (executable)
 
 // Implementation of a system tray icon & menu for Bacula
 
+#include "bacula.h"
+#include "jcr.h"
 #include "winbacula.h"
 #include "winservice.h"
-#include <lmcons.h>
-
-// Header
-
+#include "winres.h"
 #include "wintray.h"
-#include "bacula.h"
-#include "jcr.h"
 
 // Constants
 #ifdef properties_implemented
index b0fe8cbefef802f06fec9ba1180bfffcd5af1493..a9e4a4ff764904da3094dbf32de89412f936a585 100644 (file)
@@ -34,7 +34,7 @@ LIBOBJS = find.o match.o find_one.o attribs.o create_file.o \
 # inference rules
 .c.o:
        @echo "Compiling $<"
-       $(NO_ECHO)$(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) $(OPENSSL_INC) $(PYTHON_INC) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
+       $(NO_ECHO)$(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) $(PYTHON_INC) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
 #-------------------------------------------------------------------------
 all: Makefile libfind.a ../lib/libbac.a
        @echo "==== Make of findlib is good ===="
index fdf0c67322c1bc3bd3a47524e6e2e4d7ccf2ec0e..6a81ac5dac3e77b4275c9548334af0415cd9a386 100755 (executable)
 #include "find.h"
 
 #if defined(HAVE_WIN32)
-
-#include "../lib/winapi.h"
-
-
 /* Forward referenced subroutines */
 static bool set_win32_attributes(JCR *jcr, ATTR *attr, BFILE *ofd);
 void unix_name_to_win32(POOLMEM **win32_name, char *name);
index 69cce6fb68540aa8a50149d5d3647d681d27677a..e6d4c34a0608f28de25a424e0c808c1895247283 100644 (file)
@@ -66,9 +66,6 @@ typedef struct _PROCESS_WIN32_BACKUPAPIBLOCK_CONTEXT {
  */
 #if defined(HAVE_WIN32)
 
-#include <windows.h>
-#include "../lib/winapi.h"
-
 enum {
    BF_CLOSED,
    BF_READ,                           /* BackupRead */
index 4c239840a953d1ad2b36e79f6496a62ff6a5f36f..2e5bc262407655b0c1e7a433b86fbc85eab575e7 100644 (file)
@@ -49,7 +49,6 @@ static const int fnmode = 0;
 #undef bmalloc
 #define bmalloc(x) sm_malloc(__FILE__, __LINE__, x)
 
-extern int win32_client;
 
 int
 match_files(JCR *jcr, FF_PKT *ff, int callback(FF_PKT *ff_pkt, void *hpkt, bool), void *his_pkt)
@@ -366,13 +365,15 @@ int file_is_excluded(FF_PKT *ff, const char *file)
 {
    const char *p;
 
+#if defined(HAVE_WIN32)
    /*
     *  ***NB*** this removes the drive from the exclude
     *  rule.  Why?????
     */
-   if (win32_client && file[1] == ':') {
+   if (file[1] == ':') {
       file += 2;
    }
+#endif
 
    if (file_in_excluded_list(ff->excluded_paths_list, file)) {
       return 1;
index effa5580a048254544ddf42e979e1339650d9c11..f5f45ad74ed1cc7f4520bbcc627371c58fc1b680 100644 (file)
@@ -350,7 +350,7 @@ struct s_last_job {
 };
 
 extern struct s_last_job last_job;
-extern dlist *last_jobs;
+extern dlist * DLL_IMP_EXP last_jobs;
 
 
 /* The following routines are found in lib/jcr.c */
@@ -362,6 +362,7 @@ extern JCR *get_jcr_by_partial_name(char *Job);
 extern JCR *get_jcr_by_full_name(char *Job);
 extern JCR *get_next_jcr(JCR *jcr);
 extern void set_jcr_job_status(JCR *jcr, int JobStatus);
+extern int DLL_IMP_EXP num_jobs_run;
 
 #ifdef DEBUG
 extern void b_free_jcr(const char *file, int line, JCR *jcr);
index c041f5fd566eb2297b04dbaef45e42c3013fd187..2e30a11b62ceea322176ea3a05d4ca99a43e01e6 100644 (file)
@@ -23,7 +23,6 @@
 #include "bacula.h"
 #include "jcr.h"
 
-extern int win32_client;
 
 ATTR *new_attr()
 {
@@ -141,9 +140,11 @@ void build_attr_output_fnames(JCR *jcr, ATTR *attr)
       const char *fn;
       int wherelen = strlen(jcr->where);
       pm_strcpy(attr->ofname, jcr->where);  /* copy prefix */
-      if (win32_client && attr->fname[1] == ':') {
+#if defined(HAVE_WIN32)
+      if (attr->fname[1] == ':') {
          attr->fname[1] = '/';     /* convert : to / */
       }
+#endif
       fn = attr->fname;            /* take whole name */
       /* Ensure where is terminated with a slash */
       if (jcr->where[wherelen-1] != '/' && fn[0] != '/') {
@@ -166,9 +167,12 @@ void build_attr_output_fnames(JCR *jcr, ATTR *attr)
             attr->olname[0] = 0;
             add_link = false;
          }
-         if (win32_client && attr->lname[1] == ':') {
+
+#if defined(HAVE_WIN32)
+         if (attr->lname[1] == ':') {
             attr->lname[1] = '/';    /* turn : into / */
          }
+#endif
          fn = attr->lname;       /* take whole name */
          /* Ensure where is terminated with a slash */
          if (add_link && jcr->where[wherelen-1] != '/' && fn[0] != '/') {
@@ -177,10 +181,10 @@ void build_attr_output_fnames(JCR *jcr, ATTR *attr)
          pm_strcat(attr->olname, fn);     /* copy rest of link */
       }
    }
-   if (win32_client) {
+#if defined(HAVE_WIN32)
       strip_double_slashes(attr->ofname);
       strip_double_slashes(attr->olname);
-   }
+#endif
 }
 
 extern char *getuser(uid_t uid, char *name, int len);
index 782778e12ad8809240ecefa350e5cb485c007aed..c89c413f02437dcc2d86771a5a0f65dccbeca31a 100644 (file)
@@ -140,8 +140,6 @@ bailout:
 
 #if defined(HAVE_WIN32)
 
-#include <windows.h>
-
 extern UPSINFO myUPS;
 extern int shm_OK;
 
index 244bdc576fcbadb6ba4cb97f38b0bcec49c3a543..9f86b25a83ade2e35be58d28847bc3516f33a7de 100644 (file)
 #include "btime.h"
 #include "crypto.h"
 #include "mem_pool.h"
+#include "rwlock.h"
+#include "semlock.h"
+#include "queue.h"
+#include "serial.h"
 #include "message.h"
 #include "openssl.h"
 #include "lex.h"
 #include "bsock.h"
 #include "bshm.h"
 #include "workq.h"
-#include "rwlock.h"
-#include "semlock.h"
-#include "queue.h"
-#include "serial.h"
 #ifndef HAVE_FNMATCH
 #include "fnmatch.h"
 #endif
index 1c4b685d9a96b3530cabec342bf24c366960ea7c..bac2f479da39e9a7b546f2f34098ad8661fc1d1c 100755 (executable)
 #include "bacula.h"
 #include "jcr.h"
 
-#if !defined(HAVE_CONSOLE) && defined(HAVE_WIN32)
-#include <windows.h>
-#endif
-
 #define FULL_LOCATION 1               /* set for file:line in Debug messages */
 
 /*
index e49a69741823548dbf634eda1bbfd43473c16c43..7f73169d680245f86627a0e71041711d0f443b40 100644 (file)
@@ -129,10 +129,16 @@ void d_msg(const char *file, int line, int level, const char *fmt,...);
 void e_msg(const char *file, int line, int type, int level, const char *fmt,...);
 void Jmsg(JCR *jcr, int type, time_t mtime, const char *fmt,...);
 void Qmsg(JCR *jcr, int type, time_t mtime, const char *fmt,...);
+bool get_trace(void);
 
-extern int debug_level;
-extern int verbose;
-extern char my_name[];
-extern const char *working_directory;
-extern time_t daemon_start_time;
-extern char catalog_db[];
+
+extern int           DLL_IMP_EXP debug_level;
+extern int           DLL_IMP_EXP verbose;
+extern char          DLL_IMP_EXP my_name[];
+extern const char *  DLL_IMP_EXP working_directory;
+extern time_t        DLL_IMP_EXP daemon_start_time;
+extern char                      catalog_db[];
+
+extern int           DLL_IMP_EXP console_msg_pending;
+extern FILE *        DLL_IMP_EXP con_fd;                 /* Console file descriptor */
+extern brwlock_t     DLL_IMP_EXP con_lock;               /* Console lock structure */
index f95b60948510ce01f15eebad25186c7de04a7a89..1ad44371e6f8b78f093c3c2b30fb06f8bfeacfd1 100755 (executable)
@@ -50,8 +50,6 @@
 
 #include "bacula.h"
 
-extern int debug_level;
-
 /* Each daemon has a slightly different set of
  * resources, so it will define the following
  * global values.
index 429549b9d1cfac67a673e99f217c1a3decdc2ea9..1ddd3cacffa0aa2f89adbb14898ab3a11db32cd7 100644 (file)
 
  */
 
-extern uint64_t sm_max_bytes;
-extern uint64_t sm_bytes;
-extern uint32_t sm_max_buffers;
-extern uint32_t sm_buffers;
+extern uint64_t DLL_IMP_EXP sm_max_bytes;
+extern uint64_t DLL_IMP_EXP sm_bytes;
+extern uint32_t DLL_IMP_EXP sm_max_buffers;
+extern uint32_t DLL_IMP_EXP sm_buffers;
 
 #ifdef  SMARTALLOC
 #undef  SMARTALLOC
index 14a59227c1a1e25030e369d759a46d9a3407616c..14289b19a8edece5f81d4415241a08e9abc6ad04 100644 (file)
 
  */
 
-#ifndef HAVE_WIN32
 #include "bacula.h"
 #if defined(HAVE_PCREPOSIX)
 #  include <pcreposix.h>
+#elif defined(HAVE_WIN32)
+#  include "bregex.h"
 #else
 #  include <regex.h>
 #endif
@@ -2716,4 +2717,3 @@ const char *var_strerror(var_t *var, var_rc_t rc)
     }
     return str;
 }
-#endif
index c8e1cebb582297dedf58a3d713a6f78867206543..8763928e0bbae3eede27121ed4a9ade1368069ba 100644 (file)
@@ -43,3 +43,7 @@ struct s_watchdog_t {
        time_t next_fire;
 };
 typedef struct s_watchdog_t watchdog_t;
+
+/* Exported globals */
+extern time_t DLL_IMP_EXP watchdog_time;             /* this has granularity of SLEEP_TIME */
+extern time_t DLL_IMP_EXP watchdog_sleep_time;      /* examine things every 60 seconds */
index b072bd9a935b6dcba88be5c7c2cc297c723badb1..a23cd2547a72b5522a4321d1a66455f095669d45 100644 (file)
@@ -138,6 +138,8 @@ int main (int argc, char *argv[])
       usage();
    }
 
+   OSDependentInit();
+
    working_directory = wd;
 
    if (configfile == NULL) {
index 1856539ac306cfe3cc4c55f8cdc4645e7e9b62f0..71a0b2512a440eccb3ded7ffd26e11d8a96edb1c 100644 (file)
 #include "stored.h"
 #include "findlib/find.h"
 
-#if defined(HAVE_WIN32)
-int win32_client = 1;
-#else
-int win32_client = 0;
-#endif
-
 static void do_extract(char *fname);
 static bool record_cb(DCR *dcr, DEV_RECORD *rec);
 
@@ -98,6 +92,8 @@ int main (int argc, char *argv[])
    my_name_is(argc, argv, "bextract");
    init_msg(NULL, NULL);              /* setup message handler */
 
+   OSDependentInit();
+
    ff = init_find_files();
    binit(&bfd);
 
index 2917c0fb73c7c73adf2afeec3334c56c05dafa76..a3d354da1e337c5da0f10edf4906c8a30aa9bb26 100644 (file)
@@ -27,7 +27,6 @@
 #include "bacula.h"
 #include "stored.h"
 
-extern int debug_level;
 static bool terminate_writing_volume(DCR *dcr);
 static bool do_new_file_bookkeeping(DCR *dcr);
 static bool do_dvd_size_checks(DCR *dcr);
index 40d348ccaebf74a79b03a8ceb5fe1b7a6c1fc01b..e12f6d47cf684b56dda88d88b16b34b348a1b5cc 100644 (file)
 #include "stored.h"
 #include "findlib/find.h"
 
-#if defined(HAVE_CYGWIN) || defined(HAVE_WIN32)
-int win32_client = 1;
-#else
-int win32_client = 0;
-#endif
-
 /* Dummy functions */
 int generate_daemon_event(JCR *jcr, const char *event) { return 1; }
 
@@ -102,6 +96,8 @@ int main (int argc, char *argv[])
    my_name_is(argc, argv, "bls");
    init_msg(NULL, NULL);              /* initialize message handler */
 
+   OSDependentInit();
+
    ff = init_find_files();
 
    while ((ch = getopt(argc, argv, "b:c:d:e:i:jkLpvV:?")) != -1) {
index 6d979c96f5ee62805b991f8cb4c9fe981db55ebf..397a86c43762e7d226ef54e23025bf03709e1fea 100644 (file)
@@ -51,14 +51,6 @@ static JCR *create_jcr(JOB_DBR *jr, DEV_RECORD *rec, uint32_t JobId);
 static int update_digest_record(B_DB *db, char *digest, DEV_RECORD *rec, int type);
 
 
-/* Global variables */
-#if defined(HAVE_WIN32)
-int win32_client = 1;
-#else
-int win32_client = 0;
-#endif
-
-
 /* Local variables */
 static DEVICE *dev = NULL;
 static B_DB *db;
index 0198ed0687773d4b95fc0f50ad3637e4b46e7f2b..a69a3d2e3abf5ddb7656207e6f930bd2d256f9fc 100644 (file)
@@ -188,6 +188,8 @@ int main(int margc, char *margv[])
    my_name_is(margc, margv, "btape");
    init_msg(NULL, NULL);
 
+   OSDependentInit();
+
    while ((ch = getopt(margc, margv, "b:c:d:psv?")) != -1) {
       switch (ch) {
       case 'b':                    /* bootstrap file */
index 30f6c403f6309a6ec211397ea79ff1236a62dff6..be6ef15fb1153867c8621f99810d1cc6f7aafab0 100644 (file)
@@ -48,9 +48,6 @@
 
 /* Forward referenced functions */
 
-extern char my_name[];
-extern int debug_level;
-
 /*
  * This is the dreaded moment. We either have an end of
  * medium condition or worse, and error condition.
index 43afb8933abaac0f89bef5d68371351f5cbd843b..030a7ca2c2af62900b0000eee23d12e06033bc01 100644 (file)
@@ -28,9 +28,6 @@
 /* Forward referenced functions */
 static void create_volume_label_record(DCR *dcr, DEV_RECORD *rec);
 
-extern char my_name[];
-extern int debug_level;
-
 /*
  * Read the volume label
  *
index 130a2884b71a6f3e38e978aa0b60d48550662912..8eb05094923dc0975f7ed6705c924f9d9a91dbad 100644 (file)
@@ -27,8 +27,6 @@
 #include "bacula.h"
 #include "stored.h"
 
-extern int debug_level;
-
 /*
  * Convert a FileIndex into a printable
  *   ASCII string.  Not reentrant.
index 46a72d95d6ae4a46f9006cdeebdb6138a0347bf0..5edd913ac1484bdb473de33457ae6df1e6c693af 100644 (file)
 extern BSOCK *filed_chan;
 extern int r_first, r_last;
 extern struct s_res resources[];
-extern char my_name[];
-extern time_t daemon_start_time;
-extern int num_jobs_run;
-
 
 /* Static variables */
 static char qstatus[] = ".status %127s\n";
index cb9766cd6f443f930f4fff6a944849f265d1a567..e392d0b3d198ce17f2dcc8e7616f91e276112be6 100644 (file)
@@ -23,9 +23,6 @@
 #include "bacula.h"
 #include "stored.h"
 
-extern int debug_level;
-
-
 /* First and last resource ids */
 int r_first = R_FIRST;
 int r_last  = R_LAST;
index 9587658f38b8194cfa7dc27260268e09294e7dfa..f21240e0e09c860d2eaf89217c5f5973182c2f4b 100644 (file)
@@ -109,6 +109,8 @@ int main(int argc, char *const *argv)
       usage();
    }
 
+   OSDependentInit();
+
    for ( ;; ) {
       printf("Enter regex pattern: ");
       if (fgets(pat, sizeof(pat)-1, stdin) == NULL) {
index a7b09770463be16199cc949b57dd125a4a8aec38..a1f579e91eb5c7c93ed37ef0eba9af4aa20e500f 100644 (file)
@@ -90,6 +90,8 @@ int main(int argc, char *const *argv)
       usage();
    }
 
+   OSDependentInit();
+
    for ( ;; ) {
       printf("Enter a wild-card: ");
       if (fgets(pat, sizeof(pat)-1, stdin) == NULL) {
index c7eaa5a0f6cd9b320dd956b960009e500ef6ad15..66ae3858cd343c46a85feac6b1144592425d9c54 100644 (file)
@@ -152,6 +152,8 @@ int main (int argc, char *argv[])
    argc -= optind;
    argv += optind;
 
+   OSDependentInit();
+
    if (configfile) {
       CAT *catalog = NULL;
       int found = 0;
index 796588d9a6f590d78bd191623fb1e1b33933acb4..3f1430a72a08af11bddf18a0e583ec3db7a4a9c0 100644 (file)
@@ -75,6 +75,8 @@ main (int argc, char *const *argv)
       usage();
    }
 
+   OSDependentInit();
+
    for (i = 0; i < argc; --argc, ++argv) {
       if (fstype(*argv, fs, sizeof(fs))) {
          if (verbose) {
index 78ff15d3ecdef49109f7d8cd12117b48e86108c8..54d46fa0f16a965ca316cb5063870567ed370971 100755 (executable)
 #include "bacula.h"
 #include "findlib/find.h"
 
-#if defined(HAVE_WIN32)
-int win32_client = 1;
-#else
-int win32_client = 0;
-#endif
-
 /* Dummy functions */
 int generate_daemon_event(JCR *jcr, const char *event) { return 1; }
 int generate_job_event(JCR *jcr, const char *event) { return 1; }
index 0d93a16b7fa87bd0465170c0aa476199e1a7c3b5..69aeb1daf6f4a3a27311fa0d15a60e8c89566aae 100644 (file)
 TOPDIR = @TOP_DIR@
 CROSSTOOLS = $(TOPDIR)/cross-tools
 MINGW = $(CROSSTOOLS)/mingw32
-INCLUDE_MINGW = -I $(MINGW)/mingw32/include
-INCLUDE_GCC = -I $(MINGW)/lib/gcc/mingw32/3.4.5/include
 
-DEPKGS = $(TOPDIR)/depkgs-win32
+DEPKGS = $(TOPDIR)/depkgs-mingw32
 
-INCLUDE_BACULA = -I .. -I ./compat
-INCLUDE_PTHREADS = -I$(DEPKGS)/pthreads
-INCLUDE_ZLIB = -I$(DEPKGS)/zlib
-INCLUDE_VSS = -I$(CROSSTOOLS)
+INCLUDE_BACULA = -I .. -I ./compat -I$(DEPKGS)/include
+INCLUDE_PTHREADS = -I$(DEPKGS)/include/pthreads
+INCLUDE_VSS = -I$(DEPKGS)/vss
 INCLUDE_ICONS = -I ../filed/win32
-INCLUDE_OPENSSL = -I$(DEPKGS)/openssl/include
-INCLUDE_WX = -I$(DEPKGS)/wx/include
 
-LIB_MINGW = $(MINGW)/mingw32/lib
-LIB_PTHREADS = $(DEPKGS)/pthreads/pthreadGCE.dll
-LIB_ZLIB = $(DEPKGS)/zlib/libz.a
-LIB_SSL = $(DEPKGS)/openssl/libssl.a
-LIB_CRYPTO = $(DEPKGS)/openssl/libcrypto.a
+LIB_PTHREADS = -lpthreadGCE
+LIB_ZLIB = -lz
+LIB_SSL = -lssl
+LIB_CRYPTO = -lcrypto
 
-LIBWX = $(DEPKGS)/wx/build-mingw32/lib
+LIBWX = $(DEPKGS)/lib/wx_dll
 LIB_WX = $(LIBWX)/libwx_base-2.6.a \
         $(LIBWX)/libwx_base_net-2.6.a \
         $(LIBWX)/libwx_base_xml-2.6.a \
@@ -259,6 +253,7 @@ LIB_OBJS = \
        $(LIBDIR)/bnet_server.o \
        $(LIBDIR)/bpipe.o \
        $(LIBDIR)/bregex.o \
+       $(LIBDIR)/bsnprintf.o \
        $(LIBDIR)/bsys.o \
        $(LIBDIR)/btime.o \
        $(LIBDIR)/btimers.o \
@@ -334,6 +329,9 @@ $(LIBDIR)/bpipe.o:    ../lib/bpipe.c
 $(LIBDIR)/bregex.o:       ../lib/bregex.c
        $(CXX) -c $< -o $@              
 
+$(LIBDIR)/bsnprintf.o:    ../lib/bsnprintf.c
+       $(CXX) -c $< -o $@              
+
 $(LIBDIR)/bsys.o: ../lib/bsys.c
        $(CXX) -c $< -o $@              
 
@@ -533,37 +531,29 @@ $(OBJDIR)/wx-console.res:     ../wx-console/wx-console_private.rc
 FD_OBJS = $(LIB_OBJS) $(OBJS_COMPAT) $(OBJS_WIN) $(OBJS_FINDLIB) $(OBJS_FILED)
 
 FD_LIBS = \
-       -L$(LIB_MINGW) \
+       -L$(DEPKGS)/lib \
        $(LIB_PTHREADS) \
        $(LIB_SSL) \
        $(LIB_CRYPTO) \
        $(LIB_ZLIB) \
-       $(LIB_MINGW)/libole32.a \
-       $(LIB_MINGW)/liboleaut32.a \
-       $(LIB_MINGW)/libuser32.a \
-       $(LIB_MINGW)/libadvapi32.a \
-       $(LIB_MINGW)/libgdi32.a \
-       $(LIB_MINGW)/libwsock32.a \
-       $(LIB_MINGW)/libshell32.a \
-       $(LIB_MINGW)/libnetapi32.a \
-       $(LIB_MINGW)/libuuid.a
+       -lgdi32 \
+       -lole32 \
+       -loleaut32 \
+       -lwsock32 \
+       -luuid
 
 CONS_OBJS = $(LIB_OBJS) $(OBJS_COMPAT) $(OBJS_CONSOLE)
 
 CONS_LIBS = \
-       -L$(LIB_MINGW) \
+       -L$(DEPKGS)/lib \
        $(LIB_PTHREADS) \
        $(LIB_SSL) \
        $(LIB_CRYPTO) \
-       $(LIB_MINGW)/libole32.a \
-       $(LIB_MINGW)/liboleaut32.a \
-       $(LIB_MINGW)/libuser32.a \
-       $(LIB_MINGW)/libadvapi32.a \
-       $(LIB_MINGW)/libgdi32.a \
-       $(LIB_MINGW)/libwsock32.a \
-       $(LIB_MINGW)/libshell32.a \
-       $(LIB_MINGW)/libnetapi32.a \
-       $(LIB_MINGW)/libuuid.a
+       -lole32 \
+       -loleaut32 \
+       -lwsock32 \
+       -luuid
+
 
 WXCONS_OBJS = $(LIB_OBJS) $(OBJS_COMPAT) $(OBJS_WXCONSOLE)
 
@@ -572,15 +562,7 @@ WXCONS_LIBS = \
        $(LIB_PTHREADS) \
        $(LIB_SSL) \
        $(LIB_CRYPTO) \
-       $(LIB_MINGW)/libole32.a \
-       $(LIB_MINGW)/liboleaut32.a \
-       $(LIB_MINGW)/libuser32.a \
-       $(LIB_MINGW)/libadvapi32.a \
-       $(LIB_MINGW)/libgdi32.a \
-       $(LIB_MINGW)/libwsock32.a \
-       $(LIB_MINGW)/libshell32.a \
-       $(LIB_MINGW)/libnetapi32.a \
-       $(LIB_MINGW)/libuuid.a
+
 
 
 
@@ -595,20 +577,20 @@ all: bacula-fd.exe bconsole.exe
 # Link the File daemon executable ...
 bacula-fd.exe: $(FD_OBJS)
        $(CXX) $(FD_OBJS) $(FD_LIBS) -o $(OBJDIR)/bacula-fd.exe
-       cp -f $(DEPKGS)/pthreads/pthreadGCE.dll .
+       cp -f $(DEPKGS)/bin/pthreadGCE.dll .
        cp -f $(MINGW)/mingw32/bin/mingwm10.dll .
 
 # Link the File daemon executable ...
 bconsole.exe: $(CONS_OBJS)
        $(CXX) $(CONS_OBJS) $(CONS_LIBS) -o $(OBJDIR)/bconsole.exe
-       cp -f $(DEPKGS)/pthreads/pthreadGCE.dll .
+       cp -f $(DEPKGS)/bin/pthreadGCE.dll .
        cp -f $(MINGW)/mingw32/bin/mingwm10.dll .
 
 # Link the File daemon executable ...
 #  Not yet complete
 wx-console.exe: $(WXCONS_OBJS)
        $(CXX) $(WX_INC) $(WXCONS_OBJS) $(WXCONS_LIBS) -o $(OBJDIR)/wx-console.exe
-       cp -f $(DEPKGS)/pthreads/pthreadGCE.dll .
+       cp -f $(DEPKGS)/bin/pthreadGCE.dll .
        cp -f $(MINGW)/mingw32/bin/mingwm10.dll .
 
 
index 50451a37feac70f4e8cde4dad8105072cc72bf3b..f0ea48a82c48b0ae2fe350ef56b91e4cfb53e1ee 100644 (file)
@@ -24,7 +24,6 @@
 #include "bacula.h"
 #include "compat.h"
 #include "jcr.h"
-#include "../../lib/winapi.h"
 #include "vss.h"
 
 
index 5ac44ad0e3f55c58c83aaaccc26e932ec38f8305..c8f3504201aefa912c1d17ab11e80986ab7acbc3 100644 (file)
 #define __STDC__ 1
 #endif
 
-#include <stdio.h>
-#include <basetsd.h>
-#include <stdarg.h>
-#include <sys/types.h>
-#include <process.h>
-#include <direct.h>
-#include <wchar.h>
-#include <winsock2.h>
-#include <windows.h>
-#include <wincon.h>
-#include <winbase.h>
-#include <stdio.h>
-#include <stdarg.h>
-#include <conio.h>
-#include <process.h>
-#include <errno.h>
-#include <string.h>
-#include <time.h>
-#include <signal.h>
 #include <malloc.h>
-#include <setjmp.h>
-#include <direct.h>
-#include <ctype.h>
-#include <fcntl.h>
-#include <io.h>
-#include <lmcons.h>
-#include <dirent.h>
-
-#include "getopt.h"
-
-#define HAVE_WIN32 1
-
-#ifndef HAVE_MINGW
-#ifdef HAVE_CYGWIN
-#undef HAVE_CYGWIN
-#else
-#endif //HAVE_CYGWIN
-#endif //HAVE_MINGW
 
 typedef UINT64 u_int64_t;
 typedef UINT64 uint64_t;
@@ -118,13 +81,6 @@ typedef __int64 off_t;          /* STDC=1 means we can define this */
 typedef long _off_t;            /* must be same as sys/types.h */
 #endif
 
-#ifndef HAVE_MINGW
-#ifndef HAVE_WXCONSOLE
-typedef int BOOL;
-#define bool BOOL
-#endif
-#endif
-
 typedef UINT32 u_int32_t;
 typedef unsigned char u_int8_t;
 typedef unsigned short u_int16_t;
@@ -189,7 +145,6 @@ int gettimeofday(struct timeval *, struct timezone *);
 #define ENOMEDIUM 123
 #endif
 
-#ifndef HAVE_WXCONSOLE
 struct stat
 {
     _dev_t      st_dev;
@@ -207,8 +162,6 @@ struct stat
     uint64_t    st_blocks;
 };
 
-#endif
-
 #undef  S_IFMT
 #define S_IFMT         0170000         /* file type mask */
 #undef  S_IFDIR
@@ -399,23 +352,5 @@ void openlog(const char *ident, int option, int facility);
 #define INVALID_FILE_ATTRIBUTES ((DWORD)-1)
 #endif
 
-/* Temp kludge ***FIXME*** */
-#ifdef __APCUPSD__
-#define SIGCHLD 0
-#define SIGALRM 0
-#define SIGHUP 0
-#define SIGCHLD 0
-#define SIGPIPE 0
-unsigned int alarm(unsigned int seconds);
-#define PM_FNAME 2000
-#define PM_MESSAGE 2000
-#define get_pool_memory(x) (char *)malloc(x)
-#define free_pool_memory(x) free((char *)x)
-#define check_pool_memory_size(x, y) x
-#define ASSERT(x) 
-#define bstrncat astrncat
-#define bstrncpy astrncpy
-
-#endif
 
 #endif /* __COMPAT_H_ */
index 7273fef6deb36f7cc1a92fe89da75db00128bbff..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1 +0,0 @@
-#include "compat.h"
index e28d40120d329ce0aa4c6a47621e93cc5817960c..934ea79752ae4c4ea0a21d9dff030460d7bc0bb3 100644 (file)
@@ -56,6 +56,7 @@
 /* Set to correct scanf value for long long int */
 #define lld "lld"
 #define llu "llu"
+/* #define USE_BSNPRINTF */
 
 #define HAVE_STRTOLL 1
 
index c30ecdc6501a03234ddd129fffc43d1e2277fb63..730ac91971a25096efea73f6c95c28f4ffb4d202 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef __MSWINVER_H_
 #define __MSWINVER_H_
 
-#include "winbase.h"
-
 #define MS_MAJOR_WINDOWS_3     3
 #define MS_MAJOR_WINDOWS_95    4
 #define MS_MAJOR_WINDOWS_98    4
index 7273fef6deb36f7cc1a92fe89da75db00128bbff..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1 +0,0 @@
-#include "compat.h"
index ce2c545f75071fafa2e477b89206a45877275557..048a4541bca9b6f333f2b4b4fe2b0496a718a38c 100644 (file)
@@ -1,5 +1,3 @@
-#ifndef HAVE_MINGW
-#include "compat.h"
-#else
+#if defined(__GNUC__)
 #include_next <stdint.h>
 #endif
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..c09d6d96345e0767eafa2f1ce3e292424059eb60 100644 (file)
@@ -0,0 +1 @@
+extern int ioctl(int __fd, unsigned long int __request, ...);
index ac1b9baa49e07f81328ccc923879d3fbb1beff19..beb96285eda6ee128f387018b0fabcbc4fbfabe3 100644 (file)
@@ -1,5 +1,3 @@
-#ifndef HAVE_MINGW
-#include "compat.h"
-#else
+#if defined(__GNUC__)
 #include_next<unistd.h>
 #endif
index dbf8d85975ca084f4a0370990d638eeae859b223..1701c039fd8e251e4d7948c844e861b0f6f3f8b7 100644 (file)
@@ -24,7 +24,7 @@
 #ifdef WIN32_VSS
 
 #ifdef HAVE_MINGW
-#include "compat.h"
+#include "bacula.h"
 #else
 #include <stdio.h>
 #include <basetsd.h>
@@ -54,6 +54,7 @@
 #endif
 
 
+#undef setlocale
 
 // STL includes
 #include <vector>
@@ -66,12 +67,16 @@ using namespace std;
 #include "ms_atl.h"
 #include <objbase.h>
 
+#if !defined(ENABLE_NLS)
+#define setlocale(p, d)
+#endif
+
 #ifdef HAVE_STRSAFE_H
 // Used for safe string manipulation
 #include <strsafe.h>
 #endif
 
-#include "../../lib/winapi.h"
+
 
 class IXMLDOMDocument;
 
@@ -79,9 +84,9 @@ class IXMLDOMDocument;
    #pragma message("compile VSS for Windows XP")   
    #define VSSClientGeneric VSSClientXP
    
-   #include "vss/inc/WinXP/vss.h"
-   #include "vss/inc/WinXP/vswriter.h"
-   #include "vss/inc/WinXP/vsbackup.h"
+   #include "inc/WinXP/vss.h"
+   #include "inc/WinXP/vswriter.h"
+   #include "inc/WinXP/vsbackup.h"
    
    /* In VSSAPI.DLL */
    typedef HRESULT (STDAPICALLTYPE* t_CreateVssBackupComponents)(OUT IVssBackupComponents **);
@@ -97,9 +102,9 @@ class IXMLDOMDocument;
    #pragma message("compile VSS for Windows 2003")
    #define VSSClientGeneric VSSClient2003
    
-   #include "vss/inc/Win2003/vss.h"
-   #include "vss/inc/Win2003/vswriter.h"
-   #include "vss/inc/Win2003/vsbackup.h"
+   #include "inc/Win2003/vss.h"
+   #include "inc/Win2003/vswriter.h"
+   #include "inc/Win2003/vsbackup.h"
    
    /* In VSSAPI.DLL */
    typedef HRESULT (STDAPICALLTYPE* t_CreateVssBackupComponents)(OUT IVssBackupComponents **);
@@ -133,7 +138,7 @@ inline wstring AppendBackslash(wstring str)
 // Get the unique volume name for the given path
 inline wstring GetUniqueVolumeNameForPath(wstring path)
 {
-    if (!path.length() > 0) {
+    if (path.length() <= 0) {
        return L"";
     }
 
@@ -348,7 +353,7 @@ BOOL VSSClientGeneric::WaitAndCheckForAsyncOperation(IVssAsync* pAsync)
 #ifdef DEBUG
    // Check if the async operation succeeded...
    if(hrReturned != VSS_S_ASYNC_FINISHED) {   
-      Pwchar_t pwszBuffer = NULL;
+      wchar_t *pwszBuffer = NULL;
       DWORD dwRet = ::FormatMessageW(
                         FORMAT_MESSAGE_ALLOCATE_BUFFER 
                         | FORMAT_MESSAGE_FROM_SYSTEM 
index fcab7be0c7f389536bd207732e88be2bca0898ee..f84244bf8ec507f6672f57f3fe37509ca1392bf2 100644 (file)
 /* _("...") macro returns a wxChar*, so if we need a char*, we need to convert it with:
  * wxString(_("...")).mb_str(*wxConvCurrent) */
 
-#include <wx/intl.h>
-
 #include "bacula.h"
 #include "console_conf.h"
 #include "jcr.h"
 
+#include <wx/intl.h>
+
 #include "csprint.h"
 
 void senditf(char *fmt, ...);
index 7be2c3ec021cdd69f4682c01c6038a576b3eca04..678dcf411f64aca6ca1351d908c54723bff0195a 100644 (file)
 /* _("...") macro returns a wxChar*, so if we need a char*, we need to convert it with:
  * wxString(_("...")).mb_str(*wxConvCurrent) */
 
-#include <wx/intl.h>
-
 #include "bacula.h"
 #include "console_conf.h"
 
+#include <wx/intl.h>
+
 /* Define the first and last resource ID record
  * types. Note, these should be unique for each
  * daemon though not a requirement.
index dc4b2ccaadd9595e773b8152258ea859f9c3857f..3898f4c56e3e45d5a2b26973ea0b27bace90508f 100644 (file)
@@ -26,6 +26,9 @@
 /* _("...") macro returns a wxChar*, so if we need a char*, we need to convert it with:
  * wxString(_("...")).mb_str(*wxConvCurrent) */
 
+#include "bacula.h"
+#include "console_conf.h"
+
 #include "console_thread.h" // class's header file
 
 #include <wx/wxprec.h>
 #include <wx/thread.h>
 #include <wx/file.h>
 
-#include "console_conf.h"
-
 #include "csprint.h"
 
 #ifdef HAVE_WIN32
-#include <windows.h>
 char OK_msg[]   = "2000 OK\n";
 char TERM_msg[] = "2999 Terminate\n";
 #endif
index 5dae9b5d8365695392529d4526aa3d9c52052b66..22bb92e6b59be0daad750687be1f4e10b71688d0 100644 (file)
@@ -29,7 +29,7 @@
 // headers
 // ----------------------------------------------------------------------------
 
-#include "config.h"
+#include "bacula.h"
 
 #include <wx/wxprec.h>
 #include <wx/config.h>
@@ -39,8 +39,6 @@
 
 #include "csprint.h"
 
-void InitWinAPIWrapper();
-
 /* Dummy functions */
 int generate_daemon_event(JCR *jcr, const char *event) { return 1; }
 int generate_job_event(JCR *jcr, const char *event) { return 1; }
@@ -77,7 +75,7 @@ bool MyApp::OnInit()
 
    long posx, posy, sizex, sizey;
    int displayx, displayy;
-   InitWinAPIWrapper();
+   OSDependentInit();
    wxConfig::Get()->Read(wxT("/Position/X"), &posx, 50);
    wxConfig::Get()->Read(wxT("/Position/Y"), &posy, 50);
    wxConfig::Get()->Read(wxT("/Size/Width"), &sizex, 780);
@@ -109,7 +107,3 @@ bool MyApp::OnInit()
    
    return TRUE;
 }
-
-#ifndef HAVE_WIN32
-void InitWinAPIWrapper() { };
-#endif
index 7ea7ccf7f14aa842b8f43807a1750dd2df006969..de89f16c64c8cbe31d6ecee88ed4d3d69fb256ad 100644 (file)
@@ -21,6 +21,8 @@
 
  */
 
+#include "bacula.h"
+
 #include "wxbconfigfileeditor.h"
 
 #include <wx/file.h>
index 8cce34fa888296b126237eabe2bc62e846e077b7..3e35dca3e576f313090b24a310619682d433873b 100644 (file)
@@ -21,6 +21,8 @@
 
  */
 
+#include "bacula.h"
+
 #include "wxbconfigpanel.h"
 
 #include <wx/arrimpl.cpp>
index 56e90ee04f79a7b9784b9907763701c5125d770e..88da7d80a0f85d4357d5a7acc9fa74fc8d5dcd52 100644 (file)
@@ -20,7 +20,9 @@
    the file LICENSE for additional details.
 
  */
+
+#include "bacula.h"
+
 #include "wxbhistorytextctrl.h"
 
 BEGIN_EVENT_TABLE(wxbHistoryTextCtrl, wxTextCtrl)
index 0e13ffe7a45c3321e14a1dd149428c2b36b401d6..b0beb57b526fda231d28533a1579f88639f4b0eb 100644 (file)
@@ -22,6 +22,8 @@
 
  */
 
+#include "bacula.h"
+
 #include "wxblistctrl.h"
 
 #include "csprint.h"
index e9550f28a6f08097e53bc0ad31fb72ce6e3d6899..61a25cde12610547b9b44cdf2bf36d3572b991b3 100644 (file)
@@ -21,6 +21,8 @@
 
  */
 
+#include "bacula.h"
+
 #include "wxbmainframe.h" // class's header file
 
 #include "wxbrestorepanel.h"
index 94d74d92ec70b8ce522eb66db36b1a90b2d4e0b0..97d37dc156e6fce53dcb8024b1320cf8ef4c910f 100644 (file)
@@ -49,6 +49,8 @@ Parameters to modify:
 Select parameter to modify (1-11):
        */
 
+#include "bacula.h"
+
 #include "wxbrestorepanel.h"
 
 #include "wxbmainframe.h"
index e4139fa39f19435436f33aa2634e4e0eb9ded643..3857fdfcc256c7781ffe9e21ee68ba07aa5b2dcb 100644 (file)
@@ -28,6 +28,8 @@
 
  */
 
+#include "bacula.h"
+
 #include "wxbtableparser.h" // class's header file
 
 #include "csprint.h"
index ddfc1f1518fcee3bf7b2ac2af29101a9203990f5..23f416b383334e1fdf66fb50573c1f64b0a43909 100644 (file)
@@ -20,7 +20,9 @@
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
    the file LICENSE for additional details.
 
- */
+*/
+
+#include "bacula.h"
 
 #include "wxbtreectrl.h"
 
index fb6841899f10a1b417bd5bab05ac02d62dc41498..7af8e1a8bf3369cc508c15d964a70b12a42dd066 100644 (file)
@@ -21,6 +21,8 @@
 
  */
 
+#include "bacula.h"
+
 #include "wxbutils.h"
 
 #include "wxbmainframe.h"