libltdl (current from CVS) seems not to return NULL when lt_dlopen is
passed the name of a non-existent file. I have used:
void
sk_err ( char *e )
{
fprintf ( stderr, "Error: %s\n", e );
exit ( EXIT_FAILURE );
}
int
main ( int argc __attribute ( ( unused ) ),
char *const *argv __attribute ( ( unused ) ) )
{
lt_dlhandle mod = NULL;
if ( lt_dlinit ( ) )
{
sk_err ( "Init" );
}
/* LTDL_SET_PRELOADED_SYMBOLS(); */
if ( ( mod = lt_dlopen ( "non-existant.dll" ) ) == NULL )
{
sk_err ( "Open" );
}
if ( lt_dlclose ( mod ) )
{
sk_err ( "Close" );
}
if ( lt_dlexit ( ) )
{
sk_err ( "Exit" );
}
return 0;
}
I get a segfault on the lt_dlclose line since the module does not exist,
and yet lt_dlopen does not return NULL.
Please advise,
Thanks,
Stephano Mariani
_______________________________________________
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool