~mdw
/
fwd
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use new `mLib' function annotations.
[fwd]
/
exec.c
diff --git
a/exec.c
b/exec.c
index
9b7e87b
..
afd7942
100644
(file)
--- a/
exec.c
+++ b/
exec.c
@@
-33,8
+33,9
@@
#ifdef HAVE_SETRLIMIT
typedef struct xlimit {
#ifdef HAVE_SETRLIMIT
typedef struct xlimit {
-#define R(r, n) struct rlimit n;
-#include "rlimits.h"
+#define XLIMIT_ENTRY(name, constant) struct rlimit name;
+ RLIMITS(XLIMIT_ENTRY)
+#undef XLIMIT_ENTRY
} xlimit;
#endif
} xlimit;
#endif
@@
-138,8
+139,10
@@
typedef struct rlimit_ent {
} rlimit_ent;
static rlimit_ent rlimits[] = {
} rlimit_ent;
static rlimit_ent rlimits[] = {
-#define R(r, n) { #n, #r, r, offsetof(xlimit, n) },
-#include "rlimits.h"
+#define TABLE_ENTRY(name, constant) \
+ { #name, #constant, constant, offsetof(xlimit, name) },
+ RLIMITS(TABLE_ENTRY)
+#undef TABLE_ENTRY
{ 0, 0, 0, 0 }
};
{ 0, 0, 0, 0 }
};
@@
-269,8
+272,9
@@
static int rlimit_option(xlimit *xl, scanner *sc)
break;
case w_soft:
if (v > rl->rlim_max)
break;
case w_soft:
if (v > rl->rlim_max)
- error(sc, "soft limit %l exceeds hard limit %l for %s",
- v, rl->rlim_max, chosen->rname);
+ error(sc, "soft limit %lu exceeds hard limit %lu for %s",
+ (unsigned long)v, (unsigned long)rl->rlim_max,
+ chosen->rname);
rl->rlim_cur = v;
break;
case w_hard:
rl->rlim_cur = v;
break;
case w_hard: