[netperf-dev] netperf2 commit notice r284 - in trunk: . src

raj at netperf.org raj at netperf.org
Fri Jul 25 15:29:17 PDT 2008


Author: raj
Date: 2008-07-25 15:29:11 -0700 (Fri, 25 Jul 2008)
New Revision: 284

Modified:
   trunk/AUTHORS
   trunk/Release_Notes
   trunk/src/netcpu_ntperf.c
   trunk/src/netlib.c
   trunk/src/netperf.c
   trunk/src/netserver.c
   trunk/src/netsh.c
   trunk/src/nettest_bsd.c
   trunk/src/nettest_bsd.h
   trunk/src/nettest_unix.c
   trunk/src/nettest_xti.c
Log:
cygwin compile cleanups

Modified: trunk/AUTHORS
===================================================================
--- trunk/AUTHORS	2008-07-25 19:02:29 UTC (rev 283)
+++ trunk/AUTHORS	2008-07-25 22:29:11 UTC (rev 284)
@@ -224,4 +224,7 @@
 
 Adam Bidema
 Fixes for launching netserver children when the path to netserver.exe
-is very long. 
\ No newline at end of file
+is very long. 
+
+Gisle Vanem
+Cygwin cleanups.
\ No newline at end of file

Modified: trunk/Release_Notes
===================================================================
--- trunk/Release_Notes	2008-07-25 19:02:29 UTC (rev 283)
+++ trunk/Release_Notes	2008-07-25 22:29:11 UTC (rev 284)
@@ -2,6 +2,8 @@
 
 Things changed in this release:
 
+*) Compilation cleanups for Cygwin courtesy of Gisle Vanem.
+
 *) Changes to enable compilation and building of netperf for
    VMware. Kudos to the person who did the first port, I will be happy
    to name that person when told it is OK :)

Modified: trunk/src/netcpu_ntperf.c
===================================================================
--- trunk/src/netcpu_ntperf.c	2008-07-25 19:02:29 UTC (rev 283)
+++ trunk/src/netcpu_ntperf.c	2008-07-25 22:29:11 UTC (rev 284)
@@ -15,18 +15,6 @@
 # endif
 #endif
 
-#if 0
-#include <limits.h>
-#include <sys/types.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <string.h>
-#endif
-
-#include <assert.h>
-
 #include <process.h>
 #include <time.h>
 
@@ -77,7 +65,7 @@
 NT_QUERY_SYSTEM_INFORMATION NtQuerySystemInformation = NULL;
 
 
-static LARGE_INTEGER TickHz = {0,0};
+static LARGE_INTEGER TickHz = {{0,0}};
 
 _inline LARGE_INTEGER ReadPerformanceCounter(VOID)
 {
@@ -190,7 +178,7 @@
     {
       //Lint
       status = GetLastError();
-      fprintf(stderr, "GetProcAddressFailed, status: %X\n", status);
+      fprintf(stderr, "GetProcAddressFailed, status: %lX\n", status);
       exit(1);
     }
   
@@ -240,7 +228,7 @@
 					   (PCHAR)&PerfCntrs->EndInfo[0], sizeof(SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION)*MAXCPUS,
 					   &returnLength )) != 0) 
     {
-      fprintf(stderr, "NtQuery failed, status: %X\n", status);
+      fprintf(stderr, "NtQuery failed, status: %lX\n", status);
       exit(1);
     }
   
@@ -250,7 +238,7 @@
   if ((returnLength % sizeof(SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION)) != 0)
     {
       fprintf(stderr, "NtQuery didn't return expected amount of data\n");
-      fprintf(stderr, "Expected a multiple of %i, returned %i\n",
+      fprintf(stderr, "Expected a multiple of %i, returned %lu\n",
 	      sizeof(SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION), returnLength);
       exit(1);
     }
@@ -259,7 +247,7 @@
   if (returnNumCPUs != (int)SystemInfo.dwNumberOfProcessors)
     {
       fprintf(stderr, "NtQuery didn't return expected amount of data\n");
-      fprintf(stderr, "Expected data for %i CPUs, returned %i\n",
+      fprintf(stderr, "Expected data for %i CPUs, returned %lu\n",
 	      (int)SystemInfo.dwNumberOfProcessors, returnNumCPUs);
       exit(1);
     }

Modified: trunk/src/netlib.c
===================================================================
--- trunk/src/netlib.c	2008-07-25 19:02:29 UTC (rev 283)
+++ trunk/src/netlib.c	2008-07-25 22:29:11 UTC (rev 284)
@@ -2636,7 +2636,6 @@
 void 
 get_remote_system_info()
 {
-  int ret;
   char delim[2];
   char *token;
 
@@ -2762,7 +2761,6 @@
 {
 #ifdef SO_SNDBUF
   int optname = (which == SEND_BUFFER) ? SO_SNDBUF : SO_RCVBUF;
-  netperf_socklen_t sock_opt_len;
 
   /* seems that under Windows, setting a value of zero is how one
      tells the stack you wish to enable copy-avoidance. Knuth only
@@ -3798,7 +3796,7 @@
 int delta_micro(LARGE_INTEGER *begin, LARGE_INTEGER *end)
 {
 	LARGE_INTEGER DeltaTimestamp;
-	static LARGE_INTEGER TickHz = {0,0};
+	static LARGE_INTEGER TickHz = {{0,0}};
 
 	if (TickHz.QuadPart == 0) 
 	{

Modified: trunk/src/netperf.c
===================================================================
--- trunk/src/netperf.c	2008-07-25 19:02:29 UTC (rev 283)
+++ trunk/src/netperf.c	2008-07-25 22:29:11 UTC (rev 284)
@@ -113,7 +113,7 @@
   
   /* Initialize the winsock lib ( version 2.2 ) */
   if ( WSAStartup(MAKEWORD(2,2), &wsa_data) == SOCKET_ERROR ){
-    printf("WSAStartup() failed : %d\n", GetLastError()) ;
+    printf("WSAStartup() failed : %lu\n", GetLastError()) ;
     return 1 ;
   }
 #endif /* WIN32 */

Modified: trunk/src/netserver.c
===================================================================
--- trunk/src/netserver.c	2008-07-25 19:02:29 UTC (rev 283)
+++ trunk/src/netserver.c	2008-07-25 22:29:11 UTC (rev 284)
@@ -869,7 +869,7 @@
 
 	/* Initialize the winsock lib ( version 2.2 ) */
 	if ( WSAStartup(MAKEWORD(2,2), &wsa_data) == SOCKET_ERROR ){
-		printf("WSAStartup() failed : %d\n", GetLastError()) ;
+		printf("WSAStartup() failed : %lu\n", GetLastError()) ;
 		return 1 ;
 	}
 #endif /* WIN32 */

Modified: trunk/src/netsh.c
===================================================================
--- trunk/src/netsh.c	2008-07-25 19:02:29 UTC (rev 283)
+++ trunk/src/netsh.c	2008-07-25 22:29:11 UTC (rev 284)
@@ -418,7 +418,6 @@
 parse_protocol(char protocol_string[]) 
 {
   char temp[10];
-  int temp_protocol;
 
   strncpy(temp,protocol_string,10);
 

Modified: trunk/src/nettest_bsd.c
===================================================================
--- trunk/src/nettest_bsd.c	2008-07-25 19:02:29 UTC (rev 283)
+++ trunk/src/nettest_bsd.c	2008-07-25 22:29:11 UTC (rev 284)
@@ -1,6 +1,6 @@
 #ifndef lint
 char	nettest_id[]="\
-@(#)nettest_bsd.c (c) Copyright 1993-2004 Hewlett-Packard Co. Version 2.4.3";
+@(#)nettest_bsd.c (c) Copyright 1993-2008 Hewlett-Packard Co. Version 2.4.5";
 #endif /* lint */
 
 
@@ -5398,12 +5398,6 @@
 Send   Recv   Size     Size    Time     Throughput \n\
 bytes  Bytes  bytes    bytes   secs.    %s/sec   \n\n";
 
-  char *tput_title_latency = "\
-Local /Remote\n\
-Socket Size   Request  Resp.   Elapsed  \n\
-Send   Recv   Size     Size    Time     Latency \n\
-bytes  Bytes  bytes    bytes   secs.    usec/tran   \n\n";
-
   char *tput_fmt_0 =
     "%7.2f %s\n";
   

Modified: trunk/src/nettest_bsd.h
===================================================================
--- trunk/src/nettest_bsd.h	2008-07-25 19:02:29 UTC (rev 283)
+++ trunk/src/nettest_bsd.h	2008-07-25 22:29:11 UTC (rev 284)
@@ -584,6 +584,7 @@
 					  int family,
 					  void *addr,
 					  int *port);
+extern void send_tcp_mss(char remote_host[]);
 extern void send_tcp_stream(char remote_host[]);
 extern void send_tcp_maerts(char remote_host[]);
 extern void send_tcp_rr(char remote_host[]);

Modified: trunk/src/nettest_unix.c
===================================================================
--- trunk/src/nettest_unix.c	2008-07-25 19:02:29 UTC (rev 283)
+++ trunk/src/nettest_unix.c	2008-07-25 22:29:11 UTC (rev 284)
@@ -8,9 +8,13 @@
 #include <config.h>
 #endif
 
+#ifdef WIN32
+#error Unix Domain Sockets are not available under Windows
+#endif
+
 #ifdef WANT_UNIX
 char	nettest_unix_id[]="\
-@(#)nettest_unix.c (c) Copyright 1994-2007 Hewlett-Packard Co. Version 2.4.3";
+@(#)nettest_unix.c (c) Copyright 1994-2008 Hewlett-Packard Co. Version 2.4.5";
      
 /****************************************************************/
 /*								*/

Modified: trunk/src/nettest_xti.c
===================================================================
--- trunk/src/nettest_xti.c	2008-07-25 19:02:29 UTC (rev 283)
+++ trunk/src/nettest_xti.c	2008-07-25 22:29:11 UTC (rev 284)
@@ -5,12 +5,17 @@
 #ifdef WANT_XTI
 #ifndef lint
 char	nettest_xti_id[]="\
-@(#)nettest_xti.c (c) Copyright 1995-2007 Hewlett-Packard Co. Version 2.4.3";
+@(#)nettest_xti.c (c) Copyright 1995-2008 Hewlett-Packard Co. Version 2.4.5";
 #else
 #define DIRTY
 #define WANT_HISTOGRAM
 #define WANT_INTERVALS
 #endif /* lint */
+
+#ifdef WIN32
+#error XTI Interface tests are not available under Windows
+#endif
+
 /****************************************************************/
 /*								*/
 /*	nettest_xti.c						*/
@@ -40,18 +45,12 @@
 
 #include <sys/types.h>
 #include <fcntl.h>
-#ifndef WIN32
 #include <sys/ipc.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <netdb.h>
 #include <errno.h>
 #include <signal.h>
-#else /* WIN32 */
-#include <process.h>
-#include <winsock2.h>
-#include <windows.h>
-#endif /* WIN32 */
 #include <stdio.h>
 #include <time.h>
 #include <malloc.h>



More information about the netperf-dev mailing list