/*
* BinReloc - a library for creating relocatable executables
* Written by: Mike Hearn <mike@theoretic.com>
* Hongli Lai <h.lai@chello.nl>
*
* This source code is public domain. You can relicense this code
* under whatever license you want.
*
* See http://autopackage.org/docs/binreloc/ for
* more information and how to use this.
*
* NOTE: if you're using C++ and are getting "undefined reference
* to br_*", try renaming prefix.c to prefix.cpp
*/
#ifndef _PREFIX_H_
#define _PREFIX_H_
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* WARNING, BEFORE YOU MODIFY PREFIX.C:
*
* If you make changes to any of the functions in prefix.c, you MUST
* change the BR_NAMESPACE macro.
* This way you can avoid symbol table conflicts with other libraries
* that also happen to use BinReloc.
*
* Example:
* #define BR_NAMESPACE(funcName) foobar_ ## funcName
* --> expands br_locate to foobar_br_locate
*/
#ifdef ENABLE_BINRELOC
#ifndef BR_NO_MACROS
/* These are convience macros that replace the ones usually used
#endif /* BR_NO_MACROS */
/* The following functions are used internally by BinReloc
and shouldn't be used directly in applications. */
const char *br_thread_local_store (char *str);
char *br_locate_prefix (void *symbol);
#endif /* ENABLE_BINRELOC */
/* These macros and functions are not guarded by the ENABLE_BINRELOC
* macro because they are portable. You can use these functions.
*/
#ifndef BR_NO_MACROS
/* Convenience functions for concatenating paths */
#endif
char *br_extract_dir (const char *path);
char *br_extract_prefix(const char *path);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#ifdef __WIN32__
char *win32_relative_path(const char *childPath);
#endif
#endif /* _PREFIX_H_ */