1 Index: src/win32/filed/vss.cpp
2 ===================================================================
3 --- src/win32/filed/vss.cpp (revision 8361)
4 +++ src/win32/filed/vss.cpp (working copy)
6 const int VSSClient::GetWriterState(int nIndex)
8 alist* pV = (alist*)m_pAlistWriterState;
9 - return (int)pV->get(nIndex);
10 + return (int)(intptr_t)pV->get(nIndex);
13 void VSSClient::AppendWriterInfo(int nState, const char* pszInfo)
14 Index: src/win32/filed/Makefile
15 ===================================================================
16 --- src/win32/filed/Makefile (revision 8361)
17 +++ src/win32/filed/Makefile (working copy)
27 Index: src/win32/build-depkgs-mingw-w64
28 ===================================================================
29 --- src/win32/build-depkgs-mingw-w64 (revision 8361)
30 +++ src/win32/build-depkgs-mingw-w64 (working copy)
32 perl util/mkdef.pl 32 libeay no-static-engine >ms/libeay32.def
33 perl util/mkdef.pl 32 ssleay >ms/ssleay32.def
34 perl util/mkdef.pl crypto ssl NT update
35 - CFLAG=-I${DEPPKG_DIR}/include do_make Makefile all
36 + CFLAGS=-I${DEPPKG_DIR}/include do_make Makefile all
38 + touch lib4758cca.bad libaep.bad libatalla.bad libcswift.bad libchil.bad libgmp.bad libnuron.bad libsureware.bad libubsec.bad libcapi.bad
40 + sed -i 's/ cc/ mingw32-gcc/' crypto/comp/Makefile
41 + sed -i 's/ ar/ mingw32-ar/' crypto/comp/Makefile
42 + sed -i 's:^CFLAGS=:CFLAGS= -I${DEPPKG_DIR}/include:' crypto/comp/Makefile
43 + CFLAGS=-I${DEPPKG_DIR}/include do_make Makefile all
44 echo Installing openssl
45 do_make Makefile install_sw
47 Index: src/win32/Makefile
48 ===================================================================
49 --- src/win32/Makefile (revision 8361)
50 +++ src/win32/Makefile (working copy)
57 Index: src/win32/compat/winhost.h
58 ===================================================================
59 --- src/win32/compat/winhost.h (revision 8361)
60 +++ src/win32/compat/winhost.h (working copy)
63 #define HOST_OS "Linux"
64 #define DISTNAME "Cross-compile"
66 +#define DISTVER "Win64"
68 #define DISTVER "Win32"
73 Index: src/win32/compat/compat.cpp
74 ===================================================================
75 --- src/win32/compat/compat.cpp (revision 8361)
76 +++ src/win32/compat/compat.cpp (working copy)
81 -fstat(int fd, struct stat *sb)
82 +fstat(intptr_t fd, struct stat *sb)
84 BY_HANDLE_FILE_INFORMATION info;
90 - rval = fstat((int)h, sb);
91 + rval = fstat((intptr_t)h, sb);
94 if (attr & FILE_ATTRIBUTE_DIRECTORY &&
96 // process terminates we can
98 // ugly but convert WIN32 HANDLE to FILE*
99 - int rfd = _open_osfhandle((long)hChildStdoutRdDup, O_RDONLY | O_BINARY);
100 + int rfd = _open_osfhandle((intptr_t)hChildStdoutRdDup, O_RDONLY | O_BINARY);
102 bpipe->rfd = _fdopen(rfd, "rb");
104 @@ -2210,7 +2210,7 @@
105 CloseHandle(hChildStdinRd); // close our read side so as not
106 // to interfre with child's copy
107 // ugly but convert WIN32 HANDLE to FILE*
108 - int wfd = _open_osfhandle((long)hChildStdinWrDup, O_WRONLY | O_BINARY);
109 + int wfd = _open_osfhandle((intptr_t)hChildStdinWrDup, O_WRONLY | O_BINARY);
111 bpipe->wfd = _fdopen(wfd, "wb");
113 @@ -2316,6 +2316,7 @@
119 utime(const char *fname, struct utimbuf *times)
121 @@ -2367,6 +2368,7 @@
129 Index: src/win32/compat/compat.h
130 ===================================================================
131 --- src/win32/compat/compat.h (revision 8361)
132 +++ src/win32/compat/compat.h (working copy)
139 +#define _declspec __declspec
143 +# define GWL_USERDATA GWLP_USERDATA
146 typedef UINT64 u_int64_t;
147 typedef UINT64 uint64_t;
148 typedef INT64 int64_t;
152 #if !defined(_MSC_VER) || (_MSC_VER < 1400) // VC8+
153 -typedef long time_t;
154 +#ifndef _TIME_T_DEFINED
155 +#define _TIME_T_DEFINED
156 + typedef long time_t;
160 #if __STDC__ && !defined(HAVE_MINGW)
161 typedef _dev_t dev_t;
162 @@ -129,10 +141,15 @@
166 +#ifndef _TIMEZONE_DEFINED /* also in sys/time.h */
167 +#define _TIMEZONE_DEFINED
175 int strcasecmp(const char*, const char *);
176 int gettimeofday(struct timeval *, struct timezone *);
178 @@ -244,10 +261,12 @@
179 ssize_t win32_write(int fd, const void *buffer, size_t count);
180 int win32_ioctl(int fd, unsigned long int req, ...);
183 +#if !defined(MINGW64)
187 int fcntl(int fd, int cmd, long arg);
188 -int fstat(int fd, struct stat *sb);
189 +int fstat(intptr_t fd, struct stat *sb);
191 int inet_aton(const char *cp, struct in_addr *inp);
192 int kill(int pid, int signo);
194 #define snprintf _snprintf
199 #define WIFEXITED(x) 0
200 #define WEXITSTATUS(x) x
201 Index: src/win32/compat/print.cpp
202 ===================================================================
203 --- src/win32/compat/print.cpp (revision 8361)
204 +++ src/win32/compat/print.cpp (working copy)
207 strvalue = (char *) va_arg(args, void *);
208 flags |= DP_F_UNSIGNED;
209 - fmtint(buffer, &currlen, maxlen, (long) strvalue, 16, min, max,
210 + fmtint(buffer, &currlen, maxlen, (INT64) strvalue, 16, min, max,
214 Index: src/win32/libwin32/statusDialog.cpp
215 ===================================================================
216 --- src/win32/libwin32/statusDialog.cpp (revision 8361)
217 +++ src/win32/libwin32/statusDialog.cpp (working copy)
221 SendMessage(statDlg->m_textWin, EM_SETSEL, (WPARAM)-1, (LPARAM)-1);
222 - SendMessage(statDlg->m_textWin, EM_REPLACESEL, 0, (LONG)"\r\n");
223 + SendMessage(statDlg->m_textWin, EM_REPLACESEL, 0, (LPARAM)"\r\n");
229 if (show && !m_visible) {
230 DialogBoxParam(appInstance, MAKEINTRESOURCE(IDD_STATUS), NULL,
231 - (DLGPROC)dialogProc, (LONG)this);
232 + (DLGPROC)dialogProc, (LPARAM)this);
236 Index: src/win32/libwin32/bacula.rc
237 ===================================================================
238 --- src/win32/libwin32/bacula.rc (revision 8361)
239 +++ src/win32/libwin32/bacula.rc (working copy)
240 @@ -104,15 +104,14 @@
243 IDD_ABOUT DIALOG 0, 0, 250, 145
244 -STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
245 CAPTION "About Bacula"
246 FONT 8, "MS Sans Serif"
248 - DEFPUSHBUTTON "OK",IDOK,190,120,50,15
249 +// DEFPUSHBUTTON "OK",IDOK,190,120,50,15
250 // CONTROL "\3", IDC_BACULABMP,"Static",SS_ICON | SS_CENTERIMAGE |
251 // SS_SUNKEN,7,5,73,65
253 - CONTROL IDB_BACULABMP,IDB_BACULABMP,"Static",SS_BITMAP|SS_SUNKEN,7,5,32,32
254 +// CONTROL IDB_BACULABMP,IDB_BACULABMP,"Static",SS_BITMAP|SS_SUNKEN,7,5,32,32
257 LTEXT " by Kern Sibbald",-1,134,38,78,10
258 @@ -132,10 +131,10 @@
261 IDD_STATUS DIALOGEX 0, 0, 411, 244
262 -STYLE DS_SETFONT | DS_3DLOOK | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
263 +//STYLE DS_SETFONT | DS_3DLOOK | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
264 CAPTION "Bacula Status"
265 FONT 8, "Courier New"
267 - DEFPUSHBUTTON "&OK",IDOK,355,5,51,15
268 - EDITTEXT IDC_TEXTDISPLAY, 2, 2, 350, 240, WS_VSCROLL | WS_HSCROLL | WS_BORDER | ES_READONLY | ES_MULTILINE
269 +// DEFPUSHBUTTON "&OK",IDOK,355,5,51,15
270 +// EDITTEXT IDC_TEXTDISPLAY, 2, 2, 350, 240, WS_VSCROLL | WS_HSCROLL | WS_BORDER | ES_READONLY | ES_MULTILINE
272 Index: src/win32/libwin32/main.cpp
273 ===================================================================
274 --- src/win32/libwin32/main.cpp (revision 8361)
275 +++ src/win32/libwin32/main.cpp (working copy)
280 -#define _WIN32_IE 0x0401
281 +#define _WIN32_IE 0x0501
283 #define _WIN32_WINNT 0x0501
284 #include <commctrl.h>
285 Index: src/win32/libwin32/trayMonitor.cpp
286 ===================================================================
287 --- src/win32/libwin32/trayMonitor.cpp (revision 8361)
288 +++ src/win32/libwin32/trayMonitor.cpp (working copy)
292 /* Save our class pointer */
293 - SetWindowLong(m_hwnd, GWL_USERDATA, (LONG)this);
294 + SetWindowLong(m_hwnd, GWL_USERDATA, (LPARAM)this);
297 // Load the icons for the tray
298 Index: src/win32/libwin32/aboutDialog.cpp
299 ===================================================================
300 --- src/win32/libwin32/aboutDialog.cpp (revision 8361)
301 +++ src/win32/libwin32/aboutDialog.cpp (working copy)
304 if (show && !m_visible) {
305 DialogBoxParam(appInstance, MAKEINTRESOURCE(IDD_ABOUT), NULL,
306 - (DLGPROC)DialogProc, (LONG)this);
307 + (DLGPROC)DialogProc, (LPARAM)this);
310 Index: src/win32/Makefile.inc.in
311 ===================================================================
312 --- src/win32/Makefile.inc.in (revision 8361)
313 +++ src/win32/Makefile.inc.in (working copy)
316 # Global Configuration
321 # Main Bacula source dir
322 MAINDIR := @WIN32MAINDIR@
324 AR := $(MINGW_BIN)/mingw32-ar
325 RANLIB := $(MINGW_BIN)/mingw32-ranlib
326 WINDRES := $(MINGW_BIN)/mingw32-windres
327 -DLLTOOL := $(MINGW_BIN)/../mingw32/bin/dlltool
328 +DLLTOOL := $(MINGW_BIN)/mingw32-dlltool
329 OBJCPY := $(MINGW_BIN)/mingw32-objcopy
330 NSIS_DIR := $(DEPKGS)/nsis
331 STAB2CV := $(DEPKGS)/tools/bin/stab2cv
333 -CFLAGS := -g -Wall -mno-cygwin -m32 -mwin32 -mthreads -O3 -fno-strict-aliasing
334 +CFLAGS := -g -Wall -mno-cygwin -mthreads -O3 -fno-strict-aliasing -DHAVE_VSS64
335 LDFLAGS := -g -Wall -mno-cygwin -Wl,--disable-auto-import
337 INCLUDE_DDK := -I$(MINGW_INCLUDE)/ddk
338 Index: src/win32/dll/bacula.def
339 ===================================================================
340 --- src/win32/dll/bacula.def (revision 8361)
341 +++ src/win32/dll/bacula.def (working copy)
343 _Z17SetVSSPathConvertPFiPKcPciEPFiPKwPwiE
344 _Z18CreateChildProcessPKcPvS1_S1_
345 _Z18GetApplicationNamePKcPPcPS0_
346 +_Z18cvt_utime_to_ftimeRKxR9_FILETIME
347 _Z18cvt_ftime_to_utimeRK9_FILETIME
348 -_Z18cvt_utime_to_ftimeRKlR9_FILETIME
349 _Z18unix_name_to_win32PPcS_
350 _Z21Win32ConvCleanupCachev
351 _Z21make_wchar_win32_pathPcPi
362 _Z19dbg_plugin_add_hookPFvP6PluginP6_iobufE
365 -_Z10__snprintfPcjPKcz
366 _Z10__vsprintfPcPKcS_
367 -_Z11__vsnprintfPcjPKcS_
368 -_Z4doprPcjPKcS_PFvS_PjjiE
369 +_Z11__vsnprintfPcyPKcS_
370 +_Z10__snprintfPcyPKcz
372 +_Z4doprPcyPKcS_PFvS_PyyiE
375 _Z17InitWinAPIWrapperv
377 _Z14set_attributesP3JCRP4ATTRP5BFILE
378 _Z16encode_attribsExP3JCRPcP6FF_PKT
379 _Z18select_data_streamP6FF_PKT
386 _Z9win_errorP3JCRPcS1_
389 @@ -109,15 +103,15 @@
390 _Z18is_portable_backupP5BFILE
391 _Z19set_portable_backupP5BFILE
392 _Z14set_cmd_pluginP5BFILEP3JCR
393 -_Z26processWin32BackupAPIBlockP5BFILEPvl
394 +_Z26processWin32BackupAPIBlockP5BFILEPvx
395 _Z27is_restore_stream_supportedi
407 _Z11create_fileP3JCRP4ATTRP5BFILEi
409 _Z13is_in_filesetP6FF_PKT
411 _Z15term_find_filesP6FF_PKT
412 -_Z16set_find_optionsP6FF_PKTil
413 +_Z16set_find_optionsP6FF_PKTix
414 _Z22get_win32_drivelettersP6FF_PKTPc
415 _Z25set_find_changed_functionP6FF_PKTPFbP3JCRS0_E
418 _ZN7BREGEXP7replaceEPKc
421 -_Z24re_registers_to_regmatchP12re_registersP12b_regmatch_tj
422 +_Z24re_registers_to_regmatchP12re_registersP12b_regmatch_ty
424 b_re_compile_initialize
426 @@ -298,12 +292,12 @@
430 -_ZN5BSOCK5_openEP3JCRPKcPcS4_ixPi
431 +_ZN5BSOCK4openEP3JCRPKcPcS4_ixPi
432 +_ZN5BSOCK7despoolEPFvxEx
436 _ZN5BSOCK7connectEP3JCRixxPKcPcS4_ii
437 -_ZN5BSOCK7despoolEPFvlEl
439 _ZN5BSOCK8fin_initEP3JCRiPKcS3_iP8sockaddr
440 _ZN5BSOCK8get_peerEPci
442 _ZN5BSOCK9wait_dataEii
448 _Z15create_pid_filePcPKci
449 _Z15delete_pid_filePcPKci
450 @@ -322,11 +316,11 @@
463 _Z8bstrncatPcR8POOL_MEMi
466 _Z17date_time_compareP9date_timeS0_
467 _Z17get_current_btimev
472 _Z9tm_decodeP9date_timeP2tm
474 _Z16stop_bsock_timerP8btimer_t
475 _Z16stop_child_timerP8btimer_t
476 _Z17start_bsock_timerP5BSOCKj
477 -_Z17start_child_timerP3JCRij
478 +_Z17start_child_timerP3JCRxj
479 _Z17stop_thread_timerP8btimer_t
480 _Z18start_thread_timerP3JCRP10pthread_t_j
482 Index: src/win32/dll/Makefile
483 ===================================================================
484 --- src/win32/dll/Makefile (revision 8361)
485 +++ src/win32/dll/Makefile (working copy)
495 Index: src/lib/message.c
496 ===================================================================
497 --- src/lib/message.c (revision 8361)
498 +++ src/lib/message.c (working copy)
499 @@ -370,10 +370,10 @@
502 Mmsg(name, "%s/%s.%s.%d.mail", working_directory, my_name,
503 - jcr->Job, (int)(long)d);
504 + jcr->Job, (int)(intptr_t)d);
506 Mmsg(name, "%s/%s.%s.%d.mail", working_directory, my_name,
507 - my_name, (int)(long)d);
508 + my_name, (int)(intptr_t)d);
510 Dmsg1(850, "mailname=%s\n", name);
512 Index: src/lib/smartall.c
513 ===================================================================
514 --- src/lib/smartall.c (revision 8361)
515 +++ src/lib/smartall.c (working copy)
517 head->ablineno = (sm_ushort)lineno;
518 head->abin_use = true;
519 /* Emplace end-clobber detector at end of buffer */
520 - buf[nbytes - 1] = (uint8_t)((((long) buf) & 0xFF) ^ 0xC5);
521 + buf[nbytes - 1] = (uint8_t)((((intptr_t) buf) & 0xFF) ^ 0xC5);
522 buf += HEAD_SIZE; /* Increment to user data start */
523 if (++sm_buffers > sm_max_buffers) {
524 sm_max_buffers = sm_buffers;
526 allocated space in the buffer by comparing the end of buffer
527 checksum with the address of the buffer. */
529 - if (((unsigned char *)cp)[head->ablen - 1] != ((((long) cp) & 0xFF) ^ 0xC5)) {
530 + if (((unsigned char *)cp)[head->ablen - 1] != ((((intptr_t) cp) & 0xFF) ^ 0xC5)) {
532 Emsg2(M_ABORT, 0, _("Buffer overrun called from %s:%d\n"), file, line);
537 if (((unsigned char *) ap)[((struct abufhead *)ap)->ablen - 1] !=
538 - ((((long) ap) & 0xFF) ^ 0xC5)) {
539 + ((((intptr_t) ap) & 0xFF) ^ 0xC5)) {