Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit 97deef5

Browse files
authored
Merge pull request #2336 from WalterBright/noWindows.h
don't include windows.d in stdio.d merged-on-behalf-of: Steven Schveighoffer <schveiguy@users.noreply.github.com>
2 parents bd645f6 + 5dc7a07 commit 97deef5

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/core/stdc/stdio.d

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1721,7 +1721,15 @@ void perror(scope const char* s);
17211721

17221722
version (CRuntime_DigitalMars)
17231723
{
1724-
import core.sys.windows.windows;
1724+
version (none)
1725+
import core.sys.windows.windows : HANDLE, _WaitSemaphore, _ReleaseSemaphore;
1726+
else
1727+
{
1728+
// too slow to import windows
1729+
private alias void* HANDLE;
1730+
private void _WaitSemaphore(int iSemaphore);
1731+
private void _ReleaseSemaphore(int iSemaphore);
1732+
}
17251733

17261734
enum
17271735
{
@@ -1746,9 +1754,6 @@ version (CRuntime_DigitalMars)
17461754
private extern __gshared HANDLE[_NFILE] _osfhnd;
17471755
extern shared ubyte[_NFILE] __fhnd_info;
17481756

1749-
private void _WaitSemaphore(int iSemaphore);
1750-
private void _ReleaseSemaphore(int iSemaphore);
1751-
17521757
// this is copied from semlock.h in DMC's runtime.
17531758
private void LockSemaphore()(uint num)
17541759
{

0 commit comments

Comments
 (0)