Skip to content

Commit 0d58aa0

Browse files
committed
Make IODev stuff version(Posix) only since you couldn't do it on windows
originally anyway.
1 parent 37f9a54 commit 0d58aa0

File tree

2 files changed

+28
-24
lines changed

2 files changed

+28
-24
lines changed

source/iopipe/buffer.d

+1
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,7 @@ shared static this()
571571
{
572572
version (Windows)
573573
{
574+
import core.sys.windows.windows;
574575
SYSTEM_INFO info;
575576
GetSystemInfo(&info);
576577

source/iopipe/stream.d

+27-24
Original file line numberDiff line numberDiff line change
@@ -8,32 +8,35 @@ Authors: Steven Schveighoffer
88
module iopipe.stream;
99
import std.io;
1010

11-
/// Deprecated: use std.io directly
12-
deprecated alias IODev = IOObject!(File);
13-
14-
/**
15-
* Construct an input stream based on the file descriptor
16-
*
17-
* params:
18-
* fd = The file descriptor to wrap
19-
*
20-
* Deprecated: Use https://code.dlang.org/io for low-level device i/o
21-
*/
22-
deprecated("use std.io")
23-
auto openDev(int fd)
11+
version(Posix)
2412
{
25-
return ioObject(File(fd));
26-
}
13+
/// Deprecated: use std.io directly
14+
deprecated alias IODev = IOObject!(File);
2715

28-
/**
29-
* Open a file by name.
30-
*
31-
* Deprecated: Use https://code.dlang.org/io for low-level device i/o
32-
*/
33-
deprecated("use std.io")
34-
auto openDev(in char[] name, Mode mode = Mode.read | Mode.binary)
35-
{
36-
return ioObject(File(name, mode));
16+
/**
17+
* Construct an input stream based on the file descriptor
18+
*
19+
* params:
20+
* fd = The file descriptor to wrap
21+
*
22+
* Deprecated: Use https://code.dlang.org/io for low-level device i/o
23+
*/
24+
deprecated("use std.io")
25+
auto openDev(int fd)
26+
{
27+
return ioObject(File(fd));
28+
}
29+
30+
/**
31+
* Open a file by name.
32+
*
33+
* Deprecated: Use https://code.dlang.org/io for low-level device i/o
34+
*/
35+
deprecated("use std.io")
36+
auto openDev(in char[] name, Mode mode = Mode.read | Mode.binary)
37+
{
38+
return ioObject(File(name, mode));
39+
}
3740
}
3841

3942

0 commit comments

Comments
 (0)