X-Git-Url: https://git.deb.at/w?a=blobdiff_plain;ds=sidebyside;f=intl%2Frelocatable.h;h=48c5b71e215e9e7c8cca769e12c7bf61d05a309c;hb=69a912c0db0ac135fff332db4f0b05ad9ed2eec6;hp=3acb5343e2e3653d632c6032dc6d4fae4274d729;hpb=ee5170ade20748797fdde09e370fbb07e585fc9a;p=pkg%2Fabook.git diff --git a/intl/relocatable.h b/intl/relocatable.h index 3acb534..48c5b71 100644 --- a/intl/relocatable.h +++ b/intl/relocatable.h @@ -1,5 +1,5 @@ /* Provide relocatable packages. - Copyright (C) 2003, 2005, 2008 Free Software Foundation, Inc. + Copyright (C) 2003 Free Software Foundation, Inc. Written by Bruno Haible , 2003. This program is free software; you can redistribute it and/or modify it @@ -14,7 +14,7 @@ You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _RELOCATABLE_H @@ -31,9 +31,7 @@ extern "C" { /* When building a DLL, we must export some functions. Note that because this is a private .h file, we don't need to use __declspec(dllimport) in any case. */ -#if HAVE_VISIBILITY && BUILDING_DLL -# define RELOCATABLE_DLL_EXPORTED __attribute__((__visibility__("default"))) -#elif defined _MSC_VER && BUILDING_DLL +#if defined _MSC_VER && BUILDING_DLL # define RELOCATABLE_DLL_EXPORTED __declspec(dllexport) #else # define RELOCATABLE_DLL_EXPORTED @@ -46,27 +44,23 @@ extern "C" { instead of "/"). */ extern RELOCATABLE_DLL_EXPORTED void set_relocation_prefix (const char *orig_prefix, - const char *curr_prefix); + const char *curr_prefix); /* Returns the pathname, relocated according to the current installation - directory. - The returned string is either PATHNAME unmodified or a freshly allocated - string that you can free with free() after casting it to 'char *'. */ + directory. */ extern const char * relocate (const char *pathname); -/* Memory management: relocate() potentially allocates memory, because it has - to construct a fresh pathname. If this is a problem because your program - calls relocate() frequently, think about caching the result. Or free the - return value if it was different from the argument pathname. */ +/* Memory management: relocate() leaks memory, because it has to construct + a fresh pathname. If this is a problem because your program calls + relocate() frequently, think about caching the result. */ /* Convenience function: Computes the current installation prefix, based on the original installation prefix, the original installation directory of a particular - file, and the current pathname of this file. - Returns it, freshly allocated. Returns NULL upon failure. */ -extern char * compute_curr_prefix (const char *orig_installprefix, - const char *orig_installdir, - const char *curr_pathname); + file, and the current pathname of this file. Returns NULL upon failure. */ +extern const char * compute_curr_prefix (const char *orig_installprefix, + const char *orig_installdir, + const char *curr_pathname); #else