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

raj at netperf.org raj at netperf.org
Tue Mar 7 18:19:14 PST 2006


Author: raj
Date: 2006-03-07 18:19:09 -0800 (Tue, 07 Mar 2006)
New Revision: 79

Modified:
   trunk/configure
   trunk/configure.ac
   trunk/src/netlib.c
   trunk/src/netperf.h
Log:
Use of gmodule changes actually work here :)  cnfigure --with-glib will
enable that, although it isn't really needed under Linux/Unix with pthreads
and such. All this glib stuff is to enable the Windows port more than 
anything else at the moment.  It will prep for gtk+ I suppose :)


Modified: trunk/configure
===================================================================
--- trunk/configure	2006-03-08 01:31:09 UTC (rev 78)
+++ trunk/configure	2006-03-08 02:19:09 UTC (rev 79)
@@ -23993,6 +23993,8 @@
 
 glib_cflags=""
 glib_libs=""
+gmodule_cflags=""
+gmodule_libs=""
 
 if test "${with_glib+set}" = set && test "$with_glib" != no; then
    # Extract the first word of "pkg-config", so it can be a program name with args.
@@ -24035,8 +24037,11 @@
     # while we are using "glib" we are really using gthread it seems so do
     # the pkg-config thing with that name instead as it seems to be a
     # proper superset
-	glib_cflags=`pkg-config --cflags gthread-2.0`
-	glib_libs=`pkg-config --libs gthread-2.0`
+    glib_cflags=`pkg-config --cflags gthread-2.0`
+    glib_libs=`pkg-config --libs gthread-2.0`
+    # of course, then we start allowing the use of gmodule stuff :)
+    gmodule_cflags=`pkg-config --cflags gmodule-2.0`
+    gmodule_libs=`pkg-config --libs gmodule-2.0`
 
 cat >>confdefs.h <<\_ACEOF
 #define WITH_GLIB 1
@@ -25687,8 +25692,8 @@
 echo "${ECHO_T}\"$enable_cpuutil\"" >&6
 
 # not sure that this is really the right way to do this...help?
-CFLAGS="$CLFAGS $libxml2_cflags $glib_cflags"
-LIBS="$LIBS $libxml2_libs $glib_libs"
+CFLAGS="$CLFAGS $libxml2_cflags $glib_cflags $gmodule_cflgas"
+LIBS="$LIBS $libxml2_libs $glib_libs $gmodule_libs"
 
 
 

Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac	2006-03-08 01:31:09 UTC (rev 78)
+++ trunk/configure.ac	2006-03-08 02:19:09 UTC (rev 79)
@@ -128,6 +128,8 @@
 
 glib_cflags=""
 glib_libs=""
+gmodule_cflags=""
+gmodule_libs=""
 
 if test "${with_glib+set}" = set && test "$with_glib" != no; then
    AC_CHECK_PROG(have_pkg_config, pkg-config, "yes","no")
@@ -135,9 +137,12 @@
     # while we are using "glib" we are really using gthread it seems so do
     # the pkg-config thing with that name instead as it seems to be a
     # proper superset 
-	glib_cflags=`pkg-config --cflags gthread-2.0`
-	glib_libs=`pkg-config --libs gthread-2.0`
-	AC_DEFINE([WITH_GLIB],1,[Define to one to use glib instead of direct pthreads])
+    glib_cflags=`pkg-config --cflags gthread-2.0`
+    glib_libs=`pkg-config --libs gthread-2.0`
+    # of course, then we start allowing the use of gmodule stuff :)
+    gmodule_cflags=`pkg-config --cflags gmodule-2.0`
+    gmodule_libs=`pkg-config --libs gmodule-2.0`
+    AC_DEFINE([WITH_GLIB],1,[Define to one to use glib instead of direct pthreads])
    else
 	AC_MSG_ERROR(Cannot find pkg-config and so cannot use glib.)
    fi
@@ -576,8 +581,8 @@
 	AC_MSG_RESULT("$enable_cpuutil")
 
 # not sure that this is really the right way to do this...help?
-CFLAGS="$CLFAGS $libxml2_cflags $glib_cflags"
-LIBS="$LIBS $libxml2_libs $glib_libs"
+CFLAGS="$CLFAGS $libxml2_cflags $glib_cflags $gmodule_cflgas"
+LIBS="$LIBS $libxml2_libs $glib_libs $gmodule_libs"
 
 AC_SUBST(CFLAGS)
 AC_SUBST(LIBS)

Modified: trunk/src/netlib.c
===================================================================
--- trunk/src/netlib.c	2006-03-08 01:31:09 UTC (rev 78)
+++ trunk/src/netlib.c	2006-03-08 02:19:09 UTC (rev 79)
@@ -844,7 +844,7 @@
 #ifdef WITH_GLIB
     tokens = g_strsplit(ld_library_path,":",15);
     for (tok = 0; tokens[tok] != NULL; tok++) {
-      g_snprintf(full_path,PATH_MAX,"%s%s%s",temp,NETPERF_PATH_SEP,la);
+      g_snprintf(full_path,PATH_MAX,"%s%s%s",tokens[tok],NETPERF_PATH_SEP,la);
       if (g_stat(full_path,&buf) == 0) {
 	/* we have a winner, time to go */
 	break;
@@ -940,7 +940,7 @@
     }
   }
   if (debug) {
-    printf("map_la_to_lib returning '%s' from '%s'\n",lib,(char *)la);
+    fprintf(where,"map_la_to_lib returning '%s' from '%s'\n",lib,(char *)la);
   }
 }
 

Modified: trunk/src/netperf.h
===================================================================
--- trunk/src/netperf.h	2006-03-08 01:31:09 UTC (rev 78)
+++ trunk/src/netperf.h	2006-03-08 02:19:09 UTC (rev 79)
@@ -126,6 +126,7 @@
 #define NETPERF_DEBUG_LOG_SUFFIX  ".log"
 #define INVALID_SOCKET -1
 #define SOCKET_ERROR -1
+#define SOCKET int
 #endif
 
 #include "netconfidence.h"



More information about the netperf-dev mailing list