From: Kern Sibbald Date: Sun, 7 Mar 2010 11:24:22 +0000 (+0100) Subject: Tweak: win32 bpipe X-Git-Tag: Release-5.2.1~1630 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8f09b8092ca8032b73e7704015690e5b86e0d5b3;p=bacula%2Fbacula Tweak: win32 bpipe --- diff --git a/bacula/src/win32/filed/Makefile b/bacula/src/win32/filed/Makefile index 32cc1c0534..7a2694ba5d 100644 --- a/bacula/src/win32/filed/Makefile +++ b/bacula/src/win32/filed/Makefile @@ -5,7 +5,13 @@ # Written by Robert Nelson, June 2006 # -include ../Makefile.inc +# +# Change the following depending on where this directory is located +# in the Bacula tree. It should point to the src/win32 directory. +BUILDDIR = .. + + +include $(BUILDDIR)/Makefile.inc INCLUDES = \ -I. \ @@ -87,9 +93,9 @@ clean: $(BINDIR)/bacula-fd.exe: $(FILED_OBJS) $(LIBS_BACULA) $(call link_winapp,$(FILED_LIBS)) -$(OBJDIR)/winres.res: ../libwin32/winres.rc +$(OBJDIR)/winres.res: $(BUILDDIR)/libwin32/winres.rc @echo "Compiling $@" $(call checkdir,$@) $(ECHO_CMD)$(WINDRES) $(INCLUDE_ICONS) -O coff $< -o $@ -include ../Makefile.rules +include $(BUILDDIR)/Makefile.rules diff --git a/bacula/src/win32/filed/plugins/Makefile b/bacula/src/win32/filed/plugins/Makefile index 700e908eb2..e77e714abe 100644 --- a/bacula/src/win32/filed/plugins/Makefile +++ b/bacula/src/win32/filed/plugins/Makefile @@ -105,11 +105,10 @@ $(BINDIR)/systemstate-fd.dll: $(SYSTEMSTATE_OBJS) systemstate-fd.def $(BINDIR)/bpipe-fd.dll: DLL_DEFINE=BUILDING_DLL -$(BINDIR)/bpipe-fd.dll: $(BPIPE_OBJS) bpipe-fd.def +$(BINDIR)/bpipe-fd.dll: $(BPIPE_OBJS) bpipe-fd.def $(LIBS_BACULA) @echo "Linking $@" $(call checkdir,$@) - $(ECHO_CMD)$(CXX) $(LDFLAGS) -mdll -mwindows -Wl,--out-implib,$(OBJDIR)/bpipe-fd.a $^ $(LIBS_DLL) -o $@ - + $(ECHO_CMD)$(CXX) $(CFLAGS) $(LDFLAGS) -mdll -mwindows -Wl,--out-implib,$(OBJDIR)/bpipe-fd.a $^ $(LIBS_DLL) -o $@ include $(BUILDDIR)/Makefile.rules diff --git a/bacula/src/win32/filed/plugins/bpipe-fd.c b/bacula/src/win32/filed/plugins/bpipe-fd.c index 1c98a751c9..be61fa3e5d 100644 --- a/bacula/src/win32/filed/plugins/bpipe-fd.c +++ b/bacula/src/win32/filed/plugins/bpipe-fd.c @@ -301,7 +301,7 @@ static bRC startBackupFile(bpContext *ctx, struct save_pkt *sp) sp->statp.st_ctime = now; sp->statp.st_mtime = now; sp->statp.st_atime = now; - sp->statp.st_size = -1; + sp->statp.st_size = 0; sp->statp.st_blksize = 4096; sp->statp.st_blocks = 1; p_ctx->backup = true; @@ -366,7 +366,7 @@ static bRC pluginIO(bpContext *ctx, struct io_pkt *io) return bRC_Error; } } -// bmicrosleep(1,0); /* let pipe connect */ + bmicrosleep(1,0); /* let pipe connect */ break; case IO_READ: