2011-12-13 Ralf Corsépius <ralf.corsepius@rtems.org>

* configure.ac: Check for getrusage.h decl.
	* libcsupport/src/getrusage.c:
	Apply HAVE_DECL_GETRUSAGE (Missing prototypes).
This commit is contained in:
Ralf Corsepius
2011-12-13 06:47:21 +00:00
parent 055e668569
commit 66496446db
3 changed files with 13 additions and 0 deletions
+6
View File
@@ -1,3 +1,9 @@
2011-12-13 Ralf Corsépius <ralf.corsepius@rtems.org>
* configure.ac: Check for getrusage.h decl.
* libcsupport/src/getrusage.c:
Apply HAVE_DECL_GETRUSAGE (Missing prototypes).
2011-12-12 Sebastian Huber <sebastian.huber@embedded-brains.de>
* score/src/wkstringduplicate.c: New file.
+3
View File
@@ -98,6 +98,9 @@ RTEMS_CHECK_FUNC([pthread_attr_setguardsize],[#include <pthread.h>])
RTEMS_CHECK_FUNC([pthread_attr_setstack],[#include <pthread.h>])
RTEMS_CHECK_FUNC([pthread_attr_getstack],[#include <pthread.h>])
# Mandated by POSIX, not declared in some versions of newlib.
AC_CHECK_DECLS([getrusage],,,[#include sys/resource.h])
# Newlib's unix/ directory
AC_CHECK_FUNCS([ttyname getcwd])
# </FIXME>
+4
View File
@@ -19,6 +19,10 @@
#include <rtems.h>
#include <rtems/seterr.h>
#if !HAVE_DECL_GETRUSAGE
extern int getrusage(int who, struct rusage *usage);
#endif
int getrusage(int who, struct rusage *usage)
{
struct timespec uptime;