Fix issue with RUSAGE constants not being in C headers if negative

This commit is contained in:
Jeremy Soller
2018-07-12 09:49:53 -06:00
parent 9c27110de1
commit 463c9f386c
3 changed files with 15 additions and 4 deletions
+9
View File
@@ -0,0 +1,9 @@
#ifndef _BITS_SYS_RESOURCE_H
#define _BITS_SYS_RESOURCE_H
#define RUSAGE_SELF 0
#define RUSAGE_CHILDREN (-1)
#define RUSAGE_BOTH (-2)
#define RUSAGE_THREAD 1
#endif /* _BITS_SYS_RESOURCE_H */
+1
View File
@@ -1,5 +1,6 @@
sys_includes = ["sys/types.h", "stdint.h", "sys/time.h"]
include_guard = "_SYS_RESOURCE_H"
trailer = "#include <bits/sys/resource.h>"
language = "C"
# WORKAROUND:
+5 -4
View File
@@ -9,10 +9,11 @@ extern crate sys_time;
use platform::types::*;
use sys_time::timeval;
pub const RUSAGE_SELF: c_int = 0;
pub const RUSAGE_CHILDREN: c_int = -1;
pub const RUSAGE_BOTH: c_int = -2;
pub const RUSAGE_THREAD: c_int = 1;
// Exported in bits file
const RUSAGE_SELF: c_int = 0;
const RUSAGE_CHILDREN: c_int = -1;
const RUSAGE_BOTH: c_int = -2;
const RUSAGE_THREAD: c_int = 1;
type rlim_t = u64;