• Main Page
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

/Users/jmonk/Physics/ForIA/ForIA/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
00038          * collisions with other ELF objects.
00039          */
00040         #define br_init             xxji25564111619049_br_init
00041         #define br_init_lib         xxji25564111619049_br_init_lib
00042         #define br_find_exe         xxji25564111619049_br_find_exe
00043         #define br_find_exe_dir     xxji25564111619049_br_find_exe_dir
00044         #define br_find_prefix      xxji25564111619049_br_find_prefix
00045         #define br_find_bin_dir     xxji25564111619049_br_find_bin_dir
00046         #define br_find_sbin_dir    xxji25564111619049_br_find_sbin_dir
00047         #define br_find_data_dir    xxji25564111619049_br_find_data_dir
00048         #define br_find_locale_dir  xxji25564111619049_br_find_locale_dir
00049         #define br_find_lib_dir     xxji25564111619049_br_find_lib_dir
00050         #define br_find_libexec_dir xxji25564111619049_br_find_libexec_dir
00051         #define br_find_etc_dir     xxji25564111619049_br_find_etc_dir
00052         #define br_strcat           xxji25564111619049_br_strcat
00053         #define br_build_path       xxji25564111619049_br_build_path
00054         #define br_dirname          xxji25564111619049_br_dirname
00055 #endif
00056 
00057 int   br_init             (BrInitError *error);
00058 int   br_init_lib         (BrInitError *error);
00059 
00060 char *br_find_exe         (const char *default_exe);
00061 char *br_find_exe_dir     (const char *default_dir);
00062 char *br_find_prefix      (const char *default_prefix);
00063 char *br_find_bin_dir     (const char *default_bin_dir);
00064 char *br_find_sbin_dir    (const char *default_sbin_dir);
00065 char *br_find_data_dir    (const char *default_data_dir);
00066 char *br_find_locale_dir  (const char *default_locale_dir);
00067 char *br_find_lib_dir     (const char *default_lib_dir);
00068 char *br_find_libexec_dir (const char *default_libexec_dir);
00069 char *br_find_etc_dir     (const char *default_etc_dir);
00070 
00071 /* Utility functions */
00072 char *br_strcat  (const char *str1, const char *str2);
00073 char *br_build_path (const char *dir, const char *file);
00074 char *br_dirname (const char *path);
00075 
00076 
00077 #ifdef __cplusplus
00078 }
00079 #endif /* __cplusplus */
00080 
00081 #endif /* __BINRELOC_H__ */

Generated on Mon Jul 30 2012 16:56:35 for ForIA by  doxygen 1.7.2