#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
+#include <sys/param.h>
#define ptrace mdbtrace
#include <sys/ptrace.h>
#include "proto.h"
} while (/* CONSTCOND */ 0)
-#ifndef MAX
-#define MAX(x,y) ((x) > (y) ? (x) : (y))
-#endif
static void ps_letter(struct termp *, char);
static void ps_begin(struct termp *);
static void ps_end(struct termp *);
#if HAVE_ERR_H
#include <err.h>
#endif
+#if HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
#include "defs.h"
#include "lib.h"
#define WRITING 1 /* copy data from user */
#define HAVE_SCATTERED_IO 1 /* scattered I/O is now standard */
-/* Macros. */
-#define MAX(a, b) ((a) > (b) ? (a) : (b))
-#define MIN(a, b) ((a) < (b) ? (a) : (b))
-
/* Memory is allocated in clicks. */
#if (CHIP == INTEL)
#define CLICK_SIZE 4096 /* unit in which memory is allocated */
#include <limits.h>
#include <stddef.h>
#include <errno.h>
+#include <sys/param.h>
#include <minix/partition.h>
#include <minix/u64.h>
#include <stddef.h>
#include <errno.h>
#include <unistd.h>
+#include <sys/param.h>
#endif
#define NGROUPS 8 /* max number of supplementary groups */
#define MAXPATHLEN __MINIX_PATH_MAX
+/* Macros for min/max. */
+#define MIN(a,b) ((/*CONSTCOND*/(a)<(b))?(a):(b))
+#define MAX(a,b) ((/*CONSTCOND*/(a)>(b))?(a):(b))
+
#endif /* __SYS_PARAM_H__ */
#include <minix/sysutil.h> /* MINIX utility library functions */
#include <timers.h> /* watchdog timer management */
#include <errno.h> /* return codes and error numbers */
+#include <sys/param.h>
/* Important kernel header files. */
#include "config.h" /* configuration, MUST be first */
#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.
*
#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.
#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 *);
#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);
#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
#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
#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)
{
#include <string.h>
-
+#include <sys/param.h>
#include "syslib.h"
/*===========================================================================*
#include <ansi.h>
#include <sys/types.h>
+#include <sys/param.h>
#include <limits.h>
#include <errno.h>
#include <regex.h>
#include "super.h"
#include <minix/vfsif.h>
#include <assert.h>
+#include <sys/param.h>
FORWARD _PROTOTYPE( struct buf *rahead, (struct inode *rip, block_t baseblock,
#include <minix/vfsif.h>
#include <minix/syslib.h>
#include <minix/sysutil.h>
+#include <sys/param.h>
#if DEBUG
#define dprintf(x) printf x
#include <string.h>
#include <unistd.h>
#include <signal.h>
+#include <sys/param.h>
#include "proto.h"
#include "super.h"
#include <limits.h>
#include <errno.h>
+#include <sys/param.h>
#include "const.h"
#include "type.h"
#include <unistd.h>
#include <signal.h>
#include <assert.h>
+#include <sys/param.h>
#include "proto.h"
#include "const.h"
#include <assert.h>
#include <env.h>
#include <pagetable.h>
+#include <sys/param.h>
#include "glo.h"
#include "proto.h"
#include <assert.h>
#include <stdint.h>
#include <memory.h>
+#include <sys/param.h>
#include "vm.h"
#include "proto.h"
#include <unistd.h>
#include <memory.h>
#include <assert.h>
+#include <sys/param.h>
#include "proto.h"
#include "glo.h"
/* Tests for truncate(2) call family - by D.C. van Moolenbroek */
#define _POSIX_SOURCE 1
#include <sys/stat.h>
+#include <sys/param.h>
#include <unistd.h>
#include <fcntl.h>
#include <assert.h>
#define TESTSIZE 4096
#define THRESHOLD 1048576
-#ifndef MIN
-#define MIN(x,y) (((x)<(y))?(x):(y))
-#endif
-
#include "common.c"
_PROTOTYPE(int main, (int argc, char *argv[]));