+2002-02-18 [alfons] 0.7.1claws13
+
+ * src/syldap.c
+ * src/jpilot.c
+ remove references to dlfcn and explicitly loading functions
+ from dynalink libs, because libs linked anyway, and functions
+ are loaded explicitly
+
2002-02-17 [melvin] 0.7.1claws12
* src/prefs_actions.c
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
-#include <dlfcn.h>
#include <netinet/in.h>
#ifdef HAVE_LIBPISOCK_PI_ARGS_H
* Return: TRUE if library available.
*/
gboolean jpilot_test_pilot_lib( void ) {
- void *handle, *fun;
-
- handle = dlopen( PILOT_LINK_LIB_NAME, RTLD_LAZY );
- if( ! handle ) {
- return FALSE;
- }
-
- /* Test for symbols we need */
- fun = dlsym( handle, "unpack_Address" );
- if( ! fun ) {
- dlclose( handle );
- return FALSE;
- }
-
- fun = dlsym( handle, "unpack_AddressAppInfo" );
- if( ! fun ) {
- dlclose( handle );
- return FALSE;
- }
- dlclose( handle );
return TRUE;
}
#include <ldap.h>
#include <lber.h>
#include <pthread.h>
-#include <dlfcn.h>
#include "mgutils.h"
#include "addritem.h"
return retVal;
}
-#define LDAP_LINK_LIB_NAME_1 "libldap.so"
-#define LDAP_LINK_LIB_NAME_2 "liblber.so"
-#define LDAP_LINK_LIB_NAME_3 "libresolv.so"
-#define LDAP_LINK_LIB_NAME_4 "libpthread.so"
-
/*
* Test whether LDAP libraries installed.
* Return: TRUE if library available.
*/
gboolean syldap_test_ldap_lib() {
- void *handle, *fun;
-
- /* Get library */
- handle = dlopen( LDAP_LINK_LIB_NAME_1, RTLD_LAZY );
- if( ! handle ) {
- return FALSE;
- }
-
- /* Test for symbols we need */
- fun = dlsym( handle, "ldap_init" );
- if( ! fun ) {
- dlclose( handle );
- return FALSE;
- }
- dlclose( handle ); handle = NULL; fun = NULL;
-
- handle = dlopen( LDAP_LINK_LIB_NAME_2, RTLD_LAZY );
- if( ! handle ) {
- return FALSE;
- }
- fun = dlsym( handle, "ber_init" );
- if( ! fun ) {
- dlclose( handle );
- return FALSE;
- }
- dlclose( handle ); handle = NULL; fun = NULL;
-
- handle = dlopen( LDAP_LINK_LIB_NAME_3, RTLD_LAZY );
- if( ! handle ) {
- return FALSE;
- }
- fun = dlsym( handle, "res_query" );
- if( ! fun ) {
- dlclose( handle );
- return FALSE;
- }
- dlclose( handle ); handle = NULL; fun = NULL;
-
- handle = dlopen( LDAP_LINK_LIB_NAME_4, RTLD_LAZY );
- if( ! handle ) {
- return FALSE;
- }
- fun = dlsym( handle, "pthread_create" );
- if( ! fun ) {
- dlclose( handle );
- return FALSE;
- }
- dlclose( handle ); handle = NULL; fun = NULL;
-
return TRUE;
}