[wdk] fix _fseeki64 could not be located in msvcrt.dll on XP

* Closes #162
* Also remove unwanted SetThreadLocale() in rufus.c
This commit is contained in:
Pete Batard 2013-07-21 20:56:20 +01:00
parent b24347d47e
commit 0defc28b09
3 changed files with 20 additions and 14 deletions

View File

@ -29,13 +29,26 @@
/* Define to 1 if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
/* Define to 1 if you have the `lseek64' function. */
#define HAVE_LSEEK64 1
/* The equivalent of lseek64 on MSVC is _lseeki64 */
#define lseek64 _lseeki64
/* Define to 1 if you have the `fseeko' function. */
/* #undef HAVE_FSEEKO */
/* Define to 1 if you have the `fseeko64' function. */
#define HAVE_FSEEKO64 1
/* The equivalent of fseeko64 for MSVC is _fseeki64 */
#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 <windows.h>
#include <stdio.h>
#include <io.h>
static __inline int fseeko64(FILE *stream, __int64 offset, int origin) {
return (lseek64(_fileno(stream), offset, origin) == -1L)?-1:0;
}
#else
#define fseeko64 _fseeki64
#endif
@ -58,11 +71,6 @@
/* Define to 1 if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
/* Define to 1 if you have the `lseek64' function. */
#define HAVE_LSEEK64 1
/* The equivalent of lseek64 on MSVC is _lseeki64 */
#define lseek64 _lseeki64
/* Define to 1 if you have the `lstat' function. */
/* #undef HAVE_LSTAT */

View File

@ -1930,8 +1930,6 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
uprintf("*** " APPLICATION_NAME " init ***\n");
SetThreadLocale(MAKELCID(LANG_FRENCH, SUBLANG_FRENCH));
// Reattach the console, if we were started from commandline
if (AttachConsole(ATTACH_PARENT_PROCESS) != 0) {
attached_console = TRUE;

View File

@ -30,7 +30,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDD_DIALOG DIALOGEX 12, 12, 206, 329
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW
CAPTION "Rufus v1.3.4.272"
CAPTION "Rufus v1.3.4.273"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "Start",IDC_START,94,291,50,14
@ -278,8 +278,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,3,4,272
PRODUCTVERSION 1,3,4,272
FILEVERSION 1,3,4,273
PRODUCTVERSION 1,3,4,273
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -296,13 +296,13 @@ BEGIN
BEGIN
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "1.3.4.272"
VALUE "FileVersion", "1.3.4.273"
VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "© 2011-2013 Pete Batard (GPL v3)"
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
VALUE "OriginalFilename", "rufus.exe"
VALUE "ProductName", "Rufus"
VALUE "ProductVersion", "1.3.4.272"
VALUE "ProductVersion", "1.3.4.273"
END
END
BLOCK "VarFileInfo"