Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions src/core/stdc/stdio.d
Original file line number Diff line number Diff line change
Expand Up @@ -1721,7 +1721,15 @@ void perror(scope const char* s);

version (CRuntime_DigitalMars)
{
import core.sys.windows.windows;
version (none)
import core.sys.windows.windows : HANDLE, _WaitSemaphore, _ReleaseSemaphore;
else
{
// too slow to import windows
private alias void* HANDLE;
private void _WaitSemaphore(int iSemaphore);
private void _ReleaseSemaphore(int iSemaphore);
}

enum
{
Expand All @@ -1746,9 +1754,6 @@ version (CRuntime_DigitalMars)
private extern __gshared HANDLE[_NFILE] _osfhnd;
extern shared ubyte[_NFILE] __fhnd_info;

private void _WaitSemaphore(int iSemaphore);
private void _ReleaseSemaphore(int iSemaphore);

// this is copied from semlock.h in DMC's runtime.
private void LockSemaphore()(uint num)
{
Expand Down