rc

[fork] interactive rc shell
Log | Files | Refs | README | LICENSE

commit b207419942677abc56fc2e6d2e4496ecf9a2c8d1
parent 8844d14005fe48ae8b2ae8fb9c45f012cc605877
Author: tgoodwin <tgoodwin>
Date:   Tue, 14 Jul 1998 17:17:23 +0000

Initial revision

Diffstat:
Arlimit.h | 42++++++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+), 0 deletions(-)

diff --git a/rlimit.h b/rlimit.h @@ -0,0 +1,42 @@ +/* What a mess. This file attempts to straighten everything out. */ + +#if HAVE_SETRLIMIT + +#if HAVE_SYS_RESOURCE_H +# include <sys/time.h> +# if RLIMIT_NEEDS_KERNEL +# define _KERNEL +# endif +# include <sys/resource.h> +# if RLIMIT_NEEDS_KERNEL +# undef _KERNEL +# endif +#else +# include <sys/times.h> +#endif + +#if HAVE_LIMITS_H +# include <limits.h> +#endif + +#ifndef HAVE_RLIM_T +# if RLIM_T_IS_QUAD_T +typedef quad_t rlim_t; +# else +typedef long rlim_t; +# endif +#endif + +#if HAVE_QUAD_T +# define RLIM_CONV quad_t +# define RLIM_FMT "%s \t%qd%s\n" +#else +# define RLIM_CONV long +# define RLIM_FMT "%s \t%ld%s\n" +#endif + +#if defined(RLIMIT_OFILE) && !defined (RLIMIT_NOFILE) +# define RLIMIT_NOFILE RLIMIT_OFILE +#endif + +#endif /* HAVE_SETRLIMIT */