[netperf-dev] netperf2 commit notice r538 - in trunk/src: . NetPerfDir NetServerDir

raj at netperf.org raj at netperf.org
Wed Mar 21 10:58:11 PDT 2012


Author: raj
Date: 2012-03-21 10:58:11 -0700 (Wed, 21 Mar 2012)
New Revision: 538

Modified:
   trunk/src/NetPerfDir/sources
   trunk/src/NetServerDir/sources
   trunk/src/hist.h
   trunk/src/netlib.c
Log:
some windows changes from Jonathan Cook

Modified: trunk/src/NetPerfDir/sources
===================================================================
--- trunk/src/NetPerfDir/sources	2012-03-19 20:21:54 UTC (rev 537)
+++ trunk/src/NetPerfDir/sources	2012-03-21 17:58:11 UTC (rev 538)
@@ -14,7 +14,7 @@
 
 MSC_WARNING_LEVEL=/W3 /WX
 
-C_DEFINES=$(C_DEFINES) -D_CONSOLE_ -DHAVE_STRING_H -DHAVE_STRUCT_SOCKADDR_STORAGE -DHAVE_GETADDRINFO -DHAVE_GETNAMEINFO -DSTDC_HEADERS -DHAVE_STDLIB_H -DHAVE_WS2TCPIP_H -DWANT_OMNI
+C_DEFINES=$(C_DEFINES) -D_CONSOLE_ -DHAVE_STRING_H -DHAVE_STRUCT_SOCKADDR_STORAGE -DHAVE_GETADDRINFO -DHAVE_GETNAMEINFO -DSTDC_HEADERS -DHAVE_STDLIB_H -DHAVE_WS2TCPIP_H -DWANT_OMNI -DHAVE_INTTUPES_H -DWANT_DEMO -DWANT_HISTOGRAM
 
 #USER_C_FLAGS=$(USER_C_FLAGS) /E
 

Modified: trunk/src/NetServerDir/sources
===================================================================
--- trunk/src/NetServerDir/sources	2012-03-19 20:21:54 UTC (rev 537)
+++ trunk/src/NetServerDir/sources	2012-03-21 17:58:11 UTC (rev 538)
@@ -14,7 +14,7 @@
 
 MSC_WARNING_LEVEL=/W3 /WX
 
-C_DEFINES=$(C_DEFINES) -D_CONSOLE_ -DHAVE_STRING_H -DHAVE_STRUCT_SOCKADDR_STORAGE -DHAVE_GETADDRINFO -DHAVE_GETNAMEINFO -DSTDC_HEADERS -DHAVE_STDLIB_H -DHAVE_WS2TCPIP_H -DWANT_OMNI
+C_DEFINES=$(C_DEFINES) -D_CONSOLE_ -DHAVE_STRING_H -DHAVE_STRUCT_SOCKADDR_STORAGE -DHAVE_GETADDRINFO -DHAVE_GETNAMEINFO -DSTDC_HEADERS -DHAVE_STDLIB_H -DHAVE_WS2TCPIP_H -DWANT_OMNI -DHAVE_INTTYPES_H -DWANT_DEMO -DWANT_HISTOGRAM
 
 #USER_C_FLAGS=$(USER_C_FLAGS) /E
 

Modified: trunk/src/hist.h
===================================================================
--- trunk/src/hist.h	2012-03-19 20:21:54 UTC (rev 537)
+++ trunk/src/hist.h	2012-03-21 17:58:11 UTC (rev 538)
@@ -8,6 +8,9 @@
 #  include <time.h>
 # endif
 #endif
+#ifdef WIN32
+#  include "missing\stdint.h"
+#endif
 
 /* hist.h
 

Modified: trunk/src/netlib.c
===================================================================
--- trunk/src/netlib.c	2012-03-19 20:21:54 UTC (rev 537)
+++ trunk/src/netlib.c	2012-03-21 17:58:11 UTC (rev 538)
@@ -3053,7 +3053,7 @@
       fprintf(dumploc,
               "\tsa_family: %s sadata:",
               inet_ftos(ai_addr->sa_family));
-      for (i = 0; i < temp->ai_addrlen; i++) {
+      for (i = 0; i < (int) temp->ai_addrlen; i++) {
 	fprintf(dumploc,
 		(temp->ai_family == AF_INET) ? " %d" : " %.2x",
 		(u_char)ai_addr->sa_data[i]);
@@ -3892,7 +3892,11 @@
    important compilers have supported such a construct so it should
    not be a big deal. raj 2012-01-23 */
 
+#ifdef WIN32
+__forceinline demo_interval_tick(uint32_t units) {
+#else
 inline demo_interval_tick(uint32_t units) {
+#endif
   if (demo_mode) {
     double actual_interval;
     static int count = 0;
@@ -4278,7 +4282,8 @@
   *max = h->hmax;
   if (h->total){
     *mean = (double)h->sum / (double)h->total;
-    *stddev = (h->sumsquare * h->total - pow(h->sum, 2)) / pow(h->total, 2);
+    *stddev = (h->sumsquare * h->total - pow((double)h->sum, 2)) /
+      pow(h->total, 2);
     *stddev = sqrt(*stddev);
   }
   else{



More information about the netperf-dev mailing list