1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

we call the macro CURLMAX() isntead of MAX(), just because it turned up

it collides with another MAX define on some platforms (like netbsd 1.6.1)
This commit is contained in:
Daniel Stenberg 2004-02-20 08:47:23 +00:00
parent 2c0c75e345
commit a39669198f
2 changed files with 7 additions and 8 deletions

View File

@ -313,8 +313,8 @@ CURLcode Curl_readwrite(struct connectdata *conn,
if (k->hbuflen + nread >= data->state.headersize) { if (k->hbuflen + nread >= data->state.headersize) {
/* We enlarge the header buffer as it is too small */ /* We enlarge the header buffer as it is too small */
char *newbuff; char *newbuff;
long newsize=MAX((k->hbuflen+nread)*3/2, long newsize=CURLMAX((k->hbuflen+nread)*3/2,
data->state.headersize*2); data->state.headersize*2);
hbufp_index = k->hbufp - data->state.headerbuff; hbufp_index = k->hbufp - data->state.headerbuff;
newbuff = (char *)realloc(data->state.headerbuff, newsize); newbuff = (char *)realloc(data->state.headerbuff, newsize);
if(!newbuff) { if(!newbuff) {
@ -358,8 +358,8 @@ CURLcode Curl_readwrite(struct connectdata *conn,
if (k->hbuflen + full_length >= if (k->hbuflen + full_length >=
data->state.headersize) { data->state.headersize) {
char *newbuff; char *newbuff;
long newsize=MAX((k->hbuflen+full_length)*3/2, long newsize=CURLMAX((k->hbuflen+full_length)*3/2,
data->state.headersize*2); data->state.headersize*2);
hbufp_index = k->hbufp - data->state.headerbuff; hbufp_index = k->hbufp - data->state.headerbuff;
newbuff = (char *)realloc(data->state.headerbuff, newsize); newbuff = (char *)realloc(data->state.headerbuff, newsize);
if(!newbuff) { if(!newbuff) {

View File

@ -110,10 +110,9 @@
/* Maximum number of dirs supported by libcurl in a FTP dir hierarchy */ /* Maximum number of dirs supported by libcurl in a FTP dir hierarchy */
#define CURL_MAX_FTP_DIRDEPTH 100 #define CURL_MAX_FTP_DIRDEPTH 100
/* Just a convenience macro to get the larger value out of two given */ /* Just a convenience macro to get the larger value out of two given.
#ifndef MAX We prefix with CURL to prevent name collisions. */
#define MAX(x,y) ((x)>(y)?(x):(y)) #define CURLMAX(x,y) ((x)>(y)?(x):(y))
#endif
#ifdef HAVE_KRB4 #ifdef HAVE_KRB4
/* Types needed for krb4-ftp connections */ /* Types needed for krb4-ftp connections */