src/include/binreloc.h

Go to the documentation of this file.
00001 /*
00002  * BinReloc - a library for creating relocatable executables
00003  * Written by: Hongli Lai <h.lai@chello.nl>
00004  * http://autopackage.org/
00005  *
00006  * This source code is public domain. You can relicense this code
00007  * under whatever license you want.
00008  *
00009  * See http://autopackage.org/docs/binreloc/ for
00010  * more information and how to use this.
00011  */
00012 
00013 #ifndef __BINRELOC_H__
00014 #define __BINRELOC_H__
00015 
00016 #ifdef __cplusplus
00017 extern "C" {
00018 #endif /* __cplusplus */
00019 
00020 
00022 typedef enum {
00024         BR_INIT_ERROR_NOMEM,
00026         BR_INIT_ERROR_OPEN_MAPS,
00028         BR_INIT_ERROR_READ_MAPS,
00030         BR_INIT_ERROR_INVALID_MAPS,
00032         BR_INIT_ERROR_DISABLED
00033 } BrInitError;
00034 
00035 
00036 #ifndef BINRELOC_RUNNING_DOXYGEN
00037 /* Mangle symbol names to avoid symbol collisions with other ELF objects. */
00038         #define br_init             OllY25605934475341_br_init
00039         #define br_init_lib         OllY25605934475341_br_init_lib
00040         #define br_find_exe         OllY25605934475341_br_find_exe
00041         #define br_find_exe_dir     OllY25605934475341_br_find_exe_dir
00042         #define br_find_prefix      OllY25605934475341_br_find_prefix
00043         #define br_find_bin_dir     OllY25605934475341_br_find_bin_dir
00044         #define br_find_sbin_dir    OllY25605934475341_br_find_sbin_dir
00045         #define br_find_data_dir    OllY25605934475341_br_find_data_dir
00046         #define br_find_locale_dir  OllY25605934475341_br_find_locale_dir
00047         #define br_find_lib_dir     OllY25605934475341_br_find_lib_dir
00048         #define br_find_libexec_dir OllY25605934475341_br_find_libexec_dir
00049         #define br_find_etc_dir     OllY25605934475341_br_find_etc_dir
00050         #define br_strcat           OllY25605934475341_br_strcat
00051         #define br_build_path       OllY25605934475341_br_build_path
00052         #define br_dirname          OllY25605934475341_br_dirname
00053 
00054 
00055 #endif
00056 int   br_init             (BrInitError *error);
00057 int   br_init_lib         (BrInitError *error);
00058 
00059 char *br_find_exe         (const char *default_exe);
00060 char *br_find_exe_dir     (const char *default_dir);
00061 char *br_find_prefix      (const char *default_prefix);
00062 char *br_find_bin_dir     (const char *default_bin_dir);
00063 char *br_find_sbin_dir    (const char *default_sbin_dir);
00064 char *br_find_data_dir    (const char *default_data_dir);
00065 char *br_find_locale_dir  (const char *default_locale_dir);
00066 char *br_find_lib_dir     (const char *default_lib_dir);
00067 char *br_find_libexec_dir (const char *default_libexec_dir);
00068 char *br_find_etc_dir     (const char *default_etc_dir);
00069 
00070 /* Utility functions */
00071 char *br_strcat  (const char *str1, const char *str2);
00072 char *br_build_path (const char *dir, const char *file);
00073 char *br_dirname (const char *path);
00074 
00075 
00076 #ifdef __cplusplus
00077 }
00078 #endif /* __cplusplus */
00079 
00080 #endif /* __BINRELOC_H__ */

Generated on Mon Jan 1 13:10:57 2007 for Wormux by  doxygen 1.4.7