diff options
author | Ralf Corsepius <ralf.corsepius@rtems.org> | 2009-09-30 06:45:38 +0000 |
---|---|---|
committer | Ralf Corsepius <ralf.corsepius@rtems.org> | 2009-09-30 06:45:38 +0000 |
commit | cc9b81ea45d8bbae32231eb5dc6eca1deef6f723 (patch) | |
tree | 4f222425f4180e895d0caf44ce05262a625ab14c /cpukit | |
parent | 2009-09-30 Ralf Corsépius <ralf.corsepius@rtems.org> (diff) | |
download | rtems-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')
-rw-r--r-- | cpukit/ChangeLog | 2 | ||||
-rw-r--r-- | cpukit/libcsupport/src/__gettod.c | 24 |
2 files changed, 12 insertions, 14 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index f8a811e4ab..f193a84458 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,5 +1,7 @@ 2009-09-30 Ralf Corsépius <ralf.corsepius@rtems.org> + * libcsupport/src/__gettod.c: Rework autoconf defines. + Eliminate RTEMS_UNIX. * libcsupport/src/_calloc_r.c, libcsupport/src/_realloc_r.c: Rework autoconf defines. * libcsupport/src/open.c, libcsupport/src/close.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 <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 |