/*
- * $Id: access_log.cc,v 1.15 1998/01/02 02:06:01 wessels Exp $
+ * $Id: access_log.cc,v 1.16 1998/01/05 21:18:12 wessels Exp $
*
* DEBUG: section 46 Access Log
* AUTHOR: Duane Wessels
};
#define MAX_LINELEN (4096)
-#define max(a,b) ((a)>(b)? (a): (b))
static int LogfileStatus = LOG_DISABLE;
static int LogfileFD = -1;
/*
- * $Id: comm.cc,v 1.219 1998/01/05 00:45:45 wessels Exp $
+ * $Id: comm.cc,v 1.220 1998/01/05 21:18:13 wessels Exp $
*
* DEBUG: section 5 Socket Functions
* AUTHOR: Harvest Derived
#include <netinet/tcp.h>
#endif
-#define min(x,y) ((x)<(y)? (x) : (y))
-#define max(a,b) ((a)>(b)? (a) : (b))
-
typedef struct {
char *host;
u_short port;
/* Keep a few file descriptors free so that we don't run out of FD's
* after accepting a client but before it opens a socket or a file.
* Since Squid_MaxFD can be as high as several thousand, don't waste them */
- RESERVED_FD = min(100, Squid_MaxFD / 4);
+ RESERVED_FD = XMIN(100, Squid_MaxFD / 4);
/* hardwired lifetimes */
meta_data.misc += Squid_MaxFD * sizeof(int);
zero_tv.tv_sec = 0;
/*
- * $Id: squid.h,v 1.149 1998/01/02 19:27:01 wessels Exp $
+ * $Id: squid.h,v 1.150 1998/01/05 21:18:14 wessels Exp $
*
* AUTHOR: Duane Wessels
*
#include "snprintf.h"
#endif
+#define XMIN(x,y) ((x)<(y)? (x) : (y))
+#define XMAX(a,b) ((a)>(b)? (a) : (b))
+
#endif /* SQUID_H */
/*
- * $Id: stmem.cc,v 1.53 1997/11/12 23:47:41 wessels Exp $
+ * $Id: stmem.cc,v 1.54 1998/01/05 21:18:15 wessels Exp $
*
* DEBUG: section 19 Memory Primitives
* AUTHOR: Harvest Derived
#include "squid.h"
-#define min(x,y) ((x)<(y)? (x) : (y))
-
#ifndef USE_MEMALIGN
#define USE_MEMALIGN 0
#endif
* allocation loop */
if (mem->head && mem->tail && (mem->tail->len < SM_PAGE_SIZE)) {
avail_len = SM_PAGE_SIZE - (mem->tail->len);
- len_to_copy = min(avail_len, len);
+ len_to_copy = XMIN(avail_len, len);
xmemcpy((mem->tail->data + mem->tail->len), data, len_to_copy);
/* Adjust the ptr and len according to what was deposited in the page */
data += len_to_copy;
mem->tail->len += len_to_copy;
}
while (len > 0) {
- len_to_copy = min(len, SM_PAGE_SIZE);
+ len_to_copy = XMIN(len, SM_PAGE_SIZE);
p = xcalloc(1, sizeof(mem_node));
p->next = NULL;
p->len = len_to_copy;
/* Start copying begining with this block until
* we're satiated */
bytes_into_this_packet = offset - t_off;
- bytes_from_this_packet = min(bytes_to_go, p->len - bytes_into_this_packet);
+ bytes_from_this_packet = XMIN(bytes_to_go, p->len - bytes_into_this_packet);
xmemcpy(buf, p->data + bytes_into_this_packet, bytes_from_this_packet);
bytes_to_go -= bytes_from_this_packet;
ptr_to_buf = buf + bytes_from_this_packet;