From 64bc6412188b141c010ac3b8e813b837dd991e80 Mon Sep 17 00:00:00 2001 From: Erik Andersen Date: Sun, 14 May 2000 04:16:35 +0000 Subject: Initial revision --- include/sys/param.h | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 include/sys/param.h (limited to 'include/sys/param.h') diff --git a/include/sys/param.h b/include/sys/param.h new file mode 100644 index 000000000..906a0a230 --- /dev/null +++ b/include/sys/param.h @@ -0,0 +1,46 @@ +/* Copyright (C) 1996 Robert de Bath + * This file is part of the Linux-8086 C library and is distributed + * under the GNU Library General Public License. + */ + +#ifndef _PARAM_H +#define _PARAM_H + +#include +#include +#include +#include + +#include + +#define MAXPATHLEN PATH_MAX + +#ifndef NR_OPEN +#define NR_OPEN 32 +#endif +#ifndef NR_FILE +#define NR_FILE 32 +#endif + +/* Bit map related macros. */ +#define setbit(a,i) ((a)[(i)/NBBY] |= 1<<((i)%NBBY)) +#define clrbit(a,i) ((a)[(i)/NBBY] &= ~(1<<((i)%NBBY))) +#define isset(a,i) ((a)[(i)/NBBY] & (1<<((i)%NBBY))) +#define isclr(a,i) (((a)[(i)/NBBY] & (1<<((i)%NBBY))) == 0) + +/* Macros for counting and rounding. */ +#ifndef howmany +#define howmany(x, y) (((x)+((y)-1))/(y)) +#endif +#define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) +#define powerof2(x) ((((x)-1)&(x))==0) + +/* Macros for min/max. */ +#define MIN(a,b) (((a)<(b))?(a):(b)) +#define MAX(a,b) (((a)>(b))?(a):(b)) + + +/* Unit of `st_blocks'. */ +#define DEV_BSIZE 512 + +#endif /* _PARAM_H */ -- cgit v1.2.3