From: Kern Sibbald Date: Wed, 26 Nov 2008 17:59:54 +0000 (+0000) Subject: Fix win32 build, not without some pain X-Git-Tag: Release-3.0.0~542 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=32225a1ca4daec549e2f0d310545ffd5a5fc99ac;p=bacula%2Fbacula Fix win32 build, not without some pain git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8088 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/filed/job.c b/bacula/src/filed/job.c index 8d0cf550e4..e258fce8ad 100644 --- a/bacula/src/filed/job.c +++ b/bacula/src/filed/job.c @@ -1267,7 +1267,7 @@ static int level_cmd(JCR *jcr) goto bail_out; } since_time = str_to_uint64(buf); /* this is the since time */ - Dmsg1(100, "since_time=%d\n", (int)since_time); + Dmsg1(100, "since_time=%lld\n", since_time); char ed1[50], ed2[50]; /* * Sync clocks by polling him for the time. We take @@ -1309,10 +1309,10 @@ static int level_cmd(JCR *jcr) } dir->signal(BNET_EOD); - Dmsg2(100, "adj = %d since_time=%d\n", (int)adj, (int)since_time); + Dmsg2(100, "adj = %d since_time=%lld\n", (int)adj, since_time); jcr->incremental = 1; /* set incremental or decremental backup */ - jcr->mtime = (time_t)since_time; /* set since time */ - generate_plugin_event(jcr, bEventSince, (void *)jcr->mtime); + jcr->mtime = since_time; /* set since time */ + generate_plugin_event(jcr, bEventSince, (void *)(time_t)jcr->mtime); } else { Jmsg1(jcr, M_FATAL, 0, _("Unknown backup level: %s\n"), level); free_memory(level); diff --git a/bacula/src/filed/status.c b/bacula/src/filed/status.c index aa55a87323..4ee3c13685 100644 --- a/bacula/src/filed/status.c +++ b/bacula/src/filed/status.c @@ -340,8 +340,8 @@ static void sendit(const char *msg, int len, STATUS_PKT *sp) { if (sp->bs) { BSOCK *user = sp->bs; - - pm_memcpy(user->msg, msg, len+1); + user->msg = check_pool_memory_size(user->msg, len+1); + memcpy(user->msg, msg, len+1); user->msglen = len+1; user->send(); } else { diff --git a/bacula/src/lib/mem_pool.h b/bacula/src/lib/mem_pool.h index abb4daeba3..942e3cd45b 100644 --- a/bacula/src/lib/mem_pool.h +++ b/bacula/src/lib/mem_pool.h @@ -107,13 +107,15 @@ int pm_strcat(POOLMEM **pm, const char *str); int pm_strcat(POOLMEM *&pm, const char *str); int pm_strcat(POOL_MEM &pm, const char *str); int pm_strcat(POOLMEM *&pm, POOL_MEM &str); + int pm_strcpy(POOLMEM **pm, const char *str); int pm_strcpy(POOLMEM *&pm, const char *str); int pm_strcpy(POOL_MEM &pm, const char *str); int pm_strcpy(POOLMEM *&pm, POOL_MEM &str); -int pm_memcpy(POOLMEM **pm, const void *data, size_t n); -int pm_memcpy(POOLMEM *&pm, const void *data, size_t n); -int pm_memcpy(POOL_MEM &pm, const void *data, size_t n); + +int pm_memcpy(POOLMEM **pm, const char *data, size_t n); +int pm_memcpy(POOLMEM *&pm, const char *data, size_t n); +int pm_memcpy(POOL_MEM &pm, const char *data, size_t n); int pm_memcpy(POOLMEM *&pm, POOL_MEM &data, size_t n); #endif diff --git a/bacula/src/win32/compat/compat.h b/bacula/src/win32/compat/compat.h index e79ef5419f..4dced17c19 100644 --- a/bacula/src/win32/compat/compat.h +++ b/bacula/src/win32/compat/compat.h @@ -106,6 +106,7 @@ typedef UINT32 uid_t; typedef UINT32 gid_t; typedef UINT32 mode_t; typedef INT32 ssize_t; +typedef UINT32 size_t; #define HAVE_SSIZE_T 1 #endif /* HAVE_MINGW */ diff --git a/bacula/src/win32/dll/bacula.def b/bacula/src/win32/dll/bacula.def index e3c28296a2..f029780ee5 100644 --- a/bacula/src/win32/dll/bacula.def +++ b/bacula/src/win32/dll/bacula.def @@ -559,6 +559,10 @@ _Z9pm_strcpyPPcPKc _Z9pm_strcpyR8POOL_MEMPKc _Z9pm_strcpyRPcPKc _Z9pm_strcpyRPcR8POOL_MEM +_Z9pm_memcpyPPcPKvj +_Z9pm_memcpyR8POOL_MEMPKvj +_Z9pm_memcpyRPcPKvj +_Z9pm_memcpyRPcR8POOL_MEMj _ZN8POOL_MEM10realloc_pmEi _ZN8POOL_MEM6strcatEPKc _ZN8POOL_MEM6strcpyEPKc @@ -576,6 +580,7 @@ _Z16dispatch_messageP3JCRixPc _Z16init_console_msgPKc _Z25register_message_callbackPFviPcE _Z4JmsgP3JCRixPKcz +_Z4MmsgPPcPKcz _Z4MmsgR8POOL_MEMPKcz _Z4MmsgRPcPKcz _Z4QmsgP3JCRixPKcz diff --git a/bacula/src/win32/filed/Makefile b/bacula/src/win32/filed/Makefile index 8d12c955df..5f26293880 100644 --- a/bacula/src/win32/filed/Makefile +++ b/bacula/src/win32/filed/Makefile @@ -51,6 +51,7 @@ FILED_OBJS = \ $(OBJDIR)/service.o \ $(OBJDIR)/statusDialog.o \ $(OBJDIR)/trayMonitor.o \ + $(OBJDIR)/xattr.o \ $(OBJDIR)/main.o \ $(OBJDIR)/bacula.res