diff options
author | Bruno Haible <bruno@clisp.org> | 2012-04-13 00:48:57 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2012-04-13 00:52:31 +0200 |
commit | 189ef2bce0bea3a3cae08df756a7b2035a9764e0 (patch) | |
tree | 63da655513b4ec442b3fa62204de2ea492e15adf /m4/getrusage.m4 | |
parent | 92412dcaaedf64c2f2062d98f5961f2bfedf7808 (diff) | |
download | gnulib-189ef2bce0bea3a3cae08df756a7b2035a9764e0.tar.gz |
New module 'getrusage'.
* lib/sys_resource.in.h: Include arg-nonnull.h, c++defs.h,
warn-on-use.h.
(getrusage): New declaration.
* lib/getrusage.c: New file.
* m4/getrusage.m4: New file.
* m4/sys_resource_h.m4 (gl_HEADER_SYS_RESOURCE): Test whether getrusage
is declared.
(gl_SYS_RESOURCE_H_DEFAULTS): Initialize GNULIB_GETRUSAGE,
HAVE_GETRUSAGE.
* modules/sys_resource (Depends-on): Add snippet/arg-nonnull,
snippet/c++defs, snippet/warn-on-use.
(Makefile.am): Update generation of sys/resource.h. Substitute
GNULIB_GETRUSAGE, HAVE_GETRUSAGE.
* modules/getrusage: New file.
* doc/posix-functions/getrusage.texi: Mention the new module.
Diffstat (limited to 'm4/getrusage.m4')
-rw-r--r-- | m4/getrusage.m4 | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/m4/getrusage.m4 b/m4/getrusage.m4 new file mode 100644 index 0000000000..734b2f0e78 --- /dev/null +++ b/m4/getrusage.m4 @@ -0,0 +1,14 @@ +# getrusage.m4 serial 1 +dnl Copyright (C) 2012 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_FUNC_GETRUSAGE], +[ + AC_REQUIRE([gl_SYS_RESOURCE_H_DEFAULTS]) + AC_CHECK_FUNCS_ONCE([getrusage]) + if test $ac_cv_func_getrusage = no; then + HAVE_GETRUSAGE=0 + fi +]) |