libg722_1
0.0.1
|
00001 /* lt__private.h -- internal apis for libltdl 00002 00003 Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 00004 Written by Gary V. Vaughan, 2004 00005 00006 NOTE: The canonical source of this file is maintained with the 00007 GNU Libtool package. Report bugs to bug-libtool@gnu.org. 00008 00009 This library is free software; you can redistribute it and/or 00010 modify it under the terms of the GNU Lesser General Public 00011 License as published by the Free Software Foundation; either 00012 version 2 of the License, or (at your option) any later version. 00013 00014 As a special exception to the GNU Lesser General Public License, 00015 if you distribute this file as part of a program or library that 00016 is built using GNU libtool, you may include this file under the 00017 same distribution terms that you use for the rest of that program. 00018 00019 GNU Libltdl is distributed in the hope that it will be useful, 00020 but WITHOUT ANY WARRANTY; without even the implied warranty of 00021 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00022 GNU Lesser General Public License for more details. 00023 00024 You should have received a copy of the GNU Lesser General Public 00025 License along with GNU Libltdl; see the file COPYING.LIB. If not, a 00026 copy con be downloaded from http://www.gnu.org/licenses/lgpl.html, 00027 or obtained by writing to the Free Software Foundation, Inc., 00028 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 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 /* Import internal interfaces... */ 00051 #include "lt__alloc.h" 00052 #include "lt__dirent.h" 00053 #include "lt__strl.h" 00054 #include "lt__glibc.h" 00055 00056 /* ...and all exported interfaces. */ 00057 #include "ltdl.h" 00058 00059 #if defined(WITH_DMALLOC) 00060 # include <dmalloc.h> 00061 #endif 00062 00063 /* DLL building support on win32 hosts; mostly to workaround their 00064 ridiculous implementation of data symbol exporting. */ 00065 #ifndef LT_GLOBAL_DATA 00066 # if defined(__WINDOWS__) || defined(__CYGWIN__) 00067 # if defined(DLL_EXPORT) /* defined by libtool (if required) */ 00068 # define LT_GLOBAL_DATA __declspec(dllexport) 00069 # endif 00070 # endif 00071 # ifndef LT_GLOBAL_DATA 00072 # define LT_GLOBAL_DATA /* static linking or !__WINDOWS__ */ 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 /* For readability: */ 00097 #define strneq(s1, s2) (strcmp((s1), (s2)) != 0) 00098 #define streq(s1, s2) (!strcmp((s1), (s2))) 00099 00100 00101 00102 /* --- OPAQUE STRUCTURES DECLARED IN LTDL.H --- */ 00103 00104 /* This type is used for the array of interface data sets in each handler. */ 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; /* dlopening interface */ 00113 lt_dlinfo info; /* user visible fields */ 00114 int depcount; /* number of dependencies */ 00115 lt_dlhandle * deplibs; /* dependencies */ 00116 lt_module module; /* system module handle */ 00117 void * system; /* system specific data */ 00118 lt_interface_data * interface_data; /* per caller associated data */ 00119 int flags; /* various boolean stats */ 00120 }; 00121 00122 struct lt__advise { 00123 unsigned int try_ext:1; /* try system library extensions. */ 00124 unsigned int is_resident:1; /* module can't be unloaded. */ 00125 unsigned int is_symglobal:1; /* module symbols can satisfy 00126 subsequently loaded modules. */ 00127 unsigned int is_symlocal:1; /* module symbols are only available 00128 locally. */ 00129 unsigned int try_preload_only:1;/* only preloaded modules will be tried. */ 00130 }; 00131 00132 /* --- ERROR HANDLING --- */ 00133 00134 /* Extract the diagnostic strings from the error table macro in the same 00135 order as the enumerated indices in lt_error.h. */ 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 /*!defined(LT__PRIVATE_H)*/