diff -w -ru librep-0.14.orig/src/Makefile.in librep-0.14/src/Makefile.in
--- librep-0.14.orig/src/Makefile.in	Fri Jun 15 00:24:50 2001
+++ librep-0.14/src/Makefile.in	Tue Jul 24 13:23:24 2001
@@ -61,11 +61,11 @@
 	  -o $@ $^ -rpath $(libdir) $(LIBS) $(GMP_LIBS)
 
 rep : $(REP_OBJS) $(EXTRA_LIBOBJS) librep.la
-	$(LIBTOOL) --mode=link $(CC) -export-dynamic $(CPPFLAGS) $(CFLAGS) -o $@ \
+	$(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -export-dynamic $(CPPFLAGS) $(CFLAGS) -o $@ \
 	  $(REP_OBJS) librep.la $(EXTRA_LIBOBJS) $(LIBS) $(GMP_LIBS)
 
 srep : $(REP_OBJS) $(EXTRA_LIBOBJS) librep.la
-	$(LIBTOOL) --mode=link $(CC) -static -export-dynamic $(CPPFLAGS) $(CFLAGS) -o $@ \
+	$(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -static -export-dynamic $(CPPFLAGS) $(CFLAGS) -o $@ \
 	  $(REP_OBJS) librep.la $(EXTRA_LIBOBJS) $(LIBS) $(GMP_LIBS)
 
 rep-remote : rep-remote.c
diff -w -ru librep-0.14.orig/src/librep.sym librep-0.14/src/librep.sym
--- librep-0.14.orig/src/librep.sym	Wed Dec 20 21:21:11 2000
+++ librep-0.14/src/librep.sym	Tue Jul 24 15:14:03 2001
@@ -578,6 +578,7 @@
 rep_event_loop
 rep_event_loop_fun
 rep_expand_and_get_handler
+rep_file_fdopen
 rep_file_length
 rep_file_type
 rep_find_c_symbol
diff -w -ru librep-0.14.orig/src/misc.c librep-0.14/src/misc.c
--- librep-0.14.orig/src/misc.c	Thu Jun 14 23:39:44 2001
+++ librep-0.14/src/misc.c	Tue Jul 24 14:21:24 2001
@@ -178,7 +178,7 @@
 	if(rep_STRINGP(arg))
 	{
 	    u_char *tmp = rep_STR(arg);
-	    if((rep_NILP(fold) ? strncmp : strncasecmp)(orig, tmp, origlen) == 0)
+	    if((rep_NILP(fold) ? strncmp(orig, tmp, origlen) : strncasecmp(orig, tmp, origlen)) == 0)
 	    {
 		if(match)
 		{
diff -w -ru librep-0.14.orig/src/unix_dl.c librep-0.14/src/unix_dl.c
--- librep-0.14.orig/src/unix_dl.c	Mon Apr 16 17:13:22 2001
+++ librep-0.14/src/unix_dl.c	Tue Jul 24 14:58:28 2001
@@ -41,6 +41,7 @@
 #include "repint.h"
 #include <assert.h>
 #include <string.h>
+#include <errno.h>
 
 /* we define some extensions to the libtool .la file. As well as using
    the dlname entry to find the .so file to open, we also look for:
@@ -310,6 +311,7 @@
 	    {
 		relocate_now = rep_TRUE;
 	    }
+	    errno = 0;
 
 #if defined (HAVE_DLOPEN)
 	    handle = dlopen(dlname,
@@ -330,7 +332,11 @@
 		err = "unknown dl error";
 #endif
 		if(err != 0)
+		{
+		    printf(strerror(errno));
+		    signal_error (dlname);
 		    signal_error (err);
+		}
 		return 0;
 	    }
 	    x = rep_alloc(sizeof(struct dl_lib_info));
