projects
/
external
/
binutils.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
* sim/cris: New directory with C and assembly tests for the CRIS
[external/binutils.git]
/
sim
/
testsuite
/
sim
/
cris
/
c
/
setrlimit1.c
1
/* Check corner error case: specifying unimplemented resource.
2
#notarget: cris*-*-elf
3
*/
4
#include <sys/time.h>
5
#include <sys/resource.h>
6
#include <unistd.h>
7
#include <stdio.h>
8
#include <errno.h>
9
#include <stdlib.h>
10
#include <string.h>
11
12
int main (void)
13
{
14
struct rlimit lim;
15
memset (&lim, 0, sizeof lim);
16
17
if (setrlimit (RLIMIT_NPROC, &lim) != -1
18
|| errno != EINVAL)
19
abort ();
20
printf ("pass\n");
21
exit (0);
22
}