[netperf-dev] netperf4 commit notice r46 - in trunk: . src

raj at netperf.org raj at netperf.org
Wed Jan 25 10:01:43 PST 2006


Author: raj
Date: 2006-01-25 10:01:36 -0800 (Wed, 25 Jan 2006)
New Revision: 46

Modified:
   trunk/config.h.in
   trunk/configure
   trunk/configure.ac
   trunk/src/netlib.c
   trunk/src/netlib.h
   trunk/src/netperf.c
   trunk/src/netserver.c
   trunk/src/netsysstats.h
   trunk/src/netsysstats_common.c
   trunk/src/nettest_bsd.c
   trunk/src/nettest_dns.c
   trunk/src/nettest_vst.c
Log:
Get virtually all #includes inside #ifdef HAVE_MUMBLE constructs.


Modified: trunk/config.h.in
===================================================================
--- trunk/config.h.in	2006-01-25 15:57:56 UTC (rev 45)
+++ trunk/config.h.in	2006-01-25 18:01:36 UTC (rev 46)
@@ -1,26 +1,29 @@
 /* config.h.in.  Generated from configure.ac by autoheader.  */
 
-/* Define to 1 if you have the `alarm' function. */
-#undef HAVE_ALARM
-
 /* Define to 1 if you have the <arpa/inet.h> header file. */
 #undef HAVE_ARPA_INET_H
 
+/* Define to 1 if you have the <arpa/nameser_compat.h> header file. */
+#undef HAVE_ARPA_NAMESER_COMPAT_H
+
 /* Define to 1 if you have the <arpa/nameser.h> header file. */
 #undef HAVE_ARPA_NAMESER_H
 
 /* Define to 1 if you have the `bind_to_cpu_id' function. */
 #undef HAVE_BIND_TO_CPU_ID
 
-/* Define to 1 if you have the `bzero' function. */
-#undef HAVE_BZERO
-
 /* Define to 1 if you have the <dlfcn.h> header file. */
 #undef HAVE_DLFCN_H
 
+/* Define to 1 if you have the <errno.h> header file. */
+#undef HAVE_ERRNO_H
+
 /* Define to 1 if you have the <fcntl.h> header file. */
 #undef HAVE_FCNTL_H
 
+/* Define to 1 if you have the <float.h> header file. */
+#undef HAVE_FLOAT_H
+
 /* Define to 1 if you have the `fork' function. */
 #undef HAVE_FORK
 
@@ -117,9 +120,6 @@
 /* Define to 1 if you have the `mpctl' function. */
 #undef HAVE_MPCTL
 
-/* Define to 1 if you have the `munmap' function. */
-#undef HAVE_MUNMAP
-
 /* Define to 1 if you have the <netdb.h> header file. */
 #undef HAVE_NETDB_H
 
@@ -129,6 +129,9 @@
 /* Define to 1 if you have the <netinet/sctp.h> header file. */
 #undef HAVE_NETINET_SCTP_H
 
+/* Define to 1 if you have the <netinet/tcp.h> header file. */
+#undef HAVE_NETINET_TCP_H
+
 /* Define to 1 if you have the <poll.h> header file. */
 #undef HAVE_POLL_H
 
@@ -138,6 +141,9 @@
 /* Define to 1 if you have the <pthread.h> header file. */
 #undef HAVE_PTHREAD_H
 
+/* Define to 1 if you have the <pwd.h> header file. */
+#undef HAVE_PWD_H
+
 /* Define to 1 if you have the <resolv.h> header file. */
 #undef HAVE_RESOLV_H
 
@@ -147,12 +153,12 @@
 /* Define to 1 if you have the `sched_setaffinity' function. */
 #undef HAVE_SCHED_SETAFFINITY
 
-/* Define to 1 if you have the `select' function. */
-#undef HAVE_SELECT
-
 /* Define to 1 if you have the `sendfile' function. */
 #undef HAVE_SENDFILE
 
+/* Define to 1 if you have the <signal.h> header file. */
+#undef HAVE_SIGNAL_H
+
 /* Define to 1 if you have the `socket' function. */
 #undef HAVE_SOCKET
 
@@ -165,6 +171,9 @@
 /* Define to 1 if you have the <stdint.h> header file. */
 #undef HAVE_STDINT_H
 
+/* Define to 1 if you have the <stdio.h> header file. */
+#undef HAVE_STDIO_H
+
 /* Define to 1 if you have the <stdlib.h> header file. */
 #undef HAVE_STDLIB_H
 
@@ -189,12 +198,18 @@
 /* Define to 1 if <netinet/in.h> defines `struct sockaddr_storage' */
 #undef HAVE_STRUCT_SOCKADDR_STORAGE
 
+/* Define to 1 if you have the <sys/dk.h> header file. */
+#undef HAVE_SYS_DK_H
+
 /* Define to 1 if you have the <sys/ioctl.h> header file. */
 #undef HAVE_SYS_IOCTL_H
 
 /* Define to 1 if you have the <sys/param.h> header file. */
 #undef HAVE_SYS_PARAM_H
 
+/* Define to 1 if you have the <sys/pstat.h> header file. */
+#undef HAVE_SYS_PSTAT_H
+
 /* Define to 1 if you have the <sys/resource.h> header file. */
 #undef HAVE_SYS_RESOURCE_H
 
@@ -213,6 +228,9 @@
 /* Define to 1 if you have the <sys/types.h> header file. */
 #undef HAVE_SYS_TYPES_H
 
+/* Define to 1 if you have the <sys/uio.h> header file. */
+#undef HAVE_SYS_UIO_H
+
 /* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
 #undef HAVE_SYS_WAIT_H
 
@@ -222,6 +240,9 @@
 /* Define to 1 if you have the <unistd.h> header file. */
 #undef HAVE_UNISTD_H
 
+/* Define to 1 if you have the <values.h> header file. */
+#undef HAVE_VALUES_H
+
 /* Define to 1 if you have the `vfork' function. */
 #undef HAVE_VFORK
 

Modified: trunk/configure
===================================================================
--- trunk/configure	2006-01-25 15:57:56 UTC (rev 45)
+++ trunk/configure	2006-01-25 18:01:36 UTC (rev 46)
@@ -20996,7 +20996,23 @@
 
 
 
-for ac_header in arpa/inet.h fcntl.h limits.h malloc.h netdb.h netinet/in.h stdlib.h string.h strings.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h unistd.h math.h arpa/nameser.h resolv.h poll.h pthread.h sched.h dlfcn.h sys/resource.h
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_header in arpa/inet.h arpa/nameser.h arpa/nameser_compat.h dlfcn.h errno.h fcntl.h float.h inttypes.h limits.h malloc.h math.h memory.h netdb.h netinet/in.h netinet/tcp.h poll.h pthread.h pwd.h resolv.h sched.h signal.h stdint.h stdio.h stdlib.h string.h strings.h sys/dk.h sys/ioctl.h sys/param.h sys/pstat.h sys/resource.h sys/socket.h sys/stat.h sys/time.h sys/types.h sys/uio.h unistd.h values.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
 if eval "test \"\${$as_ac_Header+set}\" = set"; then
@@ -23398,11 +23414,7 @@
 
 
 
-
-
-
-
-for ac_func in alarm bzero gethostbyname gethrtime gettimeofday inet_ntoa memset memcpy munmap select socket sqrt strcasecmp strchr strstr strtoul uname
+for ac_func in gethostbyname gethrtime gettimeofday inet_ntoa memset memcpy socket sqrt strcasecmp strchr strstr strtoul uname
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 echo "$as_me:$LINENO: checking for $ac_func" >&5

Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac	2006-01-25 15:57:56 UTC (rev 45)
+++ trunk/configure.ac	2006-01-25 18:01:36 UTC (rev 46)
@@ -33,7 +33,7 @@
 # Checks for header files.
 AC_HEADER_STDC
 AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h malloc.h netdb.h netinet/in.h stdlib.h string.h strings.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h unistd.h math.h arpa/nameser.h resolv.h poll.h pthread.h sched.h dlfcn.h sys/resource.h])
+AC_CHECK_HEADERS([arpa/inet.h arpa/nameser.h arpa/nameser_compat.h dlfcn.h errno.h fcntl.h float.h inttypes.h limits.h malloc.h math.h memory.h netdb.h netinet/in.h netinet/tcp.h poll.h pthread.h pwd.h resolv.h sched.h signal.h stdint.h stdio.h stdlib.h string.h strings.h sys/dk.h sys/ioctl.h sys/param.h sys/pstat.h sys/resource.h sys/socket.h sys/stat.h sys/time.h sys/types.h sys/uio.h unistd.h values.h ])
 
 # Some platforms require these.  There may be a better way.
 AC_HAVE_LIBRARY(socket)
@@ -69,7 +69,7 @@
 # AC_FUNC_STAT
 # remove pstat_getdynamic (at least for now) since we don't do
 # anything conditional with the check anyway...
-AC_CHECK_FUNCS([alarm bzero gethostbyname gethrtime gettimeofday inet_ntoa memset memcpy munmap select socket sqrt strcasecmp strchr strstr strtoul uname])
+AC_CHECK_FUNCS([gethostbyname gethrtime gettimeofday inet_ntoa memset memcpy socket sqrt strcasecmp strchr strstr strtoul uname])
 
 #AC_CONFIG_SUBDIRS(src/missing)
 

Modified: trunk/src/netlib.c
===================================================================
--- trunk/src/netlib.c	2006-01-25 15:57:56 UTC (rev 45)
+++ trunk/src/netlib.c	2006-01-25 18:01:36 UTC (rev 46)
@@ -40,9 +40,9 @@
 #include <sys/types.h>
 #endif
 
-/* #ifdef HAVE_SYS_UIO_H */
+#ifdef HAVE_SYS_UIO_H
 #include <sys/uio.h>
-/* #endif */
+#endif
 
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
@@ -83,7 +83,9 @@
 #include <poll.h>
 #endif
 
+#ifdef HAVE_SYS_RESOURCE_H
 #include <sys/resource.h>
+#endif
 
 #ifdef HAVE_PTHREAD_H
 #include <pthread.h>
@@ -97,8 +99,9 @@
 #include <glib.h>
 #endif 
 
-/* we need to get the definition of errno */
+#ifdef HAVE_ERRNO_H
 #include <errno.h>
+#endif
 
 #define NETLIB
 

Modified: trunk/src/netlib.h
===================================================================
--- trunk/src/netlib.h	2006-01-25 15:57:56 UTC (rev 45)
+++ trunk/src/netlib.h	2006-01-25 18:01:36 UTC (rev 46)
@@ -100,6 +100,11 @@
 extern void break_args_explicit(char *s, char *arg1, char *arg2);
 extern int parse_address_family(char family_string[]);
 extern int establish_listen(char *hostname, char *service, int af, socklen_t *addrlenp);
+#ifndef HAVE_GET_EXPIRATION_TIME
+/* we need a proto since we are providing the fuction ourselves */
+extern int get_expiration_time(struct timespec *delta,
+			       struct timespec *abstime );
+#endif
 
 /* state machine data structure for process message */
 

Modified: trunk/src/netperf.c
===================================================================
--- trunk/src/netperf.c	2006-01-25 15:57:56 UTC (rev 45)
+++ trunk/src/netperf.c	2006-01-25 18:01:36 UTC (rev 46)
@@ -35,17 +35,37 @@
 #include <pwd.h>
 */
 
+#ifdef HAVE_CONFIG_H
 #include "config.h"
+#endif
 
+#ifdef HAVE_STDIO_H
 #include <stdio.h>
+#endif
+
+#ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
+#endif
+
+#ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
+#endif
+
+#ifdef HAVE_STRING_H
 #include <string.h>
+#endif
+
+#ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
+#endif
 
+#ifdef HAVE_POLL_H
 #include <poll.h>
+#endif
 
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
 
 #ifndef HAVE_GETOPT_LONG
 #include "missing/getopt.h"

Modified: trunk/src/netserver.c
===================================================================
--- trunk/src/netserver.c	2006-01-25 15:57:56 UTC (rev 45)
+++ trunk/src/netserver.c	2006-01-25 18:01:36 UTC (rev 46)
@@ -39,8 +39,13 @@
 #include "config.h"
 #endif
 
+#ifdef HAVE_STDIO_H
 #include <stdio.h>
+#endif
+
+#ifdef HAVE_SIGNAL_H
 #include <signal.h>
+#endif
 
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
@@ -58,13 +63,17 @@
 #include <unistd.h>
 #endif
 
+#ifdef HAVE_ERRNO_H
 #include <errno.h>
+#endif
 
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
 
+#ifdef HAVE_POLL_H
 #include <poll.h>
+#endif
 
 #include <libxml/xmlmemory.h>
 #include <libxml/parser.h>
@@ -856,9 +865,6 @@
   int   i;
   int   rc;
 
-  struct sockaddr  name;
-  int              namelen      = sizeof(name);
-
   NETPERF_DEBUG_ENTRY(debug,where);
 
 

Modified: trunk/src/netsysstats.h
===================================================================
--- trunk/src/netsysstats.h	2006-01-25 15:57:56 UTC (rev 45)
+++ trunk/src/netsysstats.h	2006-01-25 18:01:36 UTC (rev 46)
@@ -1,3 +1,40 @@
+/*
+
+Copyright (c) 2005,2006 Hewlett-Packard Company 
+
+$Id$
+
+This file is part of netperf4.
+
+Netperf4 is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 2 of the License, or (at your
+option) any later version.
+
+Netperf4 is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+USA.
+
+In addition, as a special exception, the copyright holders give
+permission to link the code of netperf4 with the OpenSSL project's
+"OpenSSL" library (or with modified versions of it that use the same
+license as the "OpenSSL" library), and distribute the linked
+executables.  You must obey the GNU General Public License in all
+respects for all of the code used other than "OpenSSL".  If you modify
+this file, you may extend this exception to your version of the file,
+but you are not obligated to do so.  If you do not wish to do so,
+delete this exception statement from your version.
+
+*/
+
+#ifndef _NETSYSSTATS_H
+#define _NETSYSSTATS_H
 /* Macros for accessing fields in the global netperf structures. */
 #define SET_TEST_STATE(state)             test->new_state = state
 #define GET_TEST_STATE                    test->new_state
@@ -38,4 +75,9 @@
   void                 *psd;         /* a pointer to platform specific data */
 } netsysstat_data_t;
 
+extern void get_cpu_time_counters(cpu_time_counters_t *res,
+				  struct timeval *timestamp,
+				  test_t *test);
 
+extern int sys_cpu_util_init(test_t *test);
+#endif

Modified: trunk/src/netsysstats_common.c
===================================================================
--- trunk/src/netsysstats_common.c	2006-01-25 15:57:56 UTC (rev 45)
+++ trunk/src/netsysstats_common.c	2006-01-25 18:01:36 UTC (rev 46)
@@ -440,7 +440,7 @@
 sys_stats(test_t *test)
 {
   
-  int i,n,err;
+  int err;
   int num_cpus;
  
   netsysstat_data_t  *tsd;

Modified: trunk/src/nettest_bsd.c
===================================================================
--- trunk/src/nettest_bsd.c	2006-01-25 15:57:56 UTC (rev 45)
+++ trunk/src/nettest_bsd.c	2006-01-25 18:01:36 UTC (rev 46)
@@ -71,16 +71,22 @@
 #include "config.h"
 #endif
 
+#ifdef HAVE_STDIO_H
 #include <stdio.h>
+#endif
+
+/* between the next three we aught to find MAXDOUBLE or DBL_MAX */
 #ifdef HAVE_VALUES_H
 #include <values.h>
-#else
+#endif
+
 #ifdef HAVE_MATH_H
 #include <math.h>
 #endif
-#endif
 
+#ifdef HAVE_FLOAT_H
 #include <float.h>
+#endif
 
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
@@ -90,7 +96,9 @@
 #include <string.h>
 #endif
 
+#ifdef HAVE_ERRNO_H
 #include <errno.h>
+#endif
 
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
@@ -99,12 +107,21 @@
 #endif
 #endif
 
+#ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
+#endif
 
+#ifdef HAVE_NETINET_TCP_H
 #include <netinet/tcp.h>
+#endif
 
+#ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
+#endif
+
+#ifdef HAVE_NETDB_H
 #include <netdb.h>
+#endif
 
 #include "netperf.h"
 

Modified: trunk/src/nettest_dns.c
===================================================================
--- trunk/src/nettest_dns.c	2006-01-25 15:57:56 UTC (rev 45)
+++ trunk/src/nettest_dns.c	2006-01-25 18:01:36 UTC (rev 46)
@@ -57,13 +57,21 @@
 
 
 
+#ifdef HAVE_STDIO_H
 #include <stdio.h>
+#endif
+
 #ifdef HAVE_VALUES_H
 #include <values.h>
 #endif
 
-/* perhaps this needs ifdef coverage, we use it on darwin to get DLB_MAX et al */
+/* perhaps this needs ifdef coverage, we use it on darwin to get
+   DLB_MAX et al */
+
+#ifdef HAVE_FLOAT_H
 #include <float.h>
+#endif
+
 #ifndef MAXDOUBLE
 #define MAXDOUBLE DBL_MAX
 #endif
@@ -87,20 +95,25 @@
 #include <string.h>
 #endif
 
+#ifdef HAVE_ERRNO_H
 #include <errno.h>
+#endif
 
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
 
+#ifdef HAVE_NETINET_TCP_H
 #include <netinet/tcp.h>
+#endif
 
 #ifdef HAVE_ARPA_NAMESER_H
 #include <arpa/nameser.h>
 #endif
 
-/* need to get this covered by an ifdef */
+#ifdef HAVE_ARPA_NAMESER_COMPAT_H
 #include <arpa/nameser_compat.h>
+#endif
 
 #ifdef HAVE_RESOLV_H
 #include <resolv.h>

Modified: trunk/src/nettest_vst.c
===================================================================
--- trunk/src/nettest_vst.c	2006-01-25 15:57:56 UTC (rev 45)
+++ trunk/src/nettest_vst.c	2006-01-25 18:01:36 UTC (rev 46)
@@ -49,21 +49,40 @@
 #include "config.h"
 #endif
 
+#ifdef HAVE_STDIO_H
 #include <stdio.h>
+#endif
+
 #ifdef HAVE_VALUES_H
 #include <values.h>
 #endif
+
+#ifdef HAVE_FLOAT_H
 #include <float.h>
+#endif
+
 #ifndef MAXDOUBLE
 #define MAXDOUBLE DBL_MAX
 #endif
 #ifndef MINDOUBLE
 #define MINDOUBLE DBL_MIN
 #endif
+
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
+
+#ifdef HAVE_STRING_H
 #include <string.h>
+#endif
+
+#ifdef HAVE_SIGNAL_H
 #include <signal.h>
+#endif
+
+#ifdef HAVE_ERRNO_H
 #include <errno.h>
+#endif
 
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
@@ -76,10 +95,17 @@
 #include <netinet/in.h>
 #endif
 
+#ifdef HAVE_NETINET_TCP_H
 #include <netinet/tcp.h>
+#endif
 
+#ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
+#endif
+
+#ifdef HAVE_NETDB_H
 #include <netdb.h>
+#endif
 
 #include "netperf.h"
 



More information about the netperf-dev mailing list