summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/i386
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/i386')
-rw-r--r--sysdeps/unix/sysv/linux/i386/bits/resource.h46
-rw-r--r--sysdeps/unix/sysv/linux/i386/setrlimit.c2
2 files changed, 13 insertions, 35 deletions
diff --git a/sysdeps/unix/sysv/linux/i386/bits/resource.h b/sysdeps/unix/sysv/linux/i386/bits/resource.h
index fcff605892..710f1119c0 100644
--- a/sysdeps/unix/sysv/linux/i386/bits/resource.h
+++ b/sysdeps/unix/sysv/linux/i386/bits/resource.h
@@ -21,7 +21,6 @@
# error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
#endif
-#include <asm/resource.h>
#include <bits/types.h>
/* Transmute defines to enumerations. The macro re-definitions are
@@ -33,72 +32,51 @@
enum __rlimit_resource
{
/* Per-process CPU limit, in seconds. */
- _RLIMIT_CPU = RLIMIT_CPU,
-#undef RLIMIT_CPU
- RLIMIT_CPU = _RLIMIT_CPU,
+ RLIMIT_CPU = 0,
#define RLIMIT_CPU RLIMIT_CPU
/* Largest file that can be created, in bytes. */
- _RLIMIT_FSIZE = RLIMIT_FSIZE,
-#undef RLIMIT_FSIZE
- RLIMIT_FSIZE = _RLIMIT_FSIZE,
+ RLIMIT_FSIZE = 1,
#define RLIMIT_FSIZE RLIMIT_FSIZE
/* Maximum size of data segment, in bytes. */
- _RLIMIT_DATA = RLIMIT_DATA,
-#undef RLIMIT_DATA
- RLIMIT_DATA = _RLIMIT_DATA,
+ RLIMIT_DATA = 2,
#define RLIMIT_DATA RLIMIT_DATA
/* Maximum size of stack segment, in bytes. */
- _RLIMIT_STACK = RLIMIT_STACK,
-#undef RLIMIT_STACK
- RLIMIT_STACK = _RLIMIT_STACK,
+ RLIMIT_STACK = 3,
#define RLIMIT_STACK RLIMIT_STACK
/* Largest core file that can be created, in bytes. */
- _RLIMIT_CORE = RLIMIT_CORE,
-#undef RLIMIT_CORE
- RLIMIT_CORE = _RLIMIT_CORE,
+ RLIMIT_CORE = 4,
#define RLIMIT_CORE RLIMIT_CORE
/* Largest resident set size, in bytes.
This affects swapping; processes that are exceeding their
resident set size will be more likely to have physical memory
taken from them. */
- _RLIMIT_RSS = RLIMIT_RSS,
-#undef RLIMIT_RSS
- RLIMIT_RSS = _RLIMIT_RSS,
+ RLIMIT_RSS = 5,
#define RLIMIT_RSS RLIMIT_RSS
/* Number of open files. */
- _RLIMIT_NOFILE = RLIMIT_NOFILE,
-#undef RLIMIT_NOFILE
- RLIMIT_NOFILE = _RLIMIT_NOFILE,
+ RLIMIT_NOFILE = 7,
RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */
#define RLIMIT_NOFILE RLIMIT_NOFILE
#define RLIMIT_OFILE RLIMIT_OFILE
- /* Address space limit (?) */
- _RLIMIT_AS = RLIMIT_AS,
-#undef RLIMIT_AS
- RLIMIT_AS = _RLIMIT_AS,
+ /* Address space limit. */
+ RLIMIT_AS = 9,
#define RLIMIT_AS RLIMIT_AS
/* Number of processes. */
- _RLIMIT_NPROC = RLIMIT_NPROC,
-#undef RLIMIT_NPROC
- RLIMIT_NPROC = _RLIMIT_NPROC,
+ RLIMIT_NPROC = 6,
#define RLIMIT_NPROC RLIMIT_NPROC
/* Locked-in-memory address space. */
- _RLIMIT_MEMLOCK = RLIMIT_MEMLOCK,
-#undef RLIMIT_MEMLOCK
- RLIMIT_MEMLOCK = _RLIMIT_MEMLOCK,
+ RLIMIT_MEMLOCK = 8,
#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK
- RLIMIT_NLIMITS = RLIM_NLIMITS,
-#undef RLIM_NLIMITS
+ RLIMIT_NLIMITS = 10,
RLIM_NLIMITS = RLIMIT_NLIMITS
#define RLIMIT_NLIMITS RLIMIT_NLIMITS
#define RLIM_NLIMITS RLIM_NLIMITS
diff --git a/sysdeps/unix/sysv/linux/i386/setrlimit.c b/sysdeps/unix/sysv/linux/i386/setrlimit.c
index 2123360fc9..e8adeed5e9 100644
--- a/sysdeps/unix/sysv/linux/i386/setrlimit.c
+++ b/sysdeps/unix/sysv/linux/i386/setrlimit.c
@@ -50,7 +50,7 @@ __new_setrlimit (enum __rlimit_resource resource, const struct rlimit *rlimits)
/* Check if the new ugetrlimit syscall exists. We must do this
first because older kernels don't reject negative rlimit
values in setrlimit. */
- result = INLINE_SYSCALL (ugetrlimit, 2, resource, &rlimits_small);
+ int result = INLINE_SYSCALL (ugetrlimit, 2, resource, &rlimits_small);
if (result != -1 || errno != ENOSYS)
/* The syscall exists. */
__have_no_new_getrlimit = -1;