diff options
author | nw1 <nw1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-07-08 04:54:28 +0000 |
---|---|---|
committer | nw1 <nw1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-07-08 04:54:28 +0000 |
commit | 57d1ef9a3870d50f72176cd96d6b0c5dc709654e (patch) | |
tree | 0b69b04254d58a93b3d2fe40f4861a8f1a8d5e6b /apps | |
parent | e89b8bf41f3bf2d06289f56d03e94fa61420b17f (diff) | |
download | ATCD-57d1ef9a3870d50f72176cd96d6b0c5dc709654e.tar.gz |
*** empty log message ***
Diffstat (limited to 'apps')
-rw-r--r-- | apps/JAWS/ChangeLog | 19 | ||||
-rw-r--r-- | apps/JAWS/clients/WebSTONE/src/rexec.c | 4 | ||||
-rw-r--r-- | apps/JAWS/clients/WebSTONE/src/webclient.c | 23 | ||||
-rw-r--r-- | apps/JAWS/clients/WebSTONE/src/webmaster.c | 5 |
4 files changed, 41 insertions, 10 deletions
diff --git a/apps/JAWS/ChangeLog b/apps/JAWS/ChangeLog index 8f36697c7b4..2a1872dae2b 100644 --- a/apps/JAWS/ChangeLog +++ b/apps/JAWS/ChangeLog @@ -1,3 +1,22 @@ +Mon Jul 7 23:40:13 1997 Nanbor Wang <nw1@cumbia.cs.wustl.edu> + + * clients/WebSTONE/src/webclient.c: Removed a bunch of THREAD + storage class decorators from function makeload() because auto + variables can't be declared as TSS. Also #ifdef random number + generation code so it uses rand_r on Solaris() and rand() on NT. + + * clients/WebSTONE/src/rexec.c: Modified prototypes for + PassOutputThread() and PassErrorThread() to avoid warnings from + MSVC. Still need more refinement on this one. ;( + + * clients/WebSTONE/src/webmaster.c: Added prototype for + HostEntCpy() and a null statement to avoid warning from MSVC. + + * clients/WebSTONE/src/gendata/genrand.mak: + * clients/WebSTONE/src/master/webmaster.mak: + * clients/WebSTONE/src/client/webclient.mak: Updated file paths + and dependencies. + Sat Jul 5 14:19:20 1997 Douglas C. Schmidt <schmidt@flamenco.cs.wustl.edu> * Renamed the client directory "clients" to reflect the fact that diff --git a/apps/JAWS/clients/WebSTONE/src/rexec.c b/apps/JAWS/clients/WebSTONE/src/rexec.c index 13addde2498..d9233bbcb34 100644 --- a/apps/JAWS/clients/WebSTONE/src/rexec.c +++ b/apps/JAWS/clients/WebSTONE/src/rexec.c @@ -56,8 +56,8 @@ static char copyright[] = #define STDERROR hStdErr #define FILECOOKIE HANDLE -static void PassOutputThread(); -static void PassErrorThread(); +static void PassOutputThread(SOCKET); +static void PassErrorThread(SOCKET); HANDLE hStdIn, hStdOut, hStdErr; diff --git a/apps/JAWS/clients/WebSTONE/src/webclient.c b/apps/JAWS/clients/WebSTONE/src/webclient.c index 881c9db0ae8..28d206bd5c6 100644 --- a/apps/JAWS/clients/WebSTONE/src/webclient.c +++ b/apps/JAWS/clients/WebSTONE/src/webclient.c @@ -9,8 +9,6 @@ * * **************************************************************************/ -#include <thread.h> - #include <stdio.h> #ifdef WIN32 @@ -27,6 +25,7 @@ #include <string.h> #ifndef WIN32 +#include <thread.h> #include <netdb.h> #include <unistd.h> #endif /* WIN32 */ @@ -412,7 +411,7 @@ accumstats(rqst_timer_t *rqsttimer, page_stats_t *pagestats, stats_t *timestat) * returns the number of files retrieved */ static int -makeload(int maxcount, int pageval, THREAD rqst_timer_t *timerarray, THREAD stats_t *timestat, THREAD SOCKET mastersock, THREAD page_stats_t *page_stats) +makeload(int maxcount, int pageval, rqst_timer_t *timerarray, stats_t *timestat, SOCKET mastersock, page_stats_t *page_stats) { int cnt; int returnval; @@ -927,15 +926,15 @@ main(int argc, char *argv[]) void ClientThread(void *dummy) { - THREAD FILE *logfile; + FILE *logfile; - THREAD stats_t timestat; + stats_t timestat; - THREAD rqst_timer_t timerarray[MAXNUMOFFILES]; - THREAD SOCKET mastersock = BADSOCKET_VALUE; /* connection to webmaster */ + rqst_timer_t timerarray[MAXNUMOFFILES]; + SOCKET mastersock = BADSOCKET_VALUE; /* connection to webmaster */ - THREAD page_stats_t *page_stats; /* actually a dynamic array */ + page_stats_t *page_stats; /* actually a dynamic array */ int loopcnt = 0; int filecnt; @@ -986,7 +985,11 @@ void ClientThread(void *dummy) /* Initialize random number generator */ junk = getpid (); +#ifndef WIN32 rand_r(&junk); +#else + junk = rand (); +#endif /* ! WIN32 */ D_PRINTF( "Random seed: %d\n", junk ); for (i=0; i < MAXNUMOFFILES; i++) @@ -1071,7 +1074,11 @@ void ClientThread(void *dummy) D_PRINTF( "Running in timed mode\n" ); /* random number between 0 and totalweight-1 */ junk = getpid (); +#ifndef WIN32 ran_number = (rand_r(&junk) % total_weight); +#else + ran_number = (RANDOM() % total_weight); +#endif D_PRINTF( "random %ld\n", ran_number ); /* loop through pages, find correct one diff --git a/apps/JAWS/clients/WebSTONE/src/webmaster.c b/apps/JAWS/clients/WebSTONE/src/webmaster.c index 490c354dece..4fef2388f51 100644 --- a/apps/JAWS/clients/WebSTONE/src/webmaster.c +++ b/apps/JAWS/clients/WebSTONE/src/webmaster.c @@ -79,6 +79,8 @@ THREAD FILE *debugfile = stderr; struct hostent *master_phe; /* IP addresses for webmaster */ struct timeval sumedh_start, sumedh_end; +void HostEntCpy(struct hostent *dest, struct hostent *src); + static void usage(const char *progname) { @@ -548,6 +550,8 @@ char *commandline; strcat(webclient_path, "/webclient"); } else +#else + temp = temp; #endif /* WIN32 */ webclient_path = PROGPATH; @@ -1401,6 +1405,7 @@ main(const int argc, char *argv[]) } /* Added by Rajesh Shah 5/18/96 */ +void HostEntCpy(struct hostent *dest, struct hostent *src) { |