#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
/* Use our strdup with smartalloc */
-#ifndef __WXGTK__
+#ifndef HAVE_WXCONSOLE
#undef strdup
#define strdup(buf) bad_call_on_strdup_use_bstrdup(buf)
#endif
#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
#endif
#ifdef HAVE_WIN32
-#include <windows.h>
-#include "../lib/winapi.h"
#define isatty(fd) (fd==0)
#endif
signal(SIGTTIN, got_sigtin);
signal(SIGTTOU, got_sigtout);
trapctlc();
-#else
- InitWinAPIWrapper();
#endif
-
+
+ OSDependentInit();
if (argc) {
usage();
#include "dird.h"
extern DIRRES *director;
-extern char my_name[];
/* Commands sent to Storage daemon and File daemon and received
* from the User Agent */
/* Forward referenced functions */
/* External functions */
-extern int debug_level;
extern DIRRES *director;
extern int FDConnectTimeout;
extern void term_ua_server();
/* Imported variables */
-extern time_t watchdog_time;
jobq_t job_queue;
extern int r_first;
extern int r_last;
extern struct s_res resources[];
-extern char my_name[];
extern jobq_t job_queue; /* job queue */
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);
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 */
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 */
#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);
#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";
/* 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();
#define uLongf uint32_t
#endif
-extern int win32_client; /* Are we running on Windows? */
-
extern CLIENT *me; /* "Global" Client resource */
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 */
#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);
#if defined(HAVE_WIN32)
-#include <windows.h>
-
int bacstat = 0;
struct s_win32_arg {
Kern E. Sibbald, 2000
*/
+#include "bacula.h"
#include "winbacula.h"
#include "winabout.h"
+#include "winres.h"
bacAbout::bacAbout()
{
//
-// 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
/* 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);
*/
-#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);
HINSTANCE hAppInstance;
const char *szAppName = "Bacula";
DWORD mainthreadId;
-bool silent = false;
+bool silent = false;
/* Imported variables */
extern DWORD g_servicethread;
// 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);
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);
// 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
# 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 ===="
#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);
*/
#if defined(HAVE_WIN32)
-#include <windows.h>
-#include "../lib/winapi.h"
-
enum {
BF_CLOSED,
BF_READ, /* BackupRead */
#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)
{
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;
};
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 */
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);
#include "bacula.h"
#include "jcr.h"
-extern int win32_client;
ATTR *new_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] != '/') {
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] != '/') {
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);
#if defined(HAVE_WIN32)
-#include <windows.h>
-
extern UPSINFO myUPS;
extern int shm_OK;
#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
#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 */
/*
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 */
#include "bacula.h"
-extern int debug_level;
-
/* Each daemon has a slightly different set of
* resources, so it will define the following
* global values.
*/
-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
*/
-#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
}
return str;
}
-#endif
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 */
usage();
}
+ OSDependentInit();
+
working_directory = wd;
if (configfile == NULL) {
#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);
my_name_is(argc, argv, "bextract");
init_msg(NULL, NULL); /* setup message handler */
+ OSDependentInit();
+
ff = init_find_files();
binit(&bfd);
#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);
#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; }
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) {
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;
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 */
/* 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.
/* 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
*
#include "bacula.h"
#include "stored.h"
-extern int debug_level;
-
/*
* Convert a FileIndex into a printable
* ASCII string. Not reentrant.
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";
#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;
usage();
}
+ OSDependentInit();
+
for ( ;; ) {
printf("Enter regex pattern: ");
if (fgets(pat, sizeof(pat)-1, stdin) == NULL) {
usage();
}
+ OSDependentInit();
+
for ( ;; ) {
printf("Enter a wild-card: ");
if (fgets(pat, sizeof(pat)-1, stdin) == NULL) {
argc -= optind;
argv += optind;
+ OSDependentInit();
+
if (configfile) {
CAT *catalog = NULL;
int found = 0;
usage();
}
+ OSDependentInit();
+
for (i = 0; i < argc; --argc, ++argv) {
if (fstype(*argv, fs, sizeof(fs))) {
if (verbose) {
#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; }
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 \
$(LIBDIR)/bnet_server.o \
$(LIBDIR)/bpipe.o \
$(LIBDIR)/bregex.o \
+ $(LIBDIR)/bsnprintf.o \
$(LIBDIR)/bsys.o \
$(LIBDIR)/btime.o \
$(LIBDIR)/btimers.o \
$(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 $@
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)
$(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
+
# 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 .
#include "bacula.h"
#include "compat.h"
#include "jcr.h"
-#include "../../lib/winapi.h"
#include "vss.h"
#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;
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;
#define ENOMEDIUM 123
#endif
-#ifndef HAVE_WXCONSOLE
struct stat
{
_dev_t st_dev;
uint64_t st_blocks;
};
-#endif
-
#undef S_IFMT
#define S_IFMT 0170000 /* file type mask */
#undef S_IFDIR
#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_ */
/* Set to correct scanf value for long long int */
#define lld "lld"
#define llu "llu"
+/* #define USE_BSNPRINTF */
#define HAVE_STRTOLL 1
#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
-#ifndef HAVE_MINGW
-#include "compat.h"
-#else
+#if defined(__GNUC__)
#include_next <stdint.h>
#endif
+extern int ioctl(int __fd, unsigned long int __request, ...);
-#ifndef HAVE_MINGW
-#include "compat.h"
-#else
+#if defined(__GNUC__)
#include_next<unistd.h>
#endif
#ifdef WIN32_VSS
#ifdef HAVE_MINGW
-#include "compat.h"
+#include "bacula.h"
#else
#include <stdio.h>
#include <basetsd.h>
#endif
+#undef setlocale
// STL includes
#include <vector>
#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;
#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 **);
#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 **);
// Get the unique volume name for the given path
inline wstring GetUniqueVolumeNameForPath(wstring path)
{
- if (!path.length() > 0) {
+ if (path.length() <= 0) {
return L"";
}
#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
/* _("...") 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, ...);
/* _("...") 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.
/* _("...") 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
// headers
// ----------------------------------------------------------------------------
-#include "config.h"
+#include "bacula.h"
#include <wx/wxprec.h>
#include <wx/config.h>
#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; }
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);
return TRUE;
}
-
-#ifndef HAVE_WIN32
-void InitWinAPIWrapper() { };
-#endif
*/
+#include "bacula.h"
+
#include "wxbconfigfileeditor.h"
#include <wx/file.h>
*/
+#include "bacula.h"
+
#include "wxbconfigpanel.h"
#include <wx/arrimpl.cpp>
the file LICENSE for additional details.
*/
-
+
+#include "bacula.h"
+
#include "wxbhistorytextctrl.h"
BEGIN_EVENT_TABLE(wxbHistoryTextCtrl, wxTextCtrl)
*/
+#include "bacula.h"
+
#include "wxblistctrl.h"
#include "csprint.h"
*/
+#include "bacula.h"
+
#include "wxbmainframe.h" // class's header file
#include "wxbrestorepanel.h"
Select parameter to modify (1-11):
*/
+#include "bacula.h"
+
#include "wxbrestorepanel.h"
#include "wxbmainframe.h"
*/
+#include "bacula.h"
+
#include "wxbtableparser.h" // class's header file
#include "csprint.h"
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
the file LICENSE for additional details.
- */
+*/
+
+#include "bacula.h"
#include "wxbtreectrl.h"
*/
+#include "bacula.h"
+
#include "wxbutils.h"
#include "wxbmainframe.h"