shithub: riscv

ref: 42ec5a0729a73a383203ba969be07fc0b2ee8ecd
dir: /sys/src/ape/cmd/pdksh/ksh_limval.h/

View raw version
/* Wrapper around the values.h/limits.h includes/ifdefs */
/* $Id$ */

#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