Skip to content

Commit c1ae35d

Browse files
committed
Auto merge of #1180 - xmclark:add-stdio-constants-windows, r=alexcrichton
add stdio constants for windows A few useful constants for working with the stdio file descriptors. I referenced the [msdn](https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/fileno?view=vs-2017) docs for the numbers, although I think 0,1,2 are standard on most platforms for the stdio.
2 parents 027d483 + f1b396f commit c1ae35d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/windows/gnu.rs

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
pub const L_tmpnam: ::c_uint = 14;
22
pub const TMP_MAX: ::c_uint = 0x7fff;
33

4+
// stdio file descriptor numbers
5+
pub const STDIN_FILENO: ::c_int = 0;
6+
pub const STDOUT_FILENO: ::c_int = 1;
7+
pub const STDERR_FILENO: ::c_int = 2;
8+
49
extern {
510
pub fn strcasecmp(s1: *const ::c_char, s2: *const ::c_char) -> ::c_int;
611
pub fn strncasecmp(s1: *const ::c_char, s2: *const ::c_char,

0 commit comments

Comments
 (0)