Commit Graph

12 Commits

Author SHA1 Message Date
Bryce Denney
9eff1359ed - add debug output related to searching for symbols 2002-10-17 04:22:29 +00:00
Bryce Denney
9e111bc7fe - check in unpleasant hack to cause LTDL_SHLIB_EXT to say ".dll"
instead of ".dll.a".  The way I did this is NOT good because
  it affects libltdl/libtool too, but I only wanted to affect config.h.
  But I haven't found any other way...
2002-10-16 12:23:28 +00:00
Bryce Denney
8fcfa44ea0 - disable debug messages in the checked in version 2002-10-16 02:19:46 +00:00
Bryce Denney
f49ec8c71c Fix serveral ltdl bugs related to searching for libraries, and what
to do if they cannot be found.

- in try_dlopen, after find_handle() is called and returns 0 over
  and over, it was ignoring the return value of tryall_dlopen.  As
  a result, sometimes the dlopen would fail and return 1 or more
  errors but nobody would notice.  The handle would be returned as
  if the open had succeed, then any use of the handle would segfault
  because handle->loader was NULL.  I have solved this problem by
  capturing the return value in errors, and then checking if errors>0
  in the next if statement.
- fix faulty boolean logic in lt_dlopenext that caused it to only
  search for libraries ending with .la.  Now it says: if try_dlopen
  created a nonzero handle, return it.  Otherwise, if there were
  any errors OTHER THAN file-not-found, return the NULL handle.  If
  the only errors were file-not-found, continue to search.
- just before loading the module in tryall_dlopen, do one final
  call to access() to check for existence of the file.  Without
  this check, you sometimes get the "can't load module" error
  when in fact the problem is "file not found".
2002-10-16 02:08:02 +00:00
Bryce Denney
5d29f481bd - just add some comments 2002-10-16 01:54:46 +00:00
Bryce Denney
bb1a834cc5 - Sometimes lt_dlopen and lt_dlopenext return a valid handle when no
library was actually found.  Add asserts to look for occurrences of this
  "valid handle but NULL loader" problem.
2002-10-16 01:52:39 +00:00
Bryce Denney
9429cb8d62 - add a bunch of debug messages using a macro LTDEBUG_PRINTF(). 2002-10-16 01:45:46 +00:00
Bryce Denney
42e89cc4c7 - fix major bug in LTDL that makes it only look in the first component of
a pathname list.
2002-10-15 20:56:27 +00:00
Bryce Denney
c0f2cfe189 - add a real implementation of assert() if none is found in headers
- add NULL check in tryall_dlopen_module
- add some debug printfs
2002-10-14 21:05:06 +00:00
Bryce Denney
7bb4b2be20 - add header test for <assert.h> 2002-10-14 21:03:27 +00:00
Bryce Denney
87d714f9ca - add additional NULL check. I know you can get this if you forget to
call lt_dlinit(), but I'm pretty certain that I've seen it in other
  cases as well.
2002-10-12 11:47:26 +00:00
Bryce Denney
abd8b78317 - add libltdl files from libtool version 1.4.2 2002-10-12 06:03:59 +00:00