# HG changeset patch # User Tim Ringenbach # Date 1101415696 0 # Node ID 7f487c725a90ee12f20b909e0daaf2ef7039a786 # Parent d4e9ff2edc4e195d69944eb3ab8cd556adc2391d [gaim-migrate @ 11406] the autopackage guys were nice enough to quicly fix this for me. basicly a function was getting #ifdef'd out if you compild with --disable-binreloc, that shouldn't have been. committer: Tailor Script diff -r d4e9ff2edc4e -r 7f487c725a90 src/prefix.c --- a/src/prefix.c Thu Nov 25 18:35:26 2004 +0000 +++ b/src/prefix.c Thu Nov 25 20:48:16 2004 +0000 @@ -286,12 +286,14 @@ * Store str in a thread-local variable and return str. The next * you run this function, that variable is freed too. * This function is created so you don't have to worry about freeing - * strings. + * strings. Just be careful about doing this sort of thing: + * + * some_function( BR_DATADIR("/one.png"), BR_DATADIR("/two.png") ) * - * Example: + * Examples: * char *foo; - * foo = thread_local_store (strdup ("hello")); --> foo == "hello" - * foo = thread_local_store (strdup ("world")); --> foo == "world"; "hello" is now freed. + * foo = br_thread_local_store (strdup ("hello")); --> foo == "hello" + * foo = br_thread_local_store (strdup ("world")); --> foo == "world"; "hello" is now freed. */ const char * br_thread_local_store (char *str) diff -r d4e9ff2edc4e -r 7f487c725a90 src/prefix.h --- a/src/prefix.h Thu Nov 25 18:35:26 2004 +0000 +++ b/src/prefix.h Thu Nov 25 20:48:16 2004 +0000 @@ -88,13 +88,13 @@ /* 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 (void *symbol); char *br_locate_prefix (void *symbol); char *br_prepend_prefix (void *symbol, char *path); +#endif /* ENABLE_BINRELOC */ -#endif /* ENABLE_BINRELOC */ +const char *br_thread_local_store (char *str); /* These macros and functions are not guarded by the ENABLE_BINRELOC @@ -108,6 +108,14 @@ #ifndef BR_NO_MACROS /* Convenience functions for concatenating paths */ + + /* Each time you call one, the previous result will be freed. So don't do this: + * + * some_function( BR_DATADIR("/one"), BR_DATADIR("/two") ) + * + * as the first parameter will now be bogus! + */ + #define BR_SELFPATH(suffix) (br_thread_local_store (br_strcat (SELFPATH, suffix))) #define BR_PREFIX(suffix) (br_thread_local_store (br_strcat (PREFIX, suffix))) #define BR_PREFIXDIR(suffix) (br_thread_local_store (br_strcat (BR_PREFIX, suffix)))