From 385ee147c19d7d31aa78e0b29326854dac5b3b6b Mon Sep 17 00:00:00 2001 From: Robert Nelson Date: Wed, 11 Oct 2006 11:22:19 +0000 Subject: [PATCH] Fix MinGW build problems. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3545 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/win32/dird/Makefile | 1 + bacula/src/win32/filed/Makefile | 1 + bacula/src/win32/filed/vss_generic.cpp | 2 +- bacula/src/win32/installer/Makefile | 9 +++++++-- bacula/src/win32/installer/winbacula.nsi | 2 +- bacula/src/win32/stored/Makefile | 1 + 6 files changed, 12 insertions(+), 4 deletions(-) diff --git a/bacula/src/win32/dird/Makefile b/bacula/src/win32/dird/Makefile index 019b67eec2..9ac9599b13 100644 --- a/bacula/src/win32/dird/Makefile +++ b/bacula/src/win32/dird/Makefile @@ -17,6 +17,7 @@ INCLUDES = \ DEFINES = \ -DUSING_DLL \ -DUSING_CATS \ + -DWINVER=0x500 \ $(HAVES) vpath %.c ../../dird diff --git a/bacula/src/win32/filed/Makefile b/bacula/src/win32/filed/Makefile index e0e19dff21..b887e5c7d3 100644 --- a/bacula/src/win32/filed/Makefile +++ b/bacula/src/win32/filed/Makefile @@ -19,6 +19,7 @@ INCLUDES = \ DEFINES = \ -DUSING_DLL \ -DWIN32_VSS \ + -DWINVER=0x500 \ $(HAVES) vpath %.c ../../filed ../libwin32 diff --git a/bacula/src/win32/filed/vss_generic.cpp b/bacula/src/win32/filed/vss_generic.cpp index 2d48141a9f..f87c6d57c7 100644 --- a/bacula/src/win32/filed/vss_generic.cpp +++ b/bacula/src/win32/filed/vss_generic.cpp @@ -610,7 +610,7 @@ BOOL VSSClientGeneric::CheckWriterStatus() bstrncpy(str, "\"", sizeof(str)); wchar_2_UTF8(szBuf, bstrWriterName.p, sizeof(szBuf)); bstrncat(str, szBuf, sizeof(str)); - bstrncat(str, "\", State: 0x"); + bstrncat(str, "\", State: 0x",sizeof(str)); itoa(eWriterStatus, szBuf, sizeof(szBuf)); bstrncat(str, szBuf, sizeof(str)); bstrncat(str, " (", sizeof(str)); diff --git a/bacula/src/win32/installer/Makefile b/bacula/src/win32/installer/Makefile index 61af0e4294..9d98eec25e 100644 --- a/bacula/src/win32/installer/Makefile +++ b/bacula/src/win32/installer/Makefile @@ -94,6 +94,9 @@ SCRIPTS := \ ../cats/make_catalog_backup.cmd \ ../cats/delete_catalog_backup.cmd +SSL_FILES := \ + openssl.cnf + ########################################################################## # Targets @@ -106,7 +109,7 @@ installer: $(INSTALL_EXE) clean: @echo "Cleaning `pwd`" - $(CMD_ECHO)-rm -f $(INSTALL_EXE) $(BACULA_BINARIES) $(DEPKGS_BINARIES) $(NONGCC_BINARIES) $(NONGCC_LIBRARIES) + $(CMD_ECHO)-rm -f $(INSTALL_EXE) $(BACULA_BINARIES) $(DEPKGS_BINARIES) $(NONGCC_BINARIES) $(NONGCC_LIBRARIES) $(SSL_FILES) $(CMD_ECHO)-rm -f $(BACULA_BINARIES) $(addsuffix .dbg,$(basename $(BACULA_BINARIES))) $(CMD_ECHO)-rm -f $(DEPKGS_BINARIES) $(addsuffix .dbg,$(basename $(DEPKGS_BINARIES))) $(CMD_ECHO)-rm -f *.exe @@ -134,7 +137,9 @@ $(foreach file,$(addprefix $(DEPKGS)/lib/, $(NONGCC_LIBRARIES)),$(eval $(call Co $(foreach file,$(addprefix $(BINDIR)/, $(BACULA_BINARIES)),$(eval $(call Strip_Binary,$(file)))) -$(INSTALL_EXE): winbacula.nsi $(BACULA_BINARIES) $(SCRIPTS) $(DEPKGS_BINARIES) $(NONGCC_BINARIES) $(NONGCC_LIBRARIES) +$(foreach file,$(addprefix $(DEPKGS)/ssl/, $(SSL_FILES)),$(eval $(call Copy_Binary,$(file)))) + +$(INSTALL_EXE): winbacula.nsi $(BACULA_BINARIES) $(SCRIPTS) $(DEPKGS_BINARIES) $(NONGCC_BINARIES) $(NONGCC_LIBRARIES) $(SSL_FILES) NSISDIR=$(NSIS_DIR) \ $(NSIS_DIR)/makensis -V3 $(DEFINES) winbacula.nsi diff --git a/bacula/src/win32/installer/winbacula.nsi b/bacula/src/win32/installer/winbacula.nsi index 565076f9e7..8de4b90976 100644 --- a/bacula/src/win32/installer/winbacula.nsi +++ b/bacula/src/win32/installer/winbacula.nsi @@ -371,7 +371,7 @@ Function InstallCommonFiles File "/oname=$INSTDIR\openssl.cnf" "${DEPKGS_BIN}\..\openssl.cnf" !endif !if "${BUILD_TOOLS}" == "MinGW" - File "/oname=$INSTDIR\openssl.cnf" "${DEPKGS_BIN}\..\ssl\openssl.cnf" + File "/oname=$INSTDIR\openssl.cnf" "${DEPKGS_BIN}\openssl.cnf" !endif File "${DEPKGS_BIN}\openssl.exe" File "${BACULA_BIN}\bsleep.exe" diff --git a/bacula/src/win32/stored/Makefile b/bacula/src/win32/stored/Makefile index 937e86a9f9..3caa0f8e88 100644 --- a/bacula/src/win32/stored/Makefile +++ b/bacula/src/win32/stored/Makefile @@ -20,6 +20,7 @@ INCLUDES = \ DEFINES = \ -DUSING_DLL \ + -DWINVER=0x500 \ $(HAVES) vpath %.c ../../stored baculasd -- 2.39.5