[rtems commit] libcsupport: Delete superfluous _gettimeofday()

Sebastian Huber sebh at rtems.org
Tue Mar 10 08:11:12 UTC 2015


Module:    rtems
Branch:    master
Commit:    1f671565ab228e54d038fd1ca2f6e4aeeb4170b2
Changeset: http://git.rtems.org/rtems/commit/?id=1f671565ab228e54d038fd1ca2f6e4aeeb4170b2

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Mon Mar  9 13:18:36 2015 +0100

libcsupport: Delete superfluous _gettimeofday()

---

 cpukit/libcsupport/src/__gettod.c  | 16 ----------------
 testsuites/psxtests/psxtime/test.c |  7 -------
 2 files changed, 23 deletions(-)

diff --git a/cpukit/libcsupport/src/__gettod.c b/cpukit/libcsupport/src/__gettod.c
index 0b1ea97..b0b60de 100644
--- a/cpukit/libcsupport/src/__gettod.c
+++ b/cpukit/libcsupport/src/__gettod.c
@@ -80,20 +80,4 @@ int _gettimeofday_r(
 }
 #endif
 
-#if defined(RTEMS_NEWLIB) && !defined(HAVE__GETTIMEOFDAY)
-
-/**
- *  "System call" version
- */
-int _gettimeofday(
-  struct timeval *tp,
-  void           *__tz
-)
-{
-  struct timezone *tzp = __tz;
-
-  return gettimeofday( tp, tzp );
-}
-#endif
-
 #endif /* defined(RTEMS_NEWLIB) */
diff --git a/testsuites/psxtests/psxtime/test.c b/testsuites/psxtests/psxtime/test.c
index 7620d56..8331bef 100644
--- a/testsuites/psxtests/psxtime/test.c
+++ b/testsuites/psxtests/psxtime/test.c
@@ -37,8 +37,6 @@ const char rtems_test_name[] = "PSXTIME";
 extern int adjtime(const struct timeval *delta, struct timeval *olddelta);
 #endif
 
-extern int _gettimeofday(struct timeval *__p, void *__tz);
-
 void test_adjtime(void);
 void check_a_tod(
   rtems_time_of_day *the_tod
@@ -221,11 +219,6 @@ int main(
   rtems_test_assert( sc == -1 );
   rtems_test_assert( errno == EFAULT );
 
-  puts( "_gettimeofday( NULL, NULL ) - EFAULT" );
-  sc = _gettimeofday( NULL, NULL );
-  rtems_test_assert( sc == -1 );
-  rtems_test_assert( errno == EFAULT );
-
   test_adjtime();
 
   /*




More information about the vc mailing list