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

raj at netperf.org raj at netperf.org
Tue Apr 3 16:32:23 PDT 2012


Author: raj
Date: 2012-04-03 16:32:23 -0700 (Tue, 03 Apr 2012)
New Revision: 558

Modified:
   trunk/config.h.in
   trunk/configure
   trunk/configure.ac
   trunk/src/dscp.c
Log:
teach dscp.c about config.h to hopefully make life better under Windows

Modified: trunk/config.h.in
===================================================================
--- trunk/config.h.in	2012-04-03 23:25:05 UTC (rev 557)
+++ trunk/config.h.in	2012-04-03 23:32:23 UTC (rev 558)
@@ -147,6 +147,12 @@
 /* Define to 1 if you have the <netinet/in.h> header file. */
 #undef HAVE_NETINET_IN_H
 
+/* Define to 1 if you have the <netinet/in_systm.h> header file. */
+#undef HAVE_NETINET_IN_SYSTM_H
+
+/* Define to 1 if you have the <netinet/ip.h> header file. */
+#undef HAVE_NETINET_IP_H
+
 /* Define to 1 if you have the <netinet/sctp.h> header file. */
 #undef HAVE_NETINET_SCTP_H
 

Modified: trunk/configure
===================================================================
--- trunk/configure	2012-04-03 23:25:05 UTC (rev 557)
+++ trunk/configure	2012-04-03 23:32:23 UTC (rev 558)
@@ -4562,7 +4562,7 @@
 done
 
 
-for ac_header in arpa/inet.h endian.h errno.h fcntl.h ifaddrs.h limits.h linux/tcp.h malloc.h netdb.h netinet/in.h netinet/sctp.h signal.h stdlib.h string.h strings.h syscall.h sys/ioctl.h sys/mman.h sys/param.h sys/socket.h sys/stat.h sys/time.h sys/wait.h sys/ipc.h sys/sockio.h sys/sysinfo.h sys/wait.h stdlib.h unistd.h
+for ac_header in arpa/inet.h endian.h errno.h fcntl.h ifaddrs.h limits.h linux/tcp.h malloc.h netdb.h netinet/in.h netinet/sctp.h signal.h stdlib.h string.h strings.h syscall.h sys/ioctl.h sys/mman.h sys/param.h sys/socket.h sys/stat.h sys/time.h sys/wait.h sys/ipc.h sys/sockio.h sys/sysinfo.h sys/wait.h stdlib.h unistd.h netinet/in_systm.h netinet/ip.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"

Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac	2012-04-03 23:25:05 UTC (rev 557)
+++ trunk/configure.ac	2012-04-03 23:32:23 UTC (rev 558)
@@ -38,7 +38,7 @@
 AC_HEADER_SYS_WAIT
 
 # lets keep this in some semblence of alphabetical order
-AC_CHECK_HEADERS([arpa/inet.h endian.h errno.h fcntl.h ifaddrs.h limits.h linux/tcp.h malloc.h netdb.h netinet/in.h netinet/sctp.h signal.h stdlib.h string.h strings.h syscall.h sys/ioctl.h sys/mman.h sys/param.h sys/socket.h sys/stat.h sys/time.h sys/wait.h sys/ipc.h sys/sockio.h sys/sysinfo.h sys/wait.h stdlib.h unistd.h])
+AC_CHECK_HEADERS([arpa/inet.h endian.h errno.h fcntl.h ifaddrs.h limits.h linux/tcp.h malloc.h netdb.h netinet/in.h netinet/sctp.h signal.h stdlib.h string.h strings.h syscall.h sys/ioctl.h sys/mman.h sys/param.h sys/socket.h sys/stat.h sys/time.h sys/wait.h sys/ipc.h sys/sockio.h sys/sysinfo.h sys/wait.h stdlib.h unistd.h netinet/in_systm.h netinet/ip.h])
 
 # Some platforms require these.  There may be a better way.
 AC_HAVE_LIBRARY(socket)

Modified: trunk/src/dscp.c
===================================================================
--- trunk/src/dscp.c	2012-04-03 23:25:05 UTC (rev 557)
+++ trunk/src/dscp.c	2012-04-03 23:32:23 UTC (rev 558)
@@ -25,8 +25,14 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include <stdio.h>
+#if HAVE_STRING_H
 #include <string.h>
+#endif
 
 int parse_ipqos(const char *cp);
 const char * iptos2str(int iptos);
@@ -35,8 +41,12 @@
  * Definitions for IP type of service (ip_tos)
  */
 
+#if HAVE_NETINET_IN_SYSTM_H
 #include <netinet/in_systm.h>
+#endif
+#if HAVE_NETINET_IP_H
 #include <netinet/ip.h>
+#endif
 
 #ifndef IPTOS_LOWDELAY
 # define IPTOS_LOWDELAY          0x10



More information about the netperf-dev mailing list