summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests/psxgetrusage01
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2011-12-13 06:52:09 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2011-12-13 06:52:09 +0000
commit4b2746331189715bb668299fa6d7f5108b31bcce (patch)
tree310660b68f36ba8c275e84d9afcb25c786cd2bda /testsuites/psxtests/psxgetrusage01
parent2011-12-13 Ralf Corsépius <ralf.corsepius@rtems.org> (diff)
downloadrtems-4b2746331189715bb668299fa6d7f5108b31bcce.tar.bz2
2011-12-13 Ralf Corsépius <ralf.corsepius@rtems.org>
* configure.ac: Check for getrusage decl. * psxgetrusage01/init.c: Fix header file inclusion order. Move configuration section up. Apply HAVE_DECL_GETRUSAGE.
Diffstat (limited to 'testsuites/psxtests/psxgetrusage01')
-rw-r--r--testsuites/psxtests/psxgetrusage01/init.c35
1 files changed, 18 insertions, 17 deletions
diff --git a/testsuites/psxtests/psxgetrusage01/init.c b/testsuites/psxtests/psxgetrusage01/init.c
index b488e65183..a97c71ab75 100644
--- a/testsuites/psxtests/psxgetrusage01/init.c
+++ b/testsuites/psxtests/psxgetrusage01/init.c
@@ -13,14 +13,28 @@
#include "config.h"
#endif
-#include <tmacros.h>
-#include "test_support.h"
-
#include <sys/time.h>
#include <sys/resource.h>
#include <errno.h>
-int getrusage(int who, struct rusage *usage);
+#if !HAVE_DECL_GETRUSAGE
+extern int getrusage(int who, struct rusage *usage);
+#endif
+
+#include <tmacros.h>
+#include "test_support.h"
+
+/* configuration information */
+
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+
+#define CONFIGURE_MAXIMUM_TASKS 1
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
rtems_task Init(
rtems_task_argument argument
@@ -65,16 +79,3 @@ rtems_task Init(
rtems_test_exit(0);
}
-
-/* configuration information */
-
-#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS 1
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#define CONFIGURE_INIT
-
-#include <rtems/confdefs.h>
-/* end of file */