lwp-tests-20030203
authorChaskiel M Grundman <cg2v@andrew.cmu.edu>
Mon, 3 Feb 2003 23:27:06 +0000 (23:27 +0000)
committerDerrick Brashear <shadow@dementia.org>
Mon, 3 Feb 2003 23:27:06 +0000 (23:27 +0000)
FIXES 1280

make the tests work

src/lwp/test/selclient.c
src/lwp/test/selserver.c
src/lwp/test/selsubs.c

index 9fd0fc2..cc4e4c7 100644 (file)
@@ -41,7 +41,7 @@
 #include <sys/select.h>
 #include <sys/types.h>
 #include <sys/socket.h>
-#include <bstring.h>
+#include <string.h>
 #include <sys/time.h>
 #include <netinet/in.h>
 #include <netdb.h>
@@ -184,6 +184,11 @@ main(int ac, char **av)
        Usage();
     }
 
+    if (writeSize == 0 && doEnd ==0 && putOOB == 0) {
+       printf("%s: Missing action.\n", program);
+       Usage();
+    }
+
     if (!setFD) {
        setFD = 31;
        printf("%s: Using default socket of %d.\n", program, setFD);
index 31d9efb..ef1bba1 100644 (file)
@@ -42,7 +42,7 @@
 #include <sys/select.h>
 #include <sys/types.h>
 #include <sys/socket.h>
-#include <bstring.h>
+#include <string.h>
 #include <sys/time.h>
 #include <netinet/in.h>
 #include <netdb.h>
index 352b705..d02dea8 100644 (file)
@@ -16,7 +16,7 @@
 #include <sys/select.h>
 #include <sys/types.h>
 #include <sys/socket.h>
-#include <bstring.h>
+#include <string.h>
 #include <sys/time.h>
 #include <netinet/in.h>
 #include <netdb.h>
@@ -141,12 +141,13 @@ void Log(char *fmt, ...)
 {
     va_list args;
     struct timeval now;
+    struct timezone tz;
     struct tm *ltime;
     int code;
     PROCESS pid;
     extern char *program;
     
-    code = gettimeofday(&now);
+    code = gettimeofday(&now,&tz);
     assert (code == 0);
 
     ltime = localtime((time_t*)&now.tv_sec);