libtool-patches
[Top][All Lists]
Advanced

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

FYI: HEAD: fix lt_dlopen* with "" argument


From: Ralf Wildenhues
Subject: FYI: HEAD: fix lt_dlopen* with "" argument
Date: Sat, 1 Sep 2007 12:44:27 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

Currently, in HEAD
  ./mdemo ./nonexistent

fails with

| lt-mdemo: ../libtool/libltdl/ltdl.c:1173: try_dlopen: Assertion `filename && 
*filename' failed.

because further up the chain (lt_dlopen*), we test for non-NULL filename
but not a filename equal to "".  I think that should just return "No
such file or directory" just like branch-1-5 does.  The patch below
fixes it.

Cheers,
Ralf

2007-09-01  Ralf Wildenhues  <address@hidden>

        * libltdl/ltdl.c (lt_dlopenadvise): Instead of asserting, return
        FILE_NOT_FOUND if the filename is "".

Index: libltdl/ltdl.c
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/ltdl.c,v
retrieving revision 1.260
diff -u -r1.260 ltdl.c
--- libltdl/ltdl.c      1 Sep 2007 08:13:20 -0000       1.260
+++ libltdl/ltdl.c      1 Sep 2007 10:34:28 -0000
@@ -1599,9 +1599,8 @@
 
       return handle;
     }
-  else
+  else if (filename && *filename)
     {
-      assert (filename);
 
       /* First try appending ARCHIVE_EXT.  */
       errors += try_dlopen (&handle, filename, archive_ext, advise);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]