summaryrefslogtreecommitdiff
path: root/shells/pdksh/files/ksh_limval.h
diff options
context:
space:
mode:
Diffstat (limited to 'shells/pdksh/files/ksh_limval.h')
-rw-r--r--shells/pdksh/files/ksh_limval.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/shells/pdksh/files/ksh_limval.h b/shells/pdksh/files/ksh_limval.h
new file mode 100644
index 00000000000..77219f04a17
--- /dev/null
+++ b/shells/pdksh/files/ksh_limval.h
@@ -0,0 +1,23 @@
+/* Wrapper around the values.h/limits.h includes/ifdefs */
+/* $Id: ksh_limval.h,v 1.1.1.1 2008/05/23 17:15:20 tnn 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