Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #if !defined(LT__PRIVATE_H)
00032 #define LT__PRIVATE_H 1
00033
00034 #if defined(LT_CONFIG_H)
00035 # include LT_CONFIG_H
00036 #else
00037 # include <config.h>
00038 #endif
00039
00040 #include <stdio.h>
00041 #include <ctype.h>
00042 #include <assert.h>
00043 #include <errno.h>
00044 #include <string.h>
00045
00046 #if defined(HAVE_UNISTD_H)
00047 # include <unistd.h>
00048 #endif
00049
00050
00051 #include "lt__alloc.h"
00052 #include "lt__dirent.h"
00053 #include "lt__strl.h"
00054 #include "lt__glibc.h"
00055
00056
00057 #include "ltdl.h"
00058
00059 #if defined(WITH_DMALLOC)
00060 # include <dmalloc.h>
00061 #endif
00062
00063
00064
00065 #ifndef LT_GLOBAL_DATA
00066 # if defined(__WINDOWS__) || defined(__CYGWIN__)
00067 # if defined(DLL_EXPORT)
00068 # define LT_GLOBAL_DATA __declspec(dllexport)
00069 # endif
00070 # endif
00071 # ifndef LT_GLOBAL_DATA
00072 # define LT_GLOBAL_DATA
00073 # endif
00074 #endif
00075
00076 #ifndef __attribute__
00077 # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__
00078 # define __attribute__(x)
00079 # endif
00080 #endif
00081
00082 #ifndef LT__UNUSED
00083 # define LT__UNUSED __attribute__ ((__unused__))
00084 #endif
00085
00086
00087 LT_BEGIN_C_DECLS
00088
00089 #if !defined(errno)
00090 extern int errno;
00091 #endif
00092
00093 LT_SCOPE void lt__alloc_die_callback (void);
00094
00095
00096
00097 #define strneq(s1, s2) (strcmp((s1), (s2)) != 0)
00098 #define streq(s1, s2) (!strcmp((s1), (s2)))
00099
00100
00101
00102
00103
00104
00105 typedef struct {
00106 lt_dlinterface_id key;
00107 void * data;
00108 } lt_interface_data;
00109
00110 struct lt__handle {
00111 lt_dlhandle next;
00112 const lt_dlvtable * vtable;
00113 lt_dlinfo info;
00114 int depcount;
00115 lt_dlhandle * deplibs;
00116 lt_module module;
00117 void * system;
00118 lt_interface_data * interface_data;
00119 int flags;
00120 };
00121
00122 struct lt__advise {
00123 unsigned int try_ext:1;
00124 unsigned int is_resident:1;
00125 unsigned int is_symglobal:1;
00126
00127 unsigned int is_symlocal:1;
00128
00129 unsigned int try_preload_only:1;
00130 };
00131
00132
00133
00134
00135
00136
00137 #define LT__STRERROR(name) lt__error_string(LT_CONC(LT_ERROR_,name))
00138
00139 #define LT__GETERROR(lvalue) (lvalue) = lt__get_last_error()
00140 #define LT__SETERRORSTR(errormsg) lt__set_last_error(errormsg)
00141 #define LT__SETERROR(errorcode) LT__SETERRORSTR(LT__STRERROR(errorcode))
00142
00143 LT_SCOPE const char *lt__error_string (int errorcode);
00144 LT_SCOPE const char *lt__get_last_error (void);
00145 LT_SCOPE const char *lt__set_last_error (const char *errormsg);
00146
00147 LT_END_C_DECLS
00148
00149 #endif