1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

Define max

This commit is contained in:
Giuseppe Scrivano 2011-05-24 11:13:04 +02:00
parent d7991738d6
commit 00723a80f1
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2011-05-24 Giuseppe Scrivano <gscrivano@gnu.org>
* retr.c (fd_read_body): Define max.
2010-12-28 Adrien Nader <adrien@notk.org> (tiny change) 2010-12-28 Adrien Nader <adrien@notk.org> (tiny change)
* main.c [WINDOWS]: Include <io.h> and <fcntl.h>. * main.c [WINDOWS]: Include <io.h> and <fcntl.h>.

View File

@ -207,7 +207,7 @@ fd_read_body (int fd, FILE *out, wgint toread, wgint startpos,
wgint *qtyread, wgint *qtywritten, double *elapsed, int flags) wgint *qtyread, wgint *qtywritten, double *elapsed, int flags)
{ {
int ret = 0; int ret = 0;
#define max(a,b) ((a) > (b) ? (a) : (b))
int dlbufsize = max (BUFSIZ, 8 * 1024); int dlbufsize = max (BUFSIZ, 8 * 1024);
char *dlbuf = xmalloc (dlbufsize); char *dlbuf = xmalloc (dlbufsize);