Also fixes a minor issue in MSVC Makefile for 64x64, which tried 0x0801 for Windows 8 and 0x1001 for Windows 10. The latter would actually be 0x0A00. See https://docs.microsoft.com/de-de/cpp/porting/modifying-winver-and-win32-winn...
Also in the Makefile for 64x64, define both _WIN32 and _WIN64. See https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros
Also in the Makefile for 64x64, define both WIN32 and WIN64 because those can be used to identify the Windows platform in application code such as in processors/IA32/bochs. I am not aware of any #ifdef WIN64 at the moment. Most code uses #ifdef _WIN64 to check for that.
Note that, having defined both _WIN32 and _WIN64, code for 32-bit and 64-bit must always begin with #ifdef _WIN64 and only then #elif _WIN32.
I think that the MSVC compiler defines _WIN32 and _WIN64 automatically. Yet, now it is documented in the Makefile. You can view, comment on, or merge this pull request online at:
https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/499
-- Commit Summary --
* Bump minimal supported Windows version to Windows 8 (0x0602).
-- File Changes --
M build.win32x86/common/Makefile.msvc.tools (7) M build.win32x86/common/Makefile.tools (9) M build.win64x64/common/Makefile.msvc.tools (8) M build.win64x64/common/Makefile.tools (7) M platforms/win32/vm/sqWin32.h (41) M platforms/win32/vm/sqWin32Main.c (77)
-- Patch Links --
https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/499.patch https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/499.diff
That error on TravisCI is misleading. All builds pass.
@nicolas-cellier-aka-nice commented on this pull request.
@@ -53,16 +53,17 @@ ifdef MSVC
MEMACCESS:=-DUSE_INLINE_MEMORY_ACCESSORS=1 endif
-# Set minimum version to WindowsXP (see /cygwin/usr/include/w32api/w32api.h) -WINVER:=-D_WIN32_WINNT=0x0501 -DWINVER=0x0501 +# Set minimum version to Windows 8 (see /cygwin/usr/include/w32api/w32api.h) +WINVER:=-D_WIN32_WINNT=0x0602 -DWINVER=0x0602
As suggested on the mailing list, I would just use 0x0600
See also https://docs.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winn... for the list of _WIN32_WINNT version.
@nicolas-cellier-aka-nice commented on this pull request.
LPVOID lpFileInformation,
- DWORD dwBufferSize - ); - static pfnGetFileInformationByHandleEx pGetFileInformationByHandleEx = NULL; - if (!pGetFileInformationByHandleEx) { - pGetFileInformationByHandleEx = (pfnGetFileInformationByHandleEx) - GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "GetFileInformationByHandleEx"); - if (!pGetFileInformationByHandleEx) - return -1; - } - - nameinfo = malloc(size); - if (nameinfo == NULL) { - return -1; - } + nameinfo = alloca(size);
Why not, alloca is a bit shorter, but the pairs of malloc and free seems correct here... I'd rather consider this change as un-necessary.
@marceltaeumel pushed 2 commits.
eae037b2283c78c3efcd5192facecceb2cc35d28 Merge branch 'Cog' into marceltaeumel/patch-1 14e3dd25707d8fe6d8462d571ecee0910d54819a Revert alloca to malloc
@marceltaeumel pushed 1 commit.
7c8bea533cd00a873e4e097c1e7352677f72571c Bump min. supported version to Windows Vista (0x0600) instead of Windows 8 (0x0602), following the suggestion on the vm-dev mailing list.
wanna merge? care to first update `build.win64x64/common/Makefile.msvc.tools` ?
@eliotmiranda commented on this pull request.
@@ -53,16 +53,17 @@ ifdef MSVC
MEMACCESS:=-DUSE_INLINE_MEMORY_ACCESSORS=1 endif
-# Set minimum version to WindowsXP (see /cygwin/usr/include/w32api/w32api.h) -WINVER:=-D_WIN32_WINNT=0x0501 -DWINVER=0x0501 +# Set minimum version to Windows 8 (see /cygwin/usr/include/w32api/w32api.h) +WINVER:=-D_WIN32_WINNT=0x0602 -DWINVER=0x0602
How would you feel about setting minimum supported version to 8.0? I want to do this because of the GetSystemTimePreciseAsFileTime function, which appears in 8.0 nd neatly solves the time issues in the win32 VM (use of the millisecond clock to derive greater precision than the 15ms tick in GetSystemTimeAsFileTime causes significant direct over the course of several days).
@krono commented on this pull request.
@@ -53,16 +53,17 @@ ifdef MSVC
MEMACCESS:=-DUSE_INLINE_MEMORY_ACCESSORS=1 endif
-# Set minimum version to WindowsXP (see /cygwin/usr/include/w32api/w32api.h) -WINVER:=-D_WIN32_WINNT=0x0501 -DWINVER=0x0501 +# Set minimum version to Windows 8 (see /cygwin/usr/include/w32api/w32api.h) +WINVER:=-D_WIN32_WINNT=0x0602 -DWINVER=0x0602
We can have `0x6000` (Vista) _and_ use that function. Ping me in a week or so, when I'm back from vacation
vm-dev@lists.squeakfoundation.org