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

Side by Side Diff: fusl/src/linux/prlimit.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/linux/fallocate.c ('k') | fusl/src/linux/sendfile.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 #define _GNU_SOURCE 1 #define _GNU_SOURCE
2 #include <sys/resource.h> 2 #include <sys/resource.h>
3 #include "syscall.h" 3 #include "syscall.h"
4 #include "libc.h" 4 #include "libc.h"
5 5
6 #define FIX(x) \ 6 #define FIX(x) \
7 do { \ 7 do { \
8 if ((x) >= SYSCALL_RLIM_INFINITY) \ 8 if ((x) >= SYSCALL_RLIM_INFINITY) \
9 (x) = RLIM_INFINITY; \ 9 (x) = RLIM_INFINITY; \
10 } while (0) 10 } while (0)
(...skipping 10 matching lines...) Expand all
21 FIX(tmp.rlim_max); 21 FIX(tmp.rlim_max);
22 new_limit = &tmp; 22 new_limit = &tmp;
23 } 23 }
24 r = syscall(SYS_prlimit64, pid, resource, new_limit, old_limit); 24 r = syscall(SYS_prlimit64, pid, resource, new_limit, old_limit);
25 if (!r && old_limit && SYSCALL_RLIM_INFINITY != RLIM_INFINITY) { 25 if (!r && old_limit && SYSCALL_RLIM_INFINITY != RLIM_INFINITY) {
26 FIX(old_limit->rlim_cur); 26 FIX(old_limit->rlim_cur);
27 FIX(old_limit->rlim_max); 27 FIX(old_limit->rlim_max);
28 } 28 }
29 return r; 29 return r;
30 } 30 }
31
32 #undef prlimit64
33 LFS64(prlimit);
OLDNEW
« no previous file with comments | « fusl/src/linux/fallocate.c ('k') | fusl/src/linux/sendfile.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698