Merge pull request #168 from vibe-d/32bit_compile_fix

32-bit compile fix
This commit is contained in:
Sönke Ludwig 2021-01-12 19:20:28 +01:00 committed by GitHub
commit edf9eda3ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 30 deletions

View file

@ -34,6 +34,9 @@ jobs:
- {os: windows-latest, dc: ldc-1.9.0, config: select}
- {os: windows-latest, dc: ldc-1.17.0}
- {os: ubuntu-latest, dc: ldc-1.17.0}
include:
- {os: windows-latest, dc: ldc-latest, arch: x86, config: winapi}
- {os: windows-latest, dc: dmd-latest, arch: x86_mscoff, config: winapi}
runs-on: ${{ matrix.os }}
steps:

16
dub.sdl
View file

@ -36,27 +36,15 @@ configuration "kqueue" {
}
configuration "winapi" {
platforms "windows-x86_64" "windows-x86_mscoff" "windows-ldc" "windows-gdc"
platforms "windows"
versions "EventcoreWinAPIDriver"
}
configuration "select" {
platforms "posix" "windows-x86_64" "windows-x86_mscoff"
platforms "posix" "windows"
versions "EventcoreSelectDriver"
}
configuration "winapi-optlink" {
platforms "windows-x86-dmd"
versions "EventcoreWinAPIDriver"
sourceFiles "lib/ws2_32.lib" "lib/kernel32.lib"
}
configuration "select-optlink" {
platforms "windows-x86-dmd"
versions "EventcoreSelectDriver"
sourceFiles "lib/ws2_32.lib" "lib/kernel32.lib"
}
configuration "libasync" {
dependency "libasync" version="~>0.8.2"
versions "EventcoreLibasyncDriver"

View file

@ -225,6 +225,7 @@ final class ThreadedFileEventDriver(Events : EventDriverEvents) : EventDriverFil
}
on_finish(file, IOStatus.ok, 0);
} else version (Windows) {
version (Win64) {
import core.sys.windows.windows : FILE_BEGIN, HANDLE, INVALID_HANDLE_VALUE,
LARGE_INTEGER, SetFilePointerEx, SetEndOfFile;
import core.stdc.stdio : _get_osfhandle;
@ -247,6 +248,9 @@ final class ThreadedFileEventDriver(Events : EventDriverEvents) : EventDriverFil
} else {
on_finish(file, IOStatus.error, 0);
}
} else {
on_finish(file, IOStatus.error, 0);
}
}