mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-02 17:28:30 +00:00
Fix small matters and improve sysconf()
- Fix mkdeps.com out of memory error - Remove static memory from __get_cpu_count() - Add support for passing hyphen to cat in cocmd - Change more ZipOS errors from ENOTSUP to EROFS - Specify mem_unit in sysinfo() output on BSD OSes
This commit is contained in:
parent
eebc24b9cd
commit
3a9cac4892
55 changed files with 411 additions and 262 deletions
|
@ -21,9 +21,9 @@
|
|||
#include "libc/macros.internal.h"
|
||||
#include "libc/sysv/consts/rlim.h"
|
||||
|
||||
long _GetResourceLimit(int resource) {
|
||||
long __get_rlimit(int resource) {
|
||||
struct rlimit rl;
|
||||
getrlimit(resource, &rl);
|
||||
if (getrlimit(resource, &rl) == -1) return -1;
|
||||
if (rl.rlim_cur == RLIM_INFINITY) return -1;
|
||||
return MIN(rl.rlim_cur, LONG_MAX);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue