2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these librararies and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
23 /* $XConsortium: ulimit.h /main/3 1995/11/01 16:44:27 rswiston $ */
24 /***************************************************************
26 * AT&T - PROPRIETARY *
28 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF *
29 * AT&T BELL LABORATORIES *
30 * AND IS NOT TO BE DISCLOSED OR USED EXCEPT IN *
31 * ACCORDANCE WITH APPLICABLE AGREEMENTS *
33 * Copyright (c) 1995 AT&T Corp. *
34 * Unpublished & Not for Publication *
35 * All Rights Reserved *
37 * The copyright notice above does not evidence any *
38 * actual or intended publication of such source code *
40 * This software was created by the *
41 * Advanced Software Technology Department *
42 * AT&T Bell Laboratories *
44 * For further information contact *
45 * {research,attmail}!dgk *
47 ***************************************************************/
49 /* : : generated by proto : : */
52 #if !defined(__PROTO__)
53 #if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
54 #if defined(__cplusplus)
55 #define __MANGLE__ "C"
60 #define __PROTO__(x) x
62 #define __PARAM__(n,o) n
63 #if !defined(__STDC__) && !defined(__cplusplus)
64 #if !defined(c_plusplus)
75 #define __PROTO__(x) ()
76 #define __OTORP__(x) x
77 #define __PARAM__(n,o) o
85 #if defined(__cplusplus) || defined(c_plusplus)
86 #define __VARARG__ ...
90 #if defined(__STDARG__)
91 #define __VA_START__(p,a) va_start(p,a)
93 #define __VA_START__(p,a) va_start(p)
99 * This is for the ulimit built-in command
103 #include "FEATURE/rlimits"
104 #if defined(_sys_resource) && defined(_lib_getrlimit)
105 # include "FEATURE/time"
106 # include <sys/resource.h>
107 # if !defined(RLIMIT_FSIZE) && defined(_sys_vlimit)
108 /* This handles hp/ux problem */
109 # include <sys/vlimit.h>
110 # define RLIMIT_FSIZE (LIM_FSIZE-1)
111 # define RLIMIT_DATA (LIM_DATA-1)
112 # define RLIMIT_STACK (LIM_STACK-1)
113 # define RLIMIT_CORE (LIM_CORE-1)
114 # define RLIMIT_CPU (LIM_CPU-1)
116 # define RLIMIT_RSS (LIM_MAXRSS-1)
117 # endif /* LIM_MAXRSS */
122 # include <sys/vlimit.h>
124 # define RLIMIT_FSIZE LIM_FSIZE
125 # define RLIMIT_DATA LIM_DATA
126 # define RLIMIT_STACK LIM_STACK
127 # define RLIMIT_CORE LIM_CORE
128 # define RLIMIT_CPU LIM_CPU
130 # define RLIMIT_RSS LIM_MAXRSS
131 # endif /* LIM_MAXRSS */
134 # define vlimit ulimit
135 # endif /* _lib_ulimit */
136 # endif /* _lib_vlimit */
140 # define INFINITY RLIM_INFINITY
143 # define INFINITY -1L
144 # endif /* INFINITY */
145 #endif /* RLIM_INFINITY */
147 #if defined(_lib_getrlimit) || defined(_lib_vlimit) || defined(_lib_ulimit)
149 # define RLIMIT_CPU 0
150 # endif /* !RLIMIT_CPU */
152 # define RLIMIT_DATA 0
153 # endif /* !RLIMIT_DATA */
155 # define RLIMIT_RSS 0
156 # endif /* !RLIMIT_RSS */
157 # ifndef RLIMIT_STACK
158 # define RLIMIT_STACK 0
159 # endif /* !RLIMIT_STACK */
161 # define RLIMIT_CORE 0
162 # endif /* !RLIMIT_CORE */
164 # define RLIMIT_VMEM 0
165 # endif /* !RLIMIT_VMEM */
166 # ifndef RLIMIT_NOFILE
167 # define RLIMIT_NOFILE 0
168 # endif /* !RLIMIT_NOFILE */
172 extern __MANGLE__ const char e_unlimited[];
174 #endif /* _ULIMIT_H */