1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 # if __GNUC__ >= 3
18 @PRAGMA_SYSTEM_HEADER@
19 # endif
20 @PRAGMA_COLUMNS@
21
22 #ifndef _@GUARD_PREFIX@_SYS_RESOURCE_H
23
24 #if @HAVE_SYS_RESOURCE_H@
25
26
27
28 # include <sys/types.h>
29 # include <sys/time.h>
30
31
32 # @INCLUDE_NEXT@ @NEXT_SYS_RESOURCE_H@
33
34 #endif
35
36 #ifndef _@GUARD_PREFIX@_SYS_RESOURCE_H
37 #define _@GUARD_PREFIX@_SYS_RESOURCE_H
38
39 #if !@HAVE_SYS_RESOURCE_H@
40
41
42
43 # include <sys/time.h>
44
45
46 # define RUSAGE_SELF 0
47 # define RUSAGE_CHILDREN -1
48
49 # ifdef __cplusplus
50 extern "C" {
51 # endif
52
53 # if !GNULIB_defined_struct_rusage
54
55
56 struct rusage
57 {
58 struct timeval ru_utime;
59 struct timeval ru_stime;
60 long ru_maxrss;
61 long ru_ixrss;
62 long ru_idrss;
63 long ru_isrss;
64 long ru_minflt;
65 long ru_majflt;
66 long ru_nswap;
67 long ru_inblock;
68 long ru_oublock;
69 long ru_msgsnd;
70 long ru_msgrcv;
71 long ru_nsignals;
72 long ru_nvcsw;
73 long ru_nivcsw;
74 };
75 # define GNULIB_defined_struct_rusage 1
76 # endif
77
78 # ifdef __cplusplus
79 }
80 # endif
81
82 #else
83
84 # ifdef __VMS
85
86 # ifndef RUSAGE_SELF
87 # define RUSAGE_SELF 0
88 # endif
89 # ifndef RUSAGE_CHILDREN
90 # define RUSAGE_CHILDREN -1
91 # endif
92 # endif
93
94 #endif
95
96
97
98
99
100
101
102
103
104
105
106 #if @GNULIB_GETRUSAGE@
107 # if !@HAVE_GETRUSAGE@
108 _GL_FUNCDECL_SYS (getrusage, int, (int who, struct rusage *usage_p)
109 _GL_ARG_NONNULL ((2)));
110 # endif
111 _GL_CXXALIAS_SYS (getrusage, int, (int who, struct rusage *usage_p));
112 _GL_CXXALIASWARN (getrusage);
113 #elif defined GNULIB_POSIXCHECK
114 # undef getrusage
115 # if HAVE_RAW_DECL_GETRUSAGE
116 _GL_WARN_ON_USE (getrusage, "getrusage is unportable - "
117 "use gnulib module getrusage for portability");
118 # endif
119 #endif
120
121
122 #endif
123 #endif