Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(175)

Side by Side Diff: fusl/src/misc/setrlimit.c

Issue 1716893002: [fusl] Remove LFS64 macro (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: apptest rebase Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « fusl/src/misc/nftw.c ('k') | fusl/src/regex/glob.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #include <sys/resource.h> 1 #include <sys/resource.h>
2 #include <errno.h> 2 #include <errno.h>
3 #include "syscall.h" 3 #include "syscall.h"
4 #include "libc.h" 4 #include "libc.h"
5 5
6 #define MIN(a, b) ((a) < (b) ? (a) : (b)) 6 #define MIN(a, b) ((a) < (b) ? (a) : (b))
7 #define FIX(x) \ 7 #define FIX(x) \
8 do { \ 8 do { \
9 if ((x) >= SYSCALL_RLIM_INFINITY) \ 9 if ((x) >= SYSCALL_RLIM_INFINITY) \
10 (x) = RLIM_INFINITY; \ 10 (x) = RLIM_INFINITY; \
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 int setrlimit(int resource, const struct rlimit* rlim) { 43 int setrlimit(int resource, const struct rlimit* rlim) {
44 struct ctx c = {.res = resource, .rlim = rlim, .err = -1}; 44 struct ctx c = {.res = resource, .rlim = rlim, .err = -1};
45 __synccall(do_setrlimit, &c); 45 __synccall(do_setrlimit, &c);
46 if (c.err) { 46 if (c.err) {
47 if (c.err > 0) 47 if (c.err > 0)
48 errno = c.err; 48 errno = c.err;
49 return -1; 49 return -1;
50 } 50 }
51 return 0; 51 return 0;
52 } 52 }
53
54 LFS64(setrlimit);
OLDNEW
« no previous file with comments | « fusl/src/misc/nftw.c ('k') | fusl/src/regex/glob.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698