diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2012-03-08 09:36:11 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2012-03-08 09:36:11 +0000 |
commit | 75543537a16a0911af61045a96926cdb81f51383 (patch) | |
tree | 34fa443cb5d7c48e058d17cb2605e10d3947b521 /winsup/cygwin/fhandler_tty.cc | |
parent | 106833e9b360c8f56e465e2e80141a13dc193635 (diff) | |
download | newlib-75543537a16a0911af61045a96926cdb81f51383.zip newlib-75543537a16a0911af61045a96926cdb81f51383.tar.gz newlib-75543537a16a0911af61045a96926cdb81f51383.tar.bz2 |
* Throughout, replace usage of w32api's min with MIN from sys/param.h.
Diffstat (limited to 'winsup/cygwin/fhandler_tty.cc')
-rw-r--r-- | winsup/cygwin/fhandler_tty.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 547cf72..6189046 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -11,6 +11,7 @@ details. */ #include "winsup.h" #include <stdlib.h> +#include <sys/param.h> #include <cygwin/kd.h> #include "cygerrno.h" #include "security.h" @@ -623,7 +624,7 @@ fhandler_pty_slave::write (const void *ptr, size_t len) while (len) { - n = min (OUT_BUFFER_SIZE, len); + n = MIN (OUT_BUFFER_SIZE, len); char *buf = (char *)ptr; ptr = (char *) ptr + n; len -= n; @@ -802,7 +803,7 @@ fhandler_pty_slave::read (void *ptr, size_t& len) return; } - readlen = min (bytes_in_pipe, min (len, sizeof (buf))); + readlen = MIN (bytes_in_pipe, MIN (len, sizeof (buf))); if (ptr && vmin && readlen > (unsigned) vmin) readlen = vmin; |