Re: Fix for dl&dlerror test in gnome-libs



On Mon, Jul 13, 1998 at 12:16:47 AM -0400, James Michael Mastros wrote:
> This patch
I hate it when I do that.  Patches REALLY on this one.

	-=- James Mastros
Index: configure.in
===================================================================
RCS file: /cvs/gnome/gnome-libs/configure.in,v
retrieving revision 1.68
diff -u -u -r1.68 configure.in
--- configure.in	1998/07/07 07:04:27	1.68
+++ configure.in	1998/07/13 04:12:16
@@ -54,13 +54,17 @@
 AC_CHECK_LIB(m, main)
 
 AC_CHECK_HEADERS(dlfcn.h dl.h)
+AC_CHECK_FUNCS(dlopen, DL_LIB="",[
 AC_CHECK_LIB(dl, dlopen, DL_LIB="-ldl",[
 AC_CHECK_LIB(dld, shl_load, DL_LIB="-ldld",[
-AC_CHECK_FUNCS(dlopen, DL_LIB="",
 AC_MSG_ERROR(Dynamic linking is not available on this platform.  Some apps,
-like panel, will not run properly.))
-])])
+like panel, will not run properly.)
+])])])
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $DL_LIB"
 AC_CHECK_FUNCS(dlerror,,)
+CFLAGS="$save_CFLAGS"
+unset save_CFLAGS
 AC_SUBST(DL_LIB)
 
 AC_CHECK_FUNCS(strerror gethostbyname setfsgid setenv putenv)
Index: runtest.sh
===================================================================
RCS file: /cvs/gnome/gnome-libs/test-suite/runtest.sh,v
retrieving revision 1.5
diff -u -r1.5 runtest.sh
--- runtest.sh	1998/06/11 06:45:14	1.5
+++ runtest.sh	1998/07/11 02:18:07
@@ -20,6 +20,7 @@
 for I in $TESTS; do
     TEST=`basename $I .c`
     $COMPILE $srcdir/tests/$TEST.c -o tests/$TEST.o > /tmp/.$$ 2>&1
+    $LINK $srcdir/tests/$TEST.o $LDADD -o $srcdir/tests/$TEST
     T=$?
     if test $T != 0; then
 	echo "CFAIL: $TEST" >&3
Index: tests/fileconvert.c
===================================================================
RCS file: /cvs/gnome/gnome-libs/test-suite/tests/fileconvert.c,v
retrieving revision 1.3
diff -u -r1.3 fileconvert.c
--- fileconvert.c	1998/02/22 19:06:07	1.3
+++ fileconvert.c	1998/07/11 02:18:07
@@ -19,7 +19,7 @@
 
 	chdir("tests");
 	chmod("lynxdump.sh", S_IXGRP|S_IXOTH|S_IXUSR|S_IRGRP|S_IROTH|S_IRUSR|S_IWUSR);
-	gnomelib_init("fileconvert", &argc, &argv);
+	gnomelib_init("fileconvert");
 	outfd = gnome_file_convert("fileconvert.in",
 				   "text/html",
 				   "text/ascii");
Index: tests/skel.c
===================================================================
RCS file: /cvs/gnome/gnome-libs/test-suite/tests/skel.c,v
retrieving revision 1.2
diff -u -r1.2 skel.c
--- skel.c	1998/02/22 19:06:08	1.2
+++ skel.c	1998/07/11 02:18:07
@@ -11,7 +11,7 @@
 
 int main(int argc, char *argv[])
 {
-	gnomelib_init("skel", &argc, &argv);
+	gnomelib_init("skel");
 	fflush(stdout); /* Make sure to fflush things after you do
 			   any output, so what you see on your terminal
 			   is the same as what goes into the output file */
Index: tests/split.c
===================================================================
RCS file: /cvs/gnome/gnome-libs/test-suite/tests/split.c,v
retrieving revision 1.3
diff -u -r1.3 split.c
--- split.c	1998/02/22 19:06:08	1.3
+++ split.c	1998/07/11 02:18:07
@@ -13,7 +13,7 @@
 {
 	char **output;
 	int i;
-	gnomelib_init("split", &argc, &argv);
+	gnomelib_init("split");
 	output = gnome_string_split("foo:bar:baz", ":", -1);
 	for(i = 0; output[i]; i++) {
 		g_print("%s ", output[i]);
Index: tests/trigs.c
===================================================================
RCS file: /cvs/gnome/gnome-libs/test-suite/tests/trigs.c,v
retrieving revision 1.2
diff -u -r1.2 trigs.c
--- trigs.c	1998/02/22 19:06:09	1.2
+++ trigs.c	1998/07/11 02:18:08
@@ -22,7 +22,7 @@
 	trig.u.function = sample_trigger_function;
 	trig.level = NULL;
 
-	gnomelib_init("trigs", &argc, &argv);
+	gnomelib_init("trigs");
 	gnome_triggers_init();
 	gnome_triggers_readfile("tests/trigs.in");
 	gnome_triggers_add_trigger(&trig, "test", "one", NULL);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]