1 Index: src/win32/filed/vss.cpp
2 ===================================================================
3 --- src/win32/filed/vss.cpp (révision 8323)
4 +++ src/win32/filed/vss.cpp (copie de travail)
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 (révision 8323)
17 +++ src/win32/filed/Makefile (copie de travail)
27 Index: src/win32/Makefile
28 ===================================================================
29 --- src/win32/Makefile (révision 8323)
30 +++ src/win32/Makefile (copie de travail)
37 Index: src/win32/compat/compat.cpp
38 ===================================================================
39 --- src/win32/compat/compat.cpp (révision 8323)
40 +++ src/win32/compat/compat.cpp (copie de travail)
45 -fstat(int fd, struct stat *sb)
46 +fstat(intptr_t fd, struct stat *sb)
48 BY_HANDLE_FILE_INFORMATION info;
54 - rval = fstat((int)h, sb);
55 + rval = fstat((intptr_t)h, sb);
58 if (attr & FILE_ATTRIBUTE_DIRECTORY &&
60 // process terminates we can
62 // ugly but convert WIN32 HANDLE to FILE*
63 - int rfd = _open_osfhandle((long)hChildStdoutRdDup, O_RDONLY | O_BINARY);
64 + int rfd = _open_osfhandle((intptr_t)hChildStdoutRdDup, O_RDONLY | O_BINARY);
66 bpipe->rfd = _fdopen(rfd, "rb");
69 CloseHandle(hChildStdinRd); // close our read side so as not
70 // to interfre with child's copy
71 // ugly but convert WIN32 HANDLE to FILE*
72 - int wfd = _open_osfhandle((long)hChildStdinWrDup, O_WRONLY | O_BINARY);
73 + int wfd = _open_osfhandle((intptr_t)hChildStdinWrDup, O_WRONLY | O_BINARY);
75 bpipe->wfd = _fdopen(wfd, "wb");
77 Index: src/win32/compat/compat.h
78 ===================================================================
79 --- src/win32/compat/compat.h (révision 8323)
80 +++ src/win32/compat/compat.h (copie de travail)
87 +#define _declspec __declspec
91 +# define GWL_USERDATA GWLP_USERDATA
94 typedef UINT64 u_int64_t;
95 typedef UINT64 uint64_t;
96 typedef INT64 int64_t;
100 #if !defined(_MSC_VER) || (_MSC_VER < 1400) // VC8+
101 -typedef long time_t;
102 +#ifndef _TIME_T_DEFINED
103 +#define _TIME_T_DEFINED
104 + typedef long time_t;
108 #if __STDC__ && !defined(HAVE_MINGW)
109 typedef _dev_t dev_t;
110 @@ -129,10 +141,15 @@
114 +#ifndef _TIMEZONE_DEFINED /* also in sys/time.h */
115 +#define _TIMEZONE_DEFINED
123 int strcasecmp(const char*, const char *);
124 int gettimeofday(struct timeval *, struct timezone *);
126 @@ -244,10 +261,12 @@
127 ssize_t win32_write(int fd, const void *buffer, size_t count);
128 int win32_ioctl(int fd, unsigned long int req, ...);
131 +#if !defined(MINGW64)
135 int fcntl(int fd, int cmd, long arg);
136 -int fstat(int fd, struct stat *sb);
137 +int fstat(intptr_t fd, struct stat *sb);
139 int inet_aton(const char *cp, struct in_addr *inp);
140 int kill(int pid, int signo);
142 #define snprintf _snprintf
146 +int utime(const char *filename, struct utimbuf *buf);
150 #define WIFEXITED(x) 0
151 Index: src/win32/compat/print.cpp
152 ===================================================================
153 --- src/win32/compat/print.cpp (révision 8323)
154 +++ src/win32/compat/print.cpp (copie de travail)
157 strvalue = (char *) va_arg(args, void *);
158 flags |= DP_F_UNSIGNED;
159 - fmtint(buffer, &currlen, maxlen, (long) strvalue, 16, min, max,
160 + fmtint(buffer, &currlen, maxlen, (INT64) strvalue, 16, min, max,
164 Index: src/win32/libwin32/statusDialog.cpp
165 ===================================================================
166 --- src/win32/libwin32/statusDialog.cpp (révision 8323)
167 +++ src/win32/libwin32/statusDialog.cpp (copie de travail)
171 SendMessage(statDlg->m_textWin, EM_SETSEL, (WPARAM)-1, (LPARAM)-1);
172 - SendMessage(statDlg->m_textWin, EM_REPLACESEL, 0, (LONG)"\r\n");
173 + SendMessage(statDlg->m_textWin, EM_REPLACESEL, 0, (LPARAM)"\r\n");
179 if (show && !m_visible) {
180 DialogBoxParam(appInstance, MAKEINTRESOURCE(IDD_STATUS), NULL,
181 - (DLGPROC)dialogProc, (LONG)this);
182 + (DLGPROC)dialogProc, (LPARAM)this);
186 Index: src/win32/libwin32/bacula.rc
187 ===================================================================
188 --- src/win32/libwin32/bacula.rc (révision 8323)
189 +++ src/win32/libwin32/bacula.rc (copie de travail)
190 @@ -104,15 +104,14 @@
193 IDD_ABOUT DIALOG 0, 0, 250, 145
194 -STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
195 CAPTION "About Bacula"
196 FONT 8, "MS Sans Serif"
198 - DEFPUSHBUTTON "OK",IDOK,190,120,50,15
199 +// DEFPUSHBUTTON "OK",IDOK,190,120,50,15
200 // CONTROL "\3", IDC_BACULABMP,"Static",SS_ICON | SS_CENTERIMAGE |
201 // SS_SUNKEN,7,5,73,65
203 - CONTROL IDB_BACULABMP,IDB_BACULABMP,"Static",SS_BITMAP|SS_SUNKEN,7,5,32,32
204 +// CONTROL IDB_BACULABMP,IDB_BACULABMP,"Static",SS_BITMAP|SS_SUNKEN,7,5,32,32
207 LTEXT " by Kern Sibbald",-1,134,38,78,10
208 @@ -132,10 +131,10 @@
211 IDD_STATUS DIALOGEX 0, 0, 411, 244
212 -STYLE DS_SETFONT | DS_3DLOOK | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
213 +//STYLE DS_SETFONT | DS_3DLOOK | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
214 CAPTION "Bacula Status"
215 FONT 8, "Courier New"
217 - DEFPUSHBUTTON "&OK",IDOK,355,5,51,15
218 - EDITTEXT IDC_TEXTDISPLAY, 2, 2, 350, 240, WS_VSCROLL | WS_HSCROLL | WS_BORDER | ES_READONLY | ES_MULTILINE
219 +// DEFPUSHBUTTON "&OK",IDOK,355,5,51,15
220 +// EDITTEXT IDC_TEXTDISPLAY, 2, 2, 350, 240, WS_VSCROLL | WS_HSCROLL | WS_BORDER | ES_READONLY | ES_MULTILINE
222 Index: src/win32/libwin32/main.cpp
223 ===================================================================
224 --- src/win32/libwin32/main.cpp (révision 8323)
225 +++ src/win32/libwin32/main.cpp (copie de travail)
230 -#define _WIN32_IE 0x0401
231 +#define _WIN32_IE 0x0501
233 #define _WIN32_WINNT 0x0501
234 #include <commctrl.h>
235 Index: src/win32/libwin32/trayMonitor.cpp
236 ===================================================================
237 --- src/win32/libwin32/trayMonitor.cpp (révision 8323)
238 +++ src/win32/libwin32/trayMonitor.cpp (copie de travail)
242 /* Save our class pointer */
243 - SetWindowLong(m_hwnd, GWL_USERDATA, (LONG)this);
244 + SetWindowLong(m_hwnd, GWL_USERDATA, (LPARAM)this);
247 // Load the icons for the tray
248 Index: src/win32/libwin32/aboutDialog.cpp
249 ===================================================================
250 --- src/win32/libwin32/aboutDialog.cpp (révision 8323)
251 +++ src/win32/libwin32/aboutDialog.cpp (copie de travail)
254 if (show && !m_visible) {
255 DialogBoxParam(appInstance, MAKEINTRESOURCE(IDD_ABOUT), NULL,
256 - (DLGPROC)DialogProc, (LONG)this);
257 + (DLGPROC)DialogProc, (LPARAM)this);
260 Index: src/win32/Makefile.inc.in
261 ===================================================================
262 --- src/win32/Makefile.inc.in (révision 8323)
263 +++ src/win32/Makefile.inc.in (copie de travail)
266 # Global Configuration
271 # Main Bacula source dir
272 MAINDIR := @WIN32MAINDIR@
274 AR := $(MINGW_BIN)/mingw32-ar
275 RANLIB := $(MINGW_BIN)/mingw32-ranlib
276 WINDRES := $(MINGW_BIN)/mingw32-windres
277 -DLLTOOL := $(MINGW_BIN)/../mingw32/bin/dlltool
278 +DLLTOOL := $(MINGW_BIN)/mingw32-dlltool
279 OBJCPY := $(MINGW_BIN)/mingw32-objcopy
280 NSIS_DIR := $(DEPKGS)/nsis
281 STAB2CV := $(DEPKGS)/tools/bin/stab2cv
283 -CFLAGS := -g -Wall -mno-cygwin -m32 -mwin32 -mthreads -O3 -fno-strict-aliasing
284 +CFLAGS := -g -Wall -mno-cygwin -mthreads -O3 -fno-strict-aliasing
285 LDFLAGS := -g -Wall -mno-cygwin -Wl,--disable-auto-import
287 INCLUDE_DDK := -I$(MINGW_INCLUDE)/ddk
288 Index: src/win32/dll/bacula.def
289 ===================================================================
290 --- src/win32/dll/bacula.def (révision 8323)
291 +++ src/win32/dll/bacula.def (copie de travail)
293 _Z18CreateChildProcessPKcPvS1_S1_
294 _Z18GetApplicationNamePKcPPcPS0_
295 _Z18cvt_ftime_to_utimeRK9_FILETIME
296 -_Z18cvt_utime_to_ftimeRKlR9_FILETIME
297 _Z18unix_name_to_win32PPcS_
298 _Z21Win32ConvCleanupCachev
299 _Z21make_wchar_win32_pathPcPi
309 _Z19dbg_plugin_add_hookPFvP6PluginP6_iobufE
312 -_Z10__snprintfPcjPKcz
313 _Z10__vsprintfPcPKcS_
314 -_Z11__vsnprintfPcjPKcS_
315 -_Z4doprPcjPKcS_PFvS_PjjiE
320 _Z14set_attributesP3JCRP4ATTRP5BFILE
321 _Z16encode_attribsExP3JCRPcP6FF_PKT
322 _Z18select_data_streamP6FF_PKT
329 _Z9win_errorP3JCRPcS1_
333 _Z18is_portable_backupP5BFILE
334 _Z19set_portable_backupP5BFILE
335 _Z14set_cmd_pluginP5BFILEP3JCR
336 -_Z26processWin32BackupAPIBlockP5BFILEPvl
337 _Z27is_restore_stream_supportedi
348 _Z13is_in_filesetP6FF_PKT
350 _Z15term_find_filesP6FF_PKT
351 -_Z16set_find_optionsP6FF_PKTil
352 _Z22get_win32_drivelettersP6FF_PKTPc
353 _Z25set_find_changed_functionP6FF_PKTPFbP3JCRS0_E
356 _ZN7BREGEXP7replaceEPKc
359 -_Z24re_registers_to_regmatchP12re_registersP12b_regmatch_tj
361 b_re_compile_initialize
363 @@ -298,12 +282,10 @@
367 -_ZN5BSOCK5_openEP3JCRPKcPcS4_ixPi
371 _ZN5BSOCK7connectEP3JCRixxPKcPcS4_ii
372 -_ZN5BSOCK7despoolEPFvlEl
374 _ZN5BSOCK8fin_initEP3JCRiPKcS3_iP8sockaddr
375 _ZN5BSOCK8get_peerEPci
377 _ZN5BSOCK9wait_dataEii
382 _Z15create_pid_filePcPKci
383 _Z15delete_pid_filePcPKci
394 _Z8bstrncatPcR8POOL_MEMi
397 _Z17date_time_compareP9date_timeS0_
398 _Z17get_current_btimev
403 _Z9tm_decodeP9date_timeP2tm
405 _Z16stop_bsock_timerP8btimer_t
406 _Z16stop_child_timerP8btimer_t
407 _Z17start_bsock_timerP5BSOCKj
408 -_Z17start_child_timerP3JCRij
409 _Z17stop_thread_timerP8btimer_t
410 _Z18start_thread_timerP3JCRP10pthread_t_j
412 Index: src/win32/dll/Makefile
413 ===================================================================
414 --- src/win32/dll/Makefile (révision 8323)
415 +++ src/win32/dll/Makefile (copie de travail)
425 Index: src/lib/message.c
426 ===================================================================
427 --- src/lib/message.c (révision 8323)
428 +++ src/lib/message.c (copie de travail)
429 @@ -370,10 +370,10 @@
432 Mmsg(name, "%s/%s.%s.%d.mail", working_directory, my_name,
433 - jcr->Job, (int)(long)d);
434 + jcr->Job, (int)(intptr_t)d);
436 Mmsg(name, "%s/%s.%s.%d.mail", working_directory, my_name,
437 - my_name, (int)(long)d);
438 + my_name, (int)(intptr_t)d);
440 Dmsg1(850, "mailname=%s\n", name);
442 Index: src/lib/smartall.c
443 ===================================================================
444 --- src/lib/smartall.c (révision 8323)
445 +++ src/lib/smartall.c (copie de travail)
447 head->ablineno = (sm_ushort)lineno;
448 head->abin_use = true;
449 /* Emplace end-clobber detector at end of buffer */
450 - buf[nbytes - 1] = (uint8_t)((((long) buf) & 0xFF) ^ 0xC5);
451 + buf[nbytes - 1] = (uint8_t)((((intptr_t) buf) & 0xFF) ^ 0xC5);
452 buf += HEAD_SIZE; /* Increment to user data start */
453 if (++sm_buffers > sm_max_buffers) {
454 sm_max_buffers = sm_buffers;
456 allocated space in the buffer by comparing the end of buffer
457 checksum with the address of the buffer. */
459 - if (((unsigned char *)cp)[head->ablen - 1] != ((((long) cp) & 0xFF) ^ 0xC5)) {
460 + if (((unsigned char *)cp)[head->ablen - 1] != ((((intptr_t) cp) & 0xFF) ^ 0xC5)) {
462 Emsg2(M_ABORT, 0, _("Buffer overrun called from %s:%d\n"), file, line);
467 if (((unsigned char *) ap)[((struct abufhead *)ap)->ablen - 1] !=
468 - ((((long) ap) & 0xFF) ^ 0xC5)) {
469 + ((((intptr_t) ap) & 0xFF) ^ 0xC5)) {