[PATCH] struct rlimit

Matthew Wilcox (Matthew.Wilcox@genedata.com)
Wed, 1 Sep 1999 23:22:30 +0200


According to the Unix98 spec, struct rlimit should contain elements of
type rlim_t, and rlim_t should be an unsigned type. There are also two
missing values: RLIM_SAVED_CUR and RLIM_SAVED_MAX. Please apply to both
2.2 and 2.3.

diff -u linux-2.2.12/include/linux/resource.h linux-2.2.12-Wclean/include/linux/resource.h
--- linux-2.2.12/include/linux/resource.h Thu Aug 26 21:41:53 1999
+++ linux-2.2.12-Wclean/include/linux/resource.h Wed Sep 1 18:10:23 1999
@@ -38,10 +38,14 @@
};

#define RLIM_INFINITY ((long)(~0UL>>1))
+#define RLIM_SAVED_CUR RLIM_INFINITY
+#define RLIM_SAVED_MAX RLIM_INFINITY
+
+typedef unsigned long rlim_t;

struct rlimit {
- long rlim_cur;
- long rlim_max;
+ rlim_t rlim_cur;
+ rlim_t rlim_max;
};

#define PRIO_MIN (-20)

-- 
Matthew Wilcox <willy@bofh.ai>
"Windows and MacOS are products, contrived by engineers in the service of
specific companies. Unix, by contrast, is not so much a product as it is a
painstakingly compiled oral history of the hacker subculture." - N Stephenson

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/