From cc9b81ea45d8bbae32231eb5dc6eca1deef6f723 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Wed, 30 Sep 2009 06:45:38 +0000 Subject: =?UTF-8?q?2009-09-30=09Ralf=20Cors=C3=A9pius=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * libcsupport/src/__gettod.c: Rework autoconf defines. Eliminate RTEMS_UNIX. --- cpukit/libcsupport/src/__gettod.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'cpukit/libcsupport/src/__gettod.c') 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 - -#if !defined(RTEMS_UNIX) -#ifdef RTEMS_NEWLIB -#include -#endif - +#if defined(RTEMS_NEWLIB) #include -#include - #include +#include +#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 /* * "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 -- cgit v1.2.3