diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2013-07-08 15:06:25 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2013-07-08 15:06:25 +0300 |
commit | 9ff2ae36ec0633b8017612b13224447c716bbcc2 (patch) | |
tree | 65de18f4f36ab573c32f07b912c703a7907e8551 /io.c | |
parent | 133125e373eebdd96cfe5ed54951d2770c01ef7d (diff) | |
download | egawk-9ff2ae36ec0633b8017612b13224447c716bbcc2.tar.gz egawk-9ff2ae36ec0633b8017612b13224447c716bbcc2.tar.bz2 egawk-9ff2ae36ec0633b8017612b13224447c716bbcc2.zip |
Make min be MIN.
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -3500,12 +3500,12 @@ get_a_record(char **out, /* pointer to pointer to data */ recm.rt_start = iop->off + recm.len; /* read more data, break if EOF */ -#ifndef min -#define min(x, y) (x < y ? x : y) +#ifndef MIN +#define MIN(x, y) (x < y ? x : y) #endif /* subtract one in read count to leave room for sentinel */ room_left = iop->end - iop->dataend - 1; - amt_to_read = min(iop->readsize, room_left); + amt_to_read = MIN(iop->readsize, room_left); if (amt_to_read < iop->readsize) { grow_iop_buffer(iop); @@ -3516,7 +3516,7 @@ get_a_record(char **out, /* pointer to pointer to data */ /* recalculate amt_to_read */ room_left = iop->end - iop->dataend - 1; - amt_to_read = min(iop->readsize, room_left); + amt_to_read = MIN(iop->readsize, room_left); } while (amt_to_read + iop->readsize < room_left) amt_to_read += iop->readsize; @@ -3526,7 +3526,7 @@ get_a_record(char **out, /* pointer to pointer to data */ * POSIX limits read to SSIZE_MAX. There are (bizarre) * systems where this amount is small. */ - amt_to_read = min(amt_to_read, SSIZE_MAX); + amt_to_read = MIN(amt_to_read, SSIZE_MAX); #endif iop->count = iop->public.read_func(iop->public.fd, iop->dataend, amt_to_read); |