/**-- Words to open a shared code object Copyright (C) Tektronix, Inc. 1998 - 2001. All rights reserved. @see GNU LGPL @author Tektronix CTE %derived_by: guidod % @version %version: 1.15 % (%date_modified: Mon May 21 14:56:10 2001 %) @description This file exports a set of system words for any OS that can dynamically bind object code to the interpreter. This part will then try to look up a symbol that can return a loadlist-table to be fed to the loadlist-loader routine. linux/solaris, win, bsd, hpux, win16, win32, beos, libdld, autoconf-dlpreopen - libltdl and libdl are very close in its api functionality, hence prefer ifdef-noise in this file. */ /* note that the dlopen() functionality is not only quite simple, it can also be implemented as a layer on top of most other foreign function interfaces of a system - and since this one is also in the unix98 specs we can expect dlfcn to become very very common. The only thing we have to watch out for: whether C symbols must be found with a leading underscore since that varies from platform to platform. @{ */ #if defined(__version_control__) && defined(__GNUC__)static char* id __attribute__((unused)) = "@(#) $Id: %full_filespec: dl-dlfcn.c~1.15:csrc:bln_12xx!1 % $" #endif #define _P4_SOURCE 1 #ifndef _export #include <pfe/def-config.h> #endif #ifdef PFE_HAVE_GNU_DLADDR # ifndef _GNU_SOURCE # define _GNU_SOURCE 1 # endif #endif #include <stdio.h> #include <errno.h> #include <limits.h> #include <string.h> #include <time.h> #include <pfe/logging.h> #ifndef PATH_MAX # ifdef _POSIX_PATH_MAX # define PATH_MAX _POSIX_PATH_MAX # else # define PATH_MAX 255 # endif #endif #if defined WITH_LTDL #define USE_LTDL #elif defined PFE_HAVE_DLFCN_H #define USE_DLFCN #else #define USE_LTDL #endif #ifdef USE_LTDL # include <ltdl.h> #else # include <dlfcn.h> #endif #ifndef PFE_NEED_USCORE /*; USER-CONFIG */ #define PFE_NEED_USCORE 0 /*whether override to find PFE module loadlist */ #endif #ifndef RTLD_GLOBAL #define RTLD_GLOBAL 0 #endif #ifndef RTLD_NOW #define RTLD_NOW 0 #endif/** dlfcn: pointer to program symbol table */ static void* p4_dlself = 0;
/**
|
/**
|
/**
|
/**
|
/**
|
/* |