/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1982-2010 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
* *
* Information and Software Systems Research *
* AT&T Research *
* Florham Park NJ *
* *
* David Korn <dgk@research.att.com> *
* *
***********************************************************************/
#pragma prototyped
#ifndef _ULIMIT_H
/*
* This is for the ulimit built-in command
*/
#if defined(_sys_resource) && defined(_lib_getrlimit)
# include <sys/resource.h>
# if !defined(RLIMIT_FSIZE) && defined(_sys_vlimit)
# ifdef LIM_MAXRSS
# endif /* LIM_MAXRSS */
# endif
#else
# ifdef _sys_vlimit
# ifdef LIM_MAXRSS
# endif /* LIM_MAXRSS */
# else
# ifdef _lib_ulimit
# endif /* _lib_ulimit */
# endif /* _lib_vlimit */
#endif
#ifdef RLIM_INFINITY
#else
# ifndef INFINITY
# endif /* INFINITY */
#endif /* RLIM_INFINITY */
# ifndef RLIMIT_CPU
# define RLIMIT_CPU 0
# endif /* !RLIMIT_CPU */
# ifndef RLIMIT_DATA
# define RLIMIT_DATA 0
# endif /* !RLIMIT_DATA */
# ifndef RLIMIT_RSS
# define RLIMIT_RSS 0
# endif /* !RLIMIT_RSS */
# ifndef RLIMIT_STACK
# define RLIMIT_STACK 0
# endif /* !RLIMIT_STACK */
# ifndef RLIMIT_CORE
# define RLIMIT_CORE 0
# endif /* !RLIMIT_CORE */
# ifndef RLIMIT_VMEM
# define RLIMIT_VMEM 0
# endif /* !RLIMIT_VMEM */
# ifndef RLIMIT_NOFILE
# define RLIMIT_NOFILE 0
# endif /* !RLIMIT_NOFILE */
#else
# define _no_ulimit
#endif
#ifndef _typ_rlim_t
typedef long rlim_t;
#endif
#if !defined(RLIMIT_NOFILE) && defined(RLIMIT_OFILE)
#endif
#ifndef RLIMIT_UNKNOWN
#endif
#ifndef RLIMIT_AS
#endif
#ifndef RLIMIT_CORE
#endif
#ifndef RLIMIT_CPU
#endif
#ifndef RLIMIT_DATA
#endif
#ifndef RLIMIT_FSIZE
#endif
#ifndef RLIMIT_LOCKS
#endif
#ifndef RLIMIT_MEMLOCK
#endif
#ifndef RLIMIT_NOFILE
#endif
#ifndef RLIMIT_NPROC
#endif
#ifndef RLIMIT_PIPE
#endif
#ifndef RLIMIT_RSS
#endif
#ifndef RLIMIT_SBSIZE
#endif
#ifndef RLIMIT_STACK
#endif
#ifndef RLIMIT_PTHREAD
#endif
#ifndef RLIMIT_VMEM
#endif
#define LIM_COUNT 0
typedef struct Limit_s
{
const char* description;
int index;
const char* conf;
unsigned char option;
unsigned char type;
} Limit_t;
extern const Limit_t shtab_limits[];
extern const int shtab_units[];
extern const char e_unlimited[];
extern const char* e_units[];
#endif /* _ULIMIT_H */