git.iko.soy/distributed-process
on master help sign in
I had a problem with JustPingC both in gcc 4.4.6 and ICC 12. Tweaked it.
commite6701d9d6d372293cb998a995589e4ef837e81a7 authorRyan Newton <rrnewton@gmail.com> dateThu 9 Aug 2012, 16:20 (14 years ago) parentae6097e
2 files changed+3−3
network-transport-tcp/benchmarks/JustPingC.c+2−2 network-transport-tcp/benchmarks/Makefile+1−1
network-transport-tcp/benchmarks/JustPingC.c+2−2
@@ -79,7 +79,7 @@ int client(int pings) {
7979 printf("starting client\n");
8080
8181 struct addrinfo hints, *res;
82− int error, client_socket;
82+ int error, client_socket, i;
8383
8484 memset(&hints, 0, sizeof(hints));
8585 hints.ai_family = PF_INET;
@@ -102,7 +102,7 @@ int client(int pings) {
102102 return -1;
103103 }
104104
105− for(int i = 0; i < pings; i++) {
105+ for(i = 0; i < pings; i++) {
106106 double timestamp_before = timestamp();
107107
108108 send(client_socket, "ping123", 8, 0);
network-transport-tcp/benchmarks/Makefile+1−1
@@ -8,7 +8,7 @@ INCLUDES=-i${ROOT}/network-transport/src -i${ROOT}/network-transport-tcp/src
88# PROF_GHC=-prof -fprof-auto
99# PROF_EXE=+RTS -pa -RTS
1010
11−GCC=gcc -std=c99
11+GCC=gcc
1212GHC=ghc -rtsopts -XRankNTypes -XScopedTypeVariables -XDeriveDataTypeable -XCPP -XGeneralizedNewtypeDeriving -optP-include -optPcabal_macros.h
1313
1414all: NewTransport.ps Indirection.ps Headers.ps