Skip to content

Commit

Permalink
Auto merge of #1180 - xmclark:add-stdio-constants-windows, r=alexcric…
Browse files Browse the repository at this point in the history
…hton

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.
  • Loading branch information
bors committed Dec 21, 2018
2 parents 027d483 + f1b396f commit c1ae35d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/windows/gnu.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
pub const L_tmpnam: ::c_uint = 14;
pub const TMP_MAX: ::c_uint = 0x7fff;

// stdio file descriptor numbers
pub const STDIN_FILENO: ::c_int = 0;
pub const STDOUT_FILENO: ::c_int = 1;
pub const STDERR_FILENO: ::c_int = 2;

extern {
pub fn strcasecmp(s1: *const ::c_char, s2: *const ::c_char) -> ::c_int;
pub fn strncasecmp(s1: *const ::c_char, s2: *const ::c_char,
Expand Down

0 comments on commit c1ae35d

Please sign in to comment.