Move MIN() and MAX() macros to sys/params.h

This commit is contained in:
Arun Thomas
2010-08-21 13:10:41 +00:00
parent 60a71efca8
commit de231a713e
26 changed files with 23 additions and 32 deletions

View File

@@ -91,10 +91,6 @@
#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 */

View File

@@ -26,6 +26,7 @@
#include <limits.h>
#include <stddef.h>
#include <errno.h>
#include <sys/param.h>
#include <minix/partition.h>
#include <minix/u64.h>

View File

@@ -36,5 +36,6 @@
#include <stddef.h>
#include <errno.h>
#include <unistd.h>
#include <sys/param.h>
#endif

View File

@@ -12,4 +12,8 @@ sys/param.h
#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__ */