Changeset 5517:287ced72ce95 in roaraudio for libroar/roardl.c


Ignore:
Timestamp:
06/01/12 10:59:15 (12 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

Fixed detection of dynamic loader on *BSD.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroar/roardl.c

    r5514 r5517  
    4040#endif 
    4141 
    42 #if defined(ROAR_HAVE_LIBDL) && !defined(RTLD_NEXT) 
     42#if defined(ROAR_HAVE_H_DLFCN) && !defined(RTLD_NEXT) 
    4343#define RTLD_NEXT ((void *) -1L) 
    4444#endif 
     
    6161 } context; 
    6262 unsigned int runtime_flags; 
    63 #if defined(ROAR_HAVE_LIBDL) 
     63#if defined(ROAR_HAVE_H_DLFCN) 
    6464 void * handle; 
    6565#elif defined(ROAR_TARGET_WIN32) 
     
    192192 
    193193 
    194 #if defined(ROAR_HAVE_LIBDL) 
     194#if defined(ROAR_HAVE_H_DLFCN) 
    195195static void * _roardl2ldl (struct roar_dl_lhandle * lhandle) { 
    196196 ROAR_DBG("_roardl2ldl(lhandle=%p) = ?", lhandle); 
     
    354354                                      int ra_init, struct roar_dl_librarypara * para) { 
    355355 struct roar_dl_lhandle * ret = NULL; 
    356 #if defined(ROAR_HAVE_LIBDL) 
     356#if defined(ROAR_HAVE_H_DLFCN) 
    357357#ifdef RTLD_DEEPBIND 
    358358 int libdl_flags = RTLD_DEEPBIND; 
     
    371371  return _roar_dl_open_pluginpath(filename, flags, ra_init, para); 
    372372 
    373 #if defined(ROAR_HAVE_LIBDL) 
     373#if defined(ROAR_HAVE_H_DLFCN) 
    374374 if ( flags & ROAR_DL_FLAG_LAZY ) { 
    375375  libdl_flags |= RTLD_LAZY; 
     
    396396  } 
    397397 } else { 
    398 #if defined(ROAR_HAVE_LIBDL) 
     398#if defined(ROAR_HAVE_H_DLFCN) 
    399399  ret->handle = dlopen(filename, libdl_flags); 
    400400 
     
    424424   err = roar_error; 
    425425   ROAR_WARN("roar_dl_open(filename='%s', flags=%i, ra_init=%i, para=%p): Can not init RA lib: %s", filename, flags, ra_init, para, roar_error2str(err)); 
    426 #if defined(ROAR_HAVE_LIBDL) 
     426#if defined(ROAR_HAVE_H_DLFCN) 
    427427   if ( ret->handle != NULL ) 
    428428    dlclose(ret->handle); 
     
    480480 } 
    481481 
    482 #if defined(ROAR_HAVE_LIBDL) 
     482#if defined(ROAR_HAVE_H_DLFCN) 
    483483 if ( lhandle->handle == NULL ) { 
    484484  ret = 0; 
     
    516516 
    517517void                   * roar_dl_getsym(struct roar_dl_lhandle * lhandle, const char * sym, int type) { 
    518 #if defined(ROAR_HAVE_LIBDL) 
     518#if defined(ROAR_HAVE_H_DLFCN) 
    519519 void * ret = dlsym(_roardl2ldl(lhandle), sym); 
    520520 
     
    664664 
    665665const char * roar_dl_errstr(struct roar_dl_lhandle * lhandle) { 
    666 #if defined(ROAR_HAVE_LIBDL) 
     666#if defined(ROAR_HAVE_H_DLFCN) 
    667667 (void)lhandle; 
    668668 return dlerror(); 
Note: See TracChangeset for help on using the changeset viewer.