changeset 2089:0a3305f3af20

* test/nc*_test_master.c: gettimeofday is now in POSIX
author asl
date Sun, 23 Oct 2005 20:48:07 +0000
parents 8c1285523bee
children 4144fbf5b108
files packages/net/common/current/ChangeLog packages/net/common/current/tests/nc6_test_master.c packages/net/common/current/tests/nc_test_master.c
diffstat 3 files changed, 16 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/packages/net/common/current/ChangeLog
+++ b/packages/net/common/current/ChangeLog
@@ -1,3 +1,7 @@
+2005-10-23  Andrew Lunn  <andrew.lunn@ascom.ch>
+
+	* test/nc*_test_master.c: gettimeofday is now in POSIX
+
 2005-10-13  Andrew Lunn  <andrew.lunn@ascom.ch>
 
 	* docs/manpages/sys/socketpair.2: Removed this man page since
--- a/packages/net/common/current/tests/nc6_test_master.c
+++ b/packages/net/common/current/tests/nc6_test_master.c
@@ -98,7 +98,10 @@ pexit(char *s)
 }
 
 #ifdef __ECOS
-#ifndef CYGPKG_SNMPLIB
+# ifdef CYGPKG_POSIX
+# #include <pkgconf/posix.h>
+# endif
+# ifndef CYGPKG_POSIX_TIMERS
 int
 gettimeofday(struct timeval *tv, struct timezone *tz)
 {
@@ -107,11 +110,9 @@ gettimeofday(struct timeval *tv, struct 
     tv->tv_sec = cur_time / 100;
     tv->tv_usec = (cur_time % 100) * 10000;
 }
-#else
-int
-gettimeofday(struct timeval *tv, struct timezone *tz);
+# endif
 #endif
-#endif
+
 void
 show_results(const char *msg, struct timeval *start, 
              struct timeval *end, int nbufs, int buflen,
--- a/packages/net/common/current/tests/nc_test_master.c
+++ b/packages/net/common/current/tests/nc_test_master.c
@@ -98,7 +98,10 @@ pexit(char *s)
 }
 
 #ifdef __ECOS
-#ifndef CYGPKG_SNMPLIB
+# ifdef CYGPKG_POSIX
+# #include <pkgconf/posix.h>
+# endif
+# ifndef CYGPKG_POSIX_TIMERS
 int
 gettimeofday(struct timeval *tv, struct timezone *tz)
 {
@@ -107,11 +110,9 @@ gettimeofday(struct timeval *tv, struct 
     tv->tv_sec = cur_time / 100;
     tv->tv_usec = (cur_time % 100) * 10000;
 }
-#else
-int
-gettimeofday(struct timeval *tv, struct timezone *tz);
+# endif
 #endif
-#endif
+
 void
 show_results(const char *msg, struct timeval *start, 
              struct timeval *end, int nbufs, int buflen,