00001 /***************************** License ********************************** 00002 00003 Copyright (C) 2008 by Communicative Machines 00004 http://www.cmlabs.com All rights reserved. 00005 00006 This library is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU Lesser General Public 00008 License as published by the Free Software Foundation; either 00009 version 2.1 of the License, or (at your option) any later version. 00010 00011 This library is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 Lesser General Public License for more details. 00015 00016 You should have received a copy of the GNU Lesser General Public 00017 License along with this library; if not, write to the Free Software 00018 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 00020 ************************************************************************/ 00021 00022 00023 /* 00024 Copyright (c) 2002 Jorge Acereda <jacereda@users.sourceforge.net> & 00025 Peter O'Gorman <ogorman@users.sourceforge.net> 00026 00027 Portions may be copyright others, see the AUTHORS file included with this 00028 distribution. 00029 00030 Maintained by Peter O'Gorman <ogorman@users.sourceforge.net> 00031 00032 Bug Reports and other queries should go to <ogorman@users.sourceforge.net> 00033 00034 Permission is hereby granted, free of charge, to any person obtaining 00035 a copy of this software and associated documentation files (the 00036 "Software"), to deal in the Software without restriction, including 00037 without limitation the rights to use, copy, modify, merge, publish, 00038 distribute, sublicense, and/or sell copies of the Software, and to 00039 permit persons to whom the Software is furnished to do so, subject to 00040 the following conditions: 00041 00042 The above copyright notice and this permission notice shall be 00043 included in all copies or substantial portions of the Software. 00044 00045 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 00046 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00047 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 00048 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 00049 LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 00050 OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 00051 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 00052 */ 00053 00054 #ifndef _DLFCN_H_ 00055 #define _DLFCN_H_ 00056 00057 #ifdef __cplusplus 00058 extern "C" { 00059 #endif 00060 00061 00062 /* 00063 * Structure filled in by dladdr(). 00064 */ 00065 00066 typedef struct dl_info { 00067 const char *dli_fname; /* Pathname of shared object */ 00068 void *dli_fbase; /* Base address of shared object */ 00069 const char *dli_sname; /* Name of nearest symbol */ 00070 void *dli_saddr; /* Address of nearest symbol */ 00071 } Dl_info; 00072 00073 00074 extern void * dllopen(const char *path, int mode); 00075 extern void * dllsym(void * handle, const char *symbol); 00076 extern const char * dllerror(void); 00077 extern int dllclose(void * handle); 00078 extern int dlladdr(void *, Dl_info *); 00079 00080 #define RTLD_LAZY 0x1 00081 #define RTLD_NOW 0x2 00082 #define RTLD_LOCAL 0x4 00083 #define RTLD_GLOBAL 0x8 00084 #define RTLD_NOLOAD 0x10 00085 #define RTLD_NODELETE 0x80 00086 00087 00088 #ifdef __cplusplus 00089 } 00090 #endif 00091 00092 #endif /* _DLFCN_H_ */