summaryrefslogtreecommitdiff
path: root/ksh_limval.h
diff options
context:
space:
mode:
Diffstat (limited to 'ksh_limval.h')
-rw-r--r--ksh_limval.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/ksh_limval.h b/ksh_limval.h
new file mode 100644
index 0000000..42e38bb
--- /dev/null
+++ b/ksh_limval.h
@@ -0,0 +1,25 @@
+/* $NetBSD: ksh_limval.h,v 1.2 1997/01/12 19:11:59 tls Exp $ */
+
+/* Wrapper around the values.h/limits.h includes/ifdefs */
+/* $NetBSD: ksh_limval.h,v 1.2 1997/01/12 19:11:59 tls Exp $ */
+
+#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