* Throughout, replace usage of w32api's min with MIN from sys/param.h.

This commit is contained in:
Corinna Vinschen
2012-03-08 09:36:11 +00:00
parent 106833e9b3
commit 75543537a1
12 changed files with 38 additions and 25 deletions

View File

@@ -14,6 +14,7 @@ details. */
#include <stdlib.h>
#include <sys/uio.h>
#include <sys/acl.h>
#include <sys/param.h>
#include "cygerrno.h"
#include "perprocess.h"
#include "security.h"
@@ -949,7 +950,7 @@ fhandler_base::readv (const struct iovec *const iov, const int iovcnt,
char *p = buf;
while (nbytes > 0)
{
const int frag = min (nbytes, (ssize_t) iovptr->iov_len);
const int frag = MIN (nbytes, (ssize_t) iovptr->iov_len);
memcpy (iovptr->iov_base, p, frag);
p += frag;
iovptr += 1;
@@ -1001,7 +1002,7 @@ fhandler_base::writev (const struct iovec *const iov, const int iovcnt,
while (nbytes != 0)
{
const int frag = min (nbytes, (ssize_t) iovptr->iov_len);
const int frag = MIN (nbytes, (ssize_t) iovptr->iov_len);
memcpy (bufptr, iovptr->iov_base, frag);
bufptr += frag;
iovptr += 1;