Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/sys Namespace police: wrap RLIM_NLIMITS inside _NETBSD_S...



details:   https://anonhg.NetBSD.org/src/rev/6c434b1a45c2
branches:  trunk
changeset: 566052:6c434b1a45c2
user:      kleink <kleink%NetBSD.org@localhost>
date:      Mon Apr 26 10:33:38 2004 +0000

description:
Namespace police: wrap RLIM_NLIMITS inside _NETBSD_SOURCE since it's an
implementation detail; define ru_{first,last} only for _KERNEL.

diffstat:

 sys/sys/resource.h |  8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diffs (39 lines):

diff -r a8023fd0bff3 -r 6c434b1a45c2 sys/sys/resource.h
--- a/sys/sys/resource.h        Mon Apr 26 10:10:19 2004 +0000
+++ b/sys/sys/resource.h        Mon Apr 26 10:33:38 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: resource.h,v 1.25 2004/04/26 10:10:19 kleink Exp $     */
+/*     $NetBSD: resource.h,v 1.26 2004/04/26 10:33:38 kleink Exp $     */
 
 /*
  * Copyright (c) 1982, 1986, 1993
@@ -58,7 +58,9 @@
        struct timeval ru_utime;        /* user time used */
        struct timeval ru_stime;        /* system time used */
        long    ru_maxrss;              /* max resident set size */
+#ifdef _KERNEL
 #define        ru_first        ru_ixrss
+#endif
        long    ru_ixrss;               /* integral shared memory size */
        long    ru_idrss;               /* integral unshared data " */
        long    ru_isrss;               /* integral unshared stack " */
@@ -72,7 +74,9 @@
        long    ru_nsignals;            /* signals received */
        long    ru_nvcsw;               /* voluntary context switches */
        long    ru_nivcsw;              /* involuntary " */
+#ifdef _KERNEL
 #define        ru_last         ru_nivcsw
+#endif
 };
 
 /*
@@ -89,7 +93,9 @@
 #define        RLIMIT_NOFILE   8               /* number of open files */
 #define        RLIMIT_SBSIZE   9               /* maximum size of all socket buffers */
 
+#if defined(_NETBSD_SOURCE)
 #define        RLIM_NLIMITS    10              /* number of resource limits */
+#endif
 
 #define        RLIM_INFINITY   (~((u_quad_t)1 << 63))  /* no limit */
 #define        RLIM_SAVED_MAX  RLIM_INFINITY   /* unrepresentable hard limit */



Home | Main Index | Thread Index | Old Index