Eneboo - Documentación para desarrolladores
src/qt/src/3rdparty/dlcompat/dlfcn.h
Ir a la documentación de este archivo.
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 #if 0  // Trolltech remove this so that we don't can't strange warnings for users.
00035 #warning "You are using dlopen(), a legacy API. Please use the Mach-O dylib loading APIs if at all possible"
00036 #endif
00037 
00038 #ifndef DL_PREFIX
00039 #  define DL_PREFIX(x) qt_mac_##x
00040 #endif
00041 
00042 #ifdef __cplusplus
00043 extern "C" {
00044 #endif
00045 
00046 #ifndef dl_restrict
00047 #  if defined (__GNUC__) && __GNUC__ > 3
00048 #    define dl_restrict __restrict
00049 #  else
00050 #    define dl_restrict
00051 #  endif
00052 #endif
00053 /*
00054  * Structure filled in by dladdr().
00055  */
00056     typedef struct DL_PREFIX(dl_info) {
00057         const char      *dli_fname;     /* Pathname of shared object */
00058         void            *dli_fbase;     /* Base address of shared object */
00059         const char      *dli_sname;     /* Name of nearest symbol */
00060         void            *dli_saddr;     /* Address of nearest symbol */
00061     } DL_PREFIX(Dl_info);
00062 
00063     extern void * DL_PREFIX(dlopen)(const char *path, int mode);
00064     extern void * DL_PREFIX(dlsym)(void * dl_restrict handle, const char * dl_restrict symbol);
00065     extern const char * DL_PREFIX(dlerror)(void);
00066     extern int DL_PREFIX(dlclose)(void * handle);
00067     extern int DL_PREFIX(dladdr)(const void * dl_restrict, DL_PREFIX(Dl_info) * dl_restrict);
00068 
00069 #   ifndef RTLD_LAZY
00070 #     define RTLD_LAZY  0x1
00071 #   endif
00072 #   ifndef RTLD_NOW
00073 #     define RTLD_NOW   0x2
00074 #   endif
00075 #   ifndef RTLD_LOCAL
00076 #     define RTLD_LOCAL 0x4
00077 #   endif
00078 #   ifndef RTLD_GLOBAL
00079 #     define RTLD_GLOBAL        0x8
00080 #   endif
00081 #   ifndef RTLD_NOLOAD
00082 #     define RTLD_NOLOAD        0x10
00083 #   endif
00084 #   ifndef RTLD_NODELETE
00085 #     define RTLD_NODELETE      0x80
00086 #   endif
00087 
00088 /*
00089  * Special handle arguments for dlsym().
00090  */
00091 #ifndef RTLD_NEXT
00092 #  define RTLD_NEXT ((void *) -1)       /* Search subsequent objects. */
00093 #endif
00094 #ifndef RTLD_DEFAULT
00095 #  define RTLD_DEFAULT ((void *) -2)    /* Use default search algorithm. */
00096 #endif
00097 
00098 #ifdef __cplusplus
00099 }
00100 #endif
00101 
00102 #endif /* _DLFCN_H_ */
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'