summaryrefslogtreecommitdiff
path: root/internal.h
diff options
context:
space:
mode:
authorEric Andersen2000-06-19 20:03:48 +0000
committerEric Andersen2000-06-19 20:03:48 +0000
commitbd4a75f6c8e3c821a45f136eb6c21e71aa1450be (patch)
treefe8cf4622b7973cae5614de2da32a6a7bd24aedb /internal.h
parentbb245ba0c2238d6a6b19af151249cdb25afdca87 (diff)
downloadbusybox-bd4a75f6c8e3c821a45f136eb6c21e71aa1450be.zip
busybox-bd4a75f6c8e3c821a45f136eb6c21e71aa1450be.tar.gz
Finish off the libc5 porting effort. Everything now works with libc5
except for md5sum, which uses the GNU libc addition getline(). -Erik
Diffstat (limited to 'internal.h')
-rw-r--r--internal.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/internal.h b/internal.h
index 697ce47..4a132ab 100644
--- a/internal.h
+++ b/internal.h
@@ -297,4 +297,13 @@ int nfsmount(const char *spec, const char *node, unsigned long *flags,
#endif
+#ifndef setbit
+/* Bit map related macros -- libc5 doens't provide these... sigh. */
+#define NBBY CHAR_BIT
+#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)
+#endif
+
#endif /* _BB_INTERNAL_H_ */