summaryrefslogtreecommitdiff
path: root/bin/ksh/ksh_limval.h
diff options
context:
space:
mode:
Diffstat (limited to 'bin/ksh/ksh_limval.h')
-rw-r--r--bin/ksh/ksh_limval.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/bin/ksh/ksh_limval.h b/bin/ksh/ksh_limval.h
new file mode 100644
index 00000000000..828c0f82577
--- /dev/null
+++ b/bin/ksh/ksh_limval.h
@@ -0,0 +1,24 @@
+/* $OpenBSD: ksh_limval.h,v 1.1 1996/08/14 06:19:11 downsj Exp $ */
+
+/* Wrapper around the values.h/limits.h includes/ifdefs */
+
+#ifdef HAVE_VALUES_H
+# include <values.h>
+#endif /* HAVE_VALUES_H */
+/* limits.h is included in sh.h */
+
+#ifndef DMAXEXP
+# define DMAXEXP 128 /* should be big enough */
+#endif
+
+#ifndef BITSPERBYTE
+# ifdef CHAR_BIT
+# define BITSPERBYTE CHAR_BIT
+# else
+# define BITSPERBYTE 8 /* probably true.. */
+# endif
+#endif
+
+#ifndef BITS
+# define BITS(t) (BITSPERBYTE * sizeof(t))
+#endif