summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport/src/__gettod.c
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2009-09-30 06:45:38 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2009-09-30 06:45:38 +0000
commitcc9b81ea45d8bbae32231eb5dc6eca1deef6f723 (patch)
tree4f222425f4180e895d0caf44ce05262a625ab14c /cpukit/libcsupport/src/__gettod.c
parent2009-09-30 Ralf Corsépius <ralf.corsepius@rtems.org> (diff)
downloadrtems-cc9b81ea45d8bbae32231eb5dc6eca1deef6f723.tar.bz2
2009-09-30 Ralf Corsépius <ralf.corsepius@rtems.org>
* libcsupport/src/__gettod.c: Rework autoconf defines. Eliminate RTEMS_UNIX.
Diffstat (limited to 'cpukit/libcsupport/src/__gettod.c')
-rw-r--r--cpukit/libcsupport/src/__gettod.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/cpukit/libcsupport/src/__gettod.c b/cpukit/libcsupport/src/__gettod.c
index 17a1125b77..fdf6014799 100644
--- a/cpukit/libcsupport/src/__gettod.c
+++ b/cpukit/libcsupport/src/__gettod.c
@@ -17,22 +17,15 @@
#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
-#include <rtems.h>
-
-#if !defined(RTEMS_UNIX)
-#ifdef RTEMS_NEWLIB
-#include <sys/reent.h>
-#endif
-
+#if defined(RTEMS_NEWLIB)
#include <sys/time.h>
-#include <time.h>
-
#include <errno.h>
+#include <rtems.h>
+#if defined(RTEMS_NEWLIB) && !defined(HAVE_GETTIMEOFDAY)
/*
* NOTE: The solaris gettimeofday does not have a second parameter.
*/
-
int gettimeofday(
struct timeval *tp,
void * __tz __attribute__((unused))
@@ -59,13 +52,15 @@ int gettimeofday(
return 0;
}
+#endif
-#if defined(RTEMS_NEWLIB)
+#if defined(RTEMS_NEWLIB) && !defined(HAVE__GETTIMEOFDAY_R)
+
+#include <sys/reent.h>
/*
* "Reentrant" version
*/
-
int _gettimeofday_r(
struct _reent *ignored_reentrancy_stuff __attribute__((unused)),
struct timeval *tp,
@@ -74,7 +69,9 @@ int _gettimeofday_r(
{
return gettimeofday( tp, tzp );
}
+#endif
+#if defined(RTEMS_NEWLIB) && !defined(HAVE__GETTIMEOFDAY)
/*
* "System call" version
*/
@@ -86,7 +83,6 @@ int _gettimeofday(
{
return gettimeofday( tp, tzp );
}
+#endif
#endif /* defined(RTEMS_NEWLIB) */
-
-#endif