diff options
author | Szabolcs Nagy <nsz@port70.net> | 2014-04-14 17:42:49 +0200 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2014-04-15 19:17:52 -0400 |
commit | fcea534e579077e10456f6ed06c033dfaa013a24 (patch) | |
tree | 0d497c14049826bc71012a60e2ba04603e9c3b64 | |
parent | 96315d27b0e5000d53e09fb915c5066b3d47d3d2 (diff) | |
download | musl-fcea534e579077e10456f6ed06c033dfaa013a24.tar.gz musl-fcea534e579077e10456f6ed06c033dfaa013a24.tar.bz2 musl-fcea534e579077e10456f6ed06c033dfaa013a24.tar.xz musl-fcea534e579077e10456f6ed06c033dfaa013a24.zip |
fix RLIMIT_ constants for mips
The mips arch is special in that it uses different RLIMIT_
numbers than other archs, so allow bits/resource.h to override
the default RLIMIT_ numbers (empty on all archs except mips).
Reported by orc.
-rw-r--r-- | arch/arm/bits/resource.h | 0 | ||||
-rw-r--r-- | arch/i386/bits/resource.h | 0 | ||||
-rw-r--r-- | arch/microblaze/bits/resource.h | 0 | ||||
-rw-r--r-- | arch/mips/bits/resource.h | 5 | ||||
-rw-r--r-- | arch/powerpc/bits/resource.h | 0 | ||||
-rw-r--r-- | arch/sh/bits/resource.h | 0 | ||||
-rw-r--r-- | arch/x32/bits/resource.h | 0 | ||||
-rw-r--r-- | arch/x86_64/bits/resource.h | 0 | ||||
-rw-r--r-- | include/sys/resource.h | 7 |
9 files changed, 10 insertions, 2 deletions
diff --git a/arch/arm/bits/resource.h b/arch/arm/bits/resource.h new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/arch/arm/bits/resource.h diff --git a/arch/i386/bits/resource.h b/arch/i386/bits/resource.h new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/arch/i386/bits/resource.h diff --git a/arch/microblaze/bits/resource.h b/arch/microblaze/bits/resource.h new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/arch/microblaze/bits/resource.h diff --git a/arch/mips/bits/resource.h b/arch/mips/bits/resource.h new file mode 100644 index 00000000..414a4054 --- /dev/null +++ b/arch/mips/bits/resource.h @@ -0,0 +1,5 @@ +#define RLIMIT_NOFILE 5 +#define RLIMIT_AS 6 +#define RLIMIT_RSS 7 +#define RLIMIT_NPROC 8 +#define RLIMIT_MEMLOCK 9 diff --git a/arch/powerpc/bits/resource.h b/arch/powerpc/bits/resource.h new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/arch/powerpc/bits/resource.h diff --git a/arch/sh/bits/resource.h b/arch/sh/bits/resource.h new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/arch/sh/bits/resource.h diff --git a/arch/x32/bits/resource.h b/arch/x32/bits/resource.h new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/arch/x32/bits/resource.h diff --git a/arch/x86_64/bits/resource.h b/arch/x86_64/bits/resource.h new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/arch/x86_64/bits/resource.h diff --git a/include/sys/resource.h b/include/sys/resource.h index 7fd6a375..58392d64 100644 --- a/include/sys/resource.h +++ b/include/sys/resource.h @@ -15,6 +15,7 @@ extern "C" { #endif #include <bits/alltypes.h> +#include <bits/resource.h> typedef unsigned long long rlim_t; @@ -78,11 +79,13 @@ int prlimit(pid_t, int, const struct rlimit *, struct rlimit *); #define RLIMIT_DATA 2 #define RLIMIT_STACK 3 #define RLIMIT_CORE 4 +#ifndef RLIMIT_RSS #define RLIMIT_RSS 5 -#define RLIMIT_NOFILE 7 -#define RLIMIT_AS 9 #define RLIMIT_NPROC 6 +#define RLIMIT_NOFILE 7 #define RLIMIT_MEMLOCK 8 +#define RLIMIT_AS 9 +#endif #define RLIMIT_LOCKS 10 #define RLIMIT_SIGPENDING 11 #define RLIMIT_MSGQUEUE 12 |