aboutsummaryrefslogtreecommitdiff
path: root/system/include/libc/sys/param.h
diff options
context:
space:
mode:
authorBruce Mitchener <bruce.mitchener@gmail.com>2013-08-04 00:32:45 +0800
committerAlon Zakai <alonzakai@gmail.com>2013-09-13 10:07:02 -0700
commit5c6e1633d218bd5b9c5077634829eb14d326308f (patch)
tree50a4fd55b51a0fab6506addf610a666afabaec9b /system/include/libc/sys/param.h
parent27d496610e0ef93c9805a6a1a77de3f053405c6b (diff)
Update libc headers to use musl headers.
Diffstat (limited to 'system/include/libc/sys/param.h')
-rw-r--r--system/include/libc/sys/param.h48
1 files changed, 29 insertions, 19 deletions
diff --git a/system/include/libc/sys/param.h b/system/include/libc/sys/param.h
index 7e8762a6..344c0d23 100644
--- a/system/include/libc/sys/param.h
+++ b/system/include/libc/sys/param.h
@@ -1,25 +1,35 @@
-/* This is a dummy <sys/param.h> file, not customized for any
- particular system. If there is a param.h in libc/sys/SYSDIR/sys,
- it will override this one. */
-
#ifndef _SYS_PARAM_H
-# define _SYS_PARAM_H
+#define _SYS_PARAM_H
-#include <sys/config.h>
-#include <machine/endian.h>
-#include <machine/param.h>
+#define MAXSYMLINKS 20
+#define MAXHOSTNAMELEN 64
+#define MAXNAMLEN 255
+#define MAXPATHLEN 4096
+#define NBBY 8
+#define NGROUPS 32
+#define CANBSIZE 255
+#define NOFILE 256
+#define NCARGS 131072
+#define DEV_BSIZE 512
+#define NOGROUP (-1)
-#ifndef HZ
-# define HZ (60)
-#endif
-#ifndef NOFILE
-# define NOFILE (60)
-#endif
-#ifndef PATHSIZE
-# define PATHSIZE (1024)
-#endif
+#undef MIN
+#undef MAX
+#define MIN(a,b) (((a)<(b))?(a):(b))
+#define MAX(a,b) (((a)>(b))?(a):(b))
+
+#define __bitop(x,i,o) ((x)[(i)/8] o (1<<(i)%8))
+#define setbit(x,i) __bitop(x,i,|=)
+#define clrbit(x,i) __bitop(x,i,&=~)
+#define isset(x,i) __bitop(x,i,&)
+#define isclr(x,i) !isset(x,i)
+
+#define howmany(n,d) (((n)+((d)-1))/(d))
+#define roundup(n,d) (howmany(n,d)*(d))
+#define powerof2(n) !(((n)-1) & (n))
-#define MAX(a,b) ((a) > (b) ? (a) : (b))
-#define MIN(a,b) ((a) < (b) ? (a) : (b))
+#include <sys/resource.h>
+#include <endian.h>
+#include <limits.h>
#endif