(experimental) implement getrusage via times if not found
This commit is contained in:
22
sh.h
22
sh.h
@@ -102,14 +102,28 @@
|
||||
#define __SCCSID(x) __IDSTRING(sccsid,x)
|
||||
|
||||
#ifdef EXTERN
|
||||
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.286 2009/03/25 21:45:28 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.287 2009/04/03 09:39:07 tg Exp $");
|
||||
#endif
|
||||
#define MKSH_VERSION "R37 2009/03/25"
|
||||
#define MKSH_VERSION "R37 2009/04/03"
|
||||
|
||||
#ifndef MKSH_INCLUDES_ONLY
|
||||
|
||||
/* extra types */
|
||||
|
||||
#if !HAVE_GETRUSAGE
|
||||
#undef rusage
|
||||
#undef RUSAGE_SELF
|
||||
#undef RUSAGE_CHILDREN
|
||||
#define rusage mksh_rusage
|
||||
#define RUSAGE_SELF 0
|
||||
#define RUSAGE_CHILDREN -1
|
||||
|
||||
struct rusage {
|
||||
struct timeval ru_utime;
|
||||
struct timeval ru_stime;
|
||||
};
|
||||
#endif
|
||||
|
||||
#if !HAVE_RLIM_T
|
||||
typedef long rlim_t;
|
||||
#endif
|
||||
@@ -216,6 +230,10 @@ extern uint32_t arc4random_pushb(void *, size_t);
|
||||
extern int flock(int, int);
|
||||
#endif
|
||||
|
||||
#if !HAVE_GETRUSAGE
|
||||
extern int getrusage(int, struct rusage *);
|
||||
#endif
|
||||
|
||||
#if !HAVE_REVOKE_DECL
|
||||
extern int revoke(const char *);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user