Move MIN() and MAX() macros to sys/params.h
This commit is contained in:
@@ -54,9 +54,6 @@ __RCSID("$NetBSD: bt_overflow.c,v 1.16 2008/09/11 12:58:00 joerg Exp $");
|
||||
#include <db.h>
|
||||
#include "btree.h"
|
||||
|
||||
#define MAX(a, b) ((a) > (b) ? (a) : (b))
|
||||
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||
|
||||
/*
|
||||
* Big key/data code.
|
||||
*
|
||||
|
||||
@@ -51,9 +51,6 @@ __RCSID("$NetBSD: bt_utils.c,v 1.13 2008/09/10 17:52:35 joerg Exp $");
|
||||
#include <db.h>
|
||||
#include "btree.h"
|
||||
|
||||
#define MAX(a, b) ((a) > (b) ? (a) : (b))
|
||||
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||
|
||||
/*
|
||||
* __bt_ret --
|
||||
* Build return key/data pair.
|
||||
|
||||
@@ -76,9 +76,6 @@ __RCSID("$NetBSD: hash.c,v 1.31 2009/02/12 06:35:54 lukem Exp $");
|
||||
#define _DIAGASSERT
|
||||
#endif
|
||||
|
||||
#define MAX(a, b) ((a) > (b) ? (a) : (b))
|
||||
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||
|
||||
static int alloc_segs(HTAB *, int);
|
||||
static int flush_meta(HTAB *);
|
||||
static int hash_access(HTAB *, ACTION, DBT *, DBT *);
|
||||
|
||||
@@ -76,9 +76,6 @@ __RCSID("$NetBSD: hash_bigkey.c,v 1.23 2009/02/12 06:33:13 lukem Exp $");
|
||||
#define _DIAGASSERT
|
||||
#endif
|
||||
|
||||
#define MAX(a, b) ((a) > (b) ? (a) : (b))
|
||||
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||
|
||||
static int collect_key(HTAB *, BUFHEAD *, int, DBT *, int);
|
||||
static int collect_data(HTAB *, BUFHEAD *, int, int);
|
||||
|
||||
|
||||
@@ -97,8 +97,6 @@ static BUFHEAD *newbuf(HTAB *, uint32_t, BUFHEAD *);
|
||||
#define _DIAGASSERT assert
|
||||
#endif
|
||||
|
||||
#define MAX(a, b) ((a) > (b) ? (a) : (b))
|
||||
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||
/*
|
||||
* We are looking for a buffer with address "addr". If prev_bp is NULL, then
|
||||
* address is a bucket index. If prev_bp is not NULL, then it points to the
|
||||
|
||||
@@ -39,10 +39,6 @@ static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
#endif
|
||||
|
||||
#define MAX(a, b) ((a) > (b) ? (a) : (b))
|
||||
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||
|
||||
|
||||
#define _POSIX_SOURCE 1
|
||||
#define _MINIX 1
|
||||
|
||||
|
||||
@@ -4,14 +4,13 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/uio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#define VECTORIO_READ 1
|
||||
#define VECTORIO_WRITE 2
|
||||
|
||||
#define MIN(x, y) (((x) < (y)) ? (x) : (y))
|
||||
|
||||
static ssize_t vectorio_buffer(int fildes, const struct iovec *iov,
|
||||
int iovcnt, int readwrite, ssize_t totallen)
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <sys/param.h>
|
||||
#include "syslib.h"
|
||||
|
||||
/*===========================================================================*
|
||||
|
||||
Reference in New Issue
Block a user