From e4bb1a6eb88d7fbb59882fa8e8054e12218d4983 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Thu, 24 Mar 2016 12:46:44 +0000 Subject: [PATCH] drop support for WDK's Windows XP targets * Die, XP, die!!! * Also fix a Coverity warning in checksum.c --- src/checksum.c | 2 +- src/libcdio/config.h | 15 +-------------- src/missing.h | 7 ------- src/rufus.c | 2 -- src/rufus.h | 6 ++++++ src/rufus.rc | 10 +++++----- src/stdlg.c | 4 ---- 7 files changed, 13 insertions(+), 33 deletions(-) diff --git a/src/checksum.c b/src/checksum.c index 9347524f..397c59c4 100644 --- a/src/checksum.c +++ b/src/checksum.c @@ -847,7 +847,7 @@ DWORD WINAPI SumThread(void* param) // gets into its next wait loop data_ready[i] = CreateEvent(NULL, FALSE, FALSE, NULL); thread_ready[i] = CreateEvent(NULL, FALSE, FALSE, NULL); - if ((data_ready == NULL) || (thread_ready[i] == NULL)) { + if ((data_ready[i] == NULL) || (thread_ready[i] == NULL)) { uprintf("Unable to create checksum thread event: %s", WindowsErrorString()); goto out; } diff --git a/src/libcdio/config.h b/src/libcdio/config.h index d5218aac..0aacce4a 100644 --- a/src/libcdio/config.h +++ b/src/libcdio/config.h @@ -39,21 +39,8 @@ /* Define to 1 if you have the `fseeko64' function. */ #define HAVE_FSEEKO64 1 -#if defined(_MSC_VER) -/* The equivalent of fseeko64 for MSVC is _fseeki64, however this */ -/* is not available on XP when build with WDK (but _lseeki64 is) */ -#if defined(DDKBUILD) -#include -#include -#include -static __inline int fseeko64(FILE *stream, __int64 offset, int origin) { - fflush(stream); /* VERY IMPORTANT! */ - return (lseek64(_fileno(stream), offset, origin) == -1LL)?-1:0; -} -#else +/* The equivalent of fseeko64 for MSVC is _fseeki64 */ #define fseeko64 _fseeki64 -#endif -#endif /* Define to 1 if you have the `ftruncate' function. */ /* #undef HAVE_FTRUNCATE */ diff --git a/src/missing.h b/src/missing.h index 3dada756..f6a5ac13 100644 --- a/src/missing.h +++ b/src/missing.h @@ -276,13 +276,6 @@ typedef unsigned int uintptr_t; /* * IFile[Open]Dialog interface for Vista and later (from MinGW headers) */ -#ifdef DDKBUILD -typedef struct _COMDLG_FILTERSPEC { - LPCWSTR pszName; - LPCWSTR pszSpec; -} COMDLG_FILTERSPEC; -#endif - #ifndef __IFileDialog_INTERFACE_DEFINED__ #define __IFileDialog_INTERFACE_DEFINED__ diff --git a/src/rufus.c b/src/rufus.c index 0d3e83d8..e2af2f71 100644 --- a/src/rufus.c +++ b/src/rufus.c @@ -2798,9 +2798,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine }; // Disable loading system DLLs from the current directory (sideloading mitigation) -#ifndef DDKBUILD // WDK doesn't know about that one SetDllDirectoryA(""); -#endif uprintf("*** " APPLICATION_NAME " init ***\n"); PF_INIT(GetTickCount64, kernel32); diff --git a/src/rufus.h b/src/rufus.h index bbf8f9ee..8c149470 100644 --- a/src/rufus.h +++ b/src/rufus.h @@ -24,6 +24,12 @@ #pragma warning(disable: 4996) // Ignore deprecated (eg. GetVersionEx()), as we have to contend with XP #pragma warning(disable: 28159) // We use GetTickCount64() where possible, but it's not available on XP #pragma warning(disable: 6258) // I know what I'm using TerminateThread for +// Burn in HELL Windows XP!!! +#ifdef DDKBUILD +#if (_WIN32_WINNT < _WIN32_WINNT_VISTA) +#error The Windows XP target is no longer supported for WDK compilation. +#endif +#endif #endif #pragma once diff --git a/src/rufus.rc b/src/rufus.rc index f710d079..25e67d5f 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 2.8.887" +CAPTION "Rufus 2.8.888" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -320,8 +320,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,8,887,0 - PRODUCTVERSION 2,8,887,0 + FILEVERSION 2,8,888,0 + PRODUCTVERSION 2,8,888,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -338,13 +338,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.8.887" + VALUE "FileVersion", "2.8.888" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", "© 2011-2016 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.8.887" + VALUE "ProductVersion", "2.8.888" END END BLOCK "VarFileInfo" diff --git a/src/stdlg.c b/src/stdlg.c index 69098919..9df22c6a 100644 --- a/src/stdlg.c +++ b/src/stdlg.c @@ -143,7 +143,6 @@ void BrowseForFolder(void) { char* tmp_path = NULL; dialog_showing++; -#ifndef DDKBUILD // WDK being uncooperative yet again... if (nWindowsVersion >= WINDOWS_VISTA) { INIT_VISTA_SHELL32; if (IS_VISTA_SHELL32_AVAILABLE) { @@ -214,7 +213,6 @@ fallback: pfod->lpVtbl->Release(pfod); } } -#endif INIT_XP_SHELL32; memset(&bi, 0, sizeof(BROWSEINFOW)); @@ -260,7 +258,6 @@ char* FileDialog(BOOL save, char* path, const ext_t* ext, DWORD options) return NULL; dialog_showing++; -#ifndef DDKBUILD if (nWindowsVersion >= WINDOWS_VISTA) { INIT_VISTA_SHELL32; filter_spec = (COMDLG_FILTERSPEC*)calloc(ext->count + 1, sizeof(COMDLG_FILTERSPEC)); @@ -341,7 +338,6 @@ fallback: pfd->lpVtbl->Release(pfd); } } -#endif memset(&ofn, 0, sizeof(ofn)); ofn.lStructSize = sizeof(ofn);