osxdlfcn.h

Go to the documentation of this file.
00001 /*
00002 Copyright (c) 2002 Jorge Acereda  <jacereda@users.sourceforge.net> &
00003                    Peter O'Gorman <ogorman@users.sourceforge.net>
00004                    
00005 Portions may be copyright others, see the AUTHORS file included with this
00006 distribution.
00007 
00008 Maintained by Peter O'Gorman <ogorman@users.sourceforge.net>
00009 
00010 Bug Reports and other queries should go to <ogorman@users.sourceforge.net>
00011 
00012 Permission is hereby granted, free of charge, to any person obtaining
00013 a copy of this software and associated documentation files (the
00014 "Software"), to deal in the Software without restriction, including
00015 without limitation the rights to use, copy, modify, merge, publish,
00016 distribute, sublicense, and/or sell copies of the Software, and to
00017 permit persons to whom the Software is furnished to do so, subject to
00018 the following conditions:
00019 
00020 The above copyright notice and this permission notice shall be
00021 included in all copies or substantial portions of the Software.
00022 
00023 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
00024 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00025 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
00026 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
00027 LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
00028 OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
00029 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00030 */
00031 #ifndef _DLFCN_H_
00032 #define _DLFCN_H_
00033 
00034 #ifdef __cplusplus
00035 extern "C" {
00036 #endif
00037 
00038 #if defined (__GNUC__) && __GNUC__ > 3
00039 #define dl_restrict __restrict
00040 #else
00041 #define dl_restrict
00042 #endif
00043 /*
00044  * Structure filled in by dladdr().
00045  */
00046 
00047 typedef struct dl_info {
00048         const char      *dli_fname;     /* Pathname of shared object */
00049         void            *dli_fbase;     /* Base address of shared object */
00050         const char      *dli_sname;     /* Name of nearest symbol */
00051         void            *dli_saddr;     /* Address of nearest symbol */
00052 } Dl_info;
00053 
00054 extern void * dlopen(const char *path, int mode);
00055 extern void * dlsym(void * dl_restrict handle, const char * dl_restrict symbol);
00056 extern const char * dlerror(void);
00057 extern int dlclose(void * handle);
00058 extern int dladdr(const void * dl_restrict, Dl_info * dl_restrict);
00059 
00060 #define RTLD_LAZY 0x1
00061 #define RTLD_NOW  0x2
00062 #define RTLD_LOCAL   0x4
00063 #define RTLD_GLOBAL  0x8
00064 #define RTLD_NOLOAD  0x10
00065 #define RTLD_NODELETE   0x80
00066 
00067 /*
00068  * Special handle arguments for dlsym().
00069  */
00070 #define  RTLD_NEXT      ((void *) -1)  /* Search subsequent objects. */
00071 #define  RTLD_DEFAULT   ((void *) -2)  /* Use default search algorithm. */
00072 
00073 #ifdef __cplusplus
00074 }
00075 #endif
00076 
00077 #endif /* _DLFCN_H_ */
Generated on Mon Jun 13 08:10:27 2011 for NEURON by  doxygen 1.6.3