Move MIN() and MAX() macros to sys/params.h
This commit is contained in:
@@ -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 */
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -36,5 +36,6 @@
|
||||
#include <stddef.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/param.h>
|
||||
|
||||
#endif
|
||||
|
||||
@@ -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__ */
|
||||
|
||||
Reference in New Issue
Block a user