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

Do not define max twice.

This commit is contained in:
Giuseppe Scrivano 2011-08-13 10:44:40 +02:00
parent 24a76e1a8f
commit 706871e92e
2 changed files with 3 additions and 0 deletions

View File

@ -1,5 +1,7 @@
2011-08-13 Giuseppe Scrivano <gscrivano@gnu.org> 2011-08-13 Giuseppe Scrivano <gscrivano@gnu.org>
* retr.c (fd_read_body): Ensure max is not already defined.
* mswindows.h (snprintf): Remove definition. * mswindows.h (snprintf): Remove definition.
(vsnprintf): Likewise. (vsnprintf): Likewise.

View File

@ -207,6 +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;
#undef max
#define max(a,b) ((a) > (b) ? (a) : (b)) #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);