glib/glib.symbols Implement DLL ABI stability also for

2004-12-05  Tor Lillqvist  <tml@iki.fi>

	* glib/glib.symbols
	* glib/gwin32.[hc]: Implement DLL ABI stability also for
	g_win32_get_package_installation_directory()) and
	g_win32_get_package_installation_subdirectory().
This commit is contained in:
Tor Lillqvist 2004-12-05 09:11:42 +00:00 committed by Tor Lillqvist
parent c795c65c42
commit f8cd1aea9e
8 changed files with 89 additions and 9 deletions

View File

@ -1,5 +1,10 @@
2004-12-05 Tor Lillqvist <tml@iki.fi> 2004-12-05 Tor Lillqvist <tml@iki.fi>
* glib/glib.symbols
* glib/gwin32.[hc]: Implement DLL ABI stability also for
g_win32_get_package_installation_directory()) and
g_win32_get_package_installation_subdirectory().
* glib/Makefile.am (install-libtool-import-lib): Remove the DLL * glib/Makefile.am (install-libtool-import-lib): Remove the DLL
binary compatibilty entries from the import library. They aren't binary compatibilty entries from the import library. They aren't
used by newly compiled code, so no need to have them in the import used by newly compiled code, so no need to have them in the import

View File

@ -1,5 +1,10 @@
2004-12-05 Tor Lillqvist <tml@iki.fi> 2004-12-05 Tor Lillqvist <tml@iki.fi>
* glib/glib.symbols
* glib/gwin32.[hc]: Implement DLL ABI stability also for
g_win32_get_package_installation_directory()) and
g_win32_get_package_installation_subdirectory().
* glib/Makefile.am (install-libtool-import-lib): Remove the DLL * glib/Makefile.am (install-libtool-import-lib): Remove the DLL
binary compatibilty entries from the import library. They aren't binary compatibilty entries from the import library. They aren't
used by newly compiled code, so no need to have them in the import used by newly compiled code, so no need to have them in the import

View File

@ -1,5 +1,10 @@
2004-12-05 Tor Lillqvist <tml@iki.fi> 2004-12-05 Tor Lillqvist <tml@iki.fi>
* glib/glib.symbols
* glib/gwin32.[hc]: Implement DLL ABI stability also for
g_win32_get_package_installation_directory()) and
g_win32_get_package_installation_subdirectory().
* glib/Makefile.am (install-libtool-import-lib): Remove the DLL * glib/Makefile.am (install-libtool-import-lib): Remove the DLL
binary compatibilty entries from the import library. They aren't binary compatibilty entries from the import library. They aren't
used by newly compiled code, so no need to have them in the import used by newly compiled code, so no need to have them in the import

View File

@ -1,5 +1,10 @@
2004-12-05 Tor Lillqvist <tml@iki.fi> 2004-12-05 Tor Lillqvist <tml@iki.fi>
* glib/glib.symbols
* glib/gwin32.[hc]: Implement DLL ABI stability also for
g_win32_get_package_installation_directory()) and
g_win32_get_package_installation_subdirectory().
* glib/Makefile.am (install-libtool-import-lib): Remove the DLL * glib/Makefile.am (install-libtool-import-lib): Remove the DLL
binary compatibilty entries from the import library. They aren't binary compatibilty entries from the import library. They aren't
used by newly compiled code, so no need to have them in the import used by newly compiled code, so no need to have them in the import

View File

@ -1,5 +1,10 @@
2004-12-05 Tor Lillqvist <tml@iki.fi> 2004-12-05 Tor Lillqvist <tml@iki.fi>
* glib/glib.symbols
* glib/gwin32.[hc]: Implement DLL ABI stability also for
g_win32_get_package_installation_directory()) and
g_win32_get_package_installation_subdirectory().
* glib/Makefile.am (install-libtool-import-lib): Remove the DLL * glib/Makefile.am (install-libtool-import-lib): Remove the DLL
binary compatibilty entries from the import library. They aren't binary compatibilty entries from the import library. They aren't
used by newly compiled code, so no need to have them in the import used by newly compiled code, so no need to have them in the import

View File

@ -909,8 +909,10 @@ g_vsprintf
#ifdef G_OS_WIN32 #ifdef G_OS_WIN32
g_win32_error_message g_win32_error_message
g_win32_ftruncate g_win32_ftruncate
g_win32_get_package_installation_directory g_win32_get_package_installation_directory PRIVATE
g_win32_get_package_installation_subdirectory g_win32_get_package_installation_directory_utf8
g_win32_get_package_installation_subdirectory PRIVATE
g_win32_get_package_installation_subdirectory_utf8
g_win32_get_windows_version g_win32_get_windows_version
g_win32_getlocale g_win32_getlocale
#endif #endif

View File

@ -1198,7 +1198,7 @@ get_package_directory_from_module (gchar *module_name)
/** /**
* g_win32_get_package_installation_directory: * g_win32_get_package_installation_directory:
* @package: An identifier for a software package, or %NULL, in UTF-8 * @package: An identifier for a software package, or %NULL, in UTF-8
* @dll_name: The name of a DLL that a package provides, or %NULL, in the GLib file name encoding, which is UTF-8 on Windows. * @dll_name: The name of a DLL that a package provides, or %NULL, in UTF-8
* *
* Try to determine the installation directory for a software package. * Try to determine the installation directory for a software package.
* Typically used by GNU software packages. * Typically used by GNU software packages.
@ -1331,11 +1331,41 @@ g_win32_get_package_installation_directory (gchar *package,
return result; return result;
} }
#undef g_win32_get_package_installation_directory
/* DLL ABI binary compatibility version that uses system codepage file names */
gchar *
g_win32_get_package_installation_directory (gchar *package,
gchar *dll_name)
{
gchar *utf8_package = NULL, *utf8_dll_name = NULL;
gchar *utf8_retval, *retval;
if (package != NULL)
utf8_package = g_locale_to_utf8 (package, -1, NULL, NULL, NULL);
if (dll_name != NULL)
utf8_dll_name = g_locale_to_utf8 (dll_name, -1, NULL, NULL, NULL);
utf8_retval =
g_win32_get_package_installation_directory_utf8 (utf8_package,
utf8_dll_name);
retval = g_locale_from_utf8 (utf8_retval, -1, NULL, NULL, NULL);
g_free (utf8_package);
g_free (utf8_dll_name);
g_free (utf8_retval);
return retval;
}
/** /**
* g_win32_get_package_installation_subdirectory: * g_win32_get_package_installation_subdirectory:
* @package: An identifier for a software package, or %NULL. * @package: An identifier for a software package, in UTF-8, or %NULL
* @dll_name: The name of a DLL that a package provides, or %NULL. * @dll_name: The name of a DLL that a package provides, in UTF-8, or %NULL
* @subdir: A subdirectory of the package installation directory. * @subdir: A subdirectory of the package installation directory, also in UTF-8
* *
* Returns a newly-allocated string containing the path of the * Returns a newly-allocated string containing the path of the
* subdirectory @subdir in the return value from calling * subdirectory @subdir in the return value from calling
@ -1343,11 +1373,31 @@ g_win32_get_package_installation_directory (gchar *package,
* @dll_name parameters. * @dll_name parameters.
* *
* Returns: a string containing the complete path to @subdir inside * Returns: a string containing the complete path to @subdir inside
* the installation directory of @package. The string is in the GLib * the installation directory of @package. The returned string is in
* file name encoding, i.e. UTF-8 on Windows. The return value should * the GLib file name encoding, i.e. UTF-8 on Windows. The return
* be freed with g_free() when no longer needed. * value should be freed with g_free() when no longer needed.
**/ **/
gchar *
g_win32_get_package_installation_subdirectory (gchar *package,
gchar *dll_name,
gchar *subdir)
{
gchar *prefix;
gchar *dirname;
prefix = g_win32_get_package_installation_directory_utf8 (package, dll_name);
dirname = g_build_filename (prefix, subdir, NULL);
g_free (prefix);
return dirname;
}
#undef g_win32_get_package_installation_subdirectory
/* DLL ABI binary compatibility version that uses system codepage file names */
gchar * gchar *
g_win32_get_package_installation_subdirectory (gchar *package, g_win32_get_package_installation_subdirectory (gchar *package,
gchar *dll_name, gchar *dll_name,

View File

@ -86,6 +86,9 @@ gchar* g_win32_getlocale (void);
*/ */
gchar* g_win32_error_message (gint error); gchar* g_win32_error_message (gint error);
#define g_win32_get_package_installation_directory g_win32_get_package_installation_directory_utf8
#define g_win32_get_package_installation_subdirectory g_win32_get_package_installation_subdirectory_utf8
gchar* g_win32_get_package_installation_directory (gchar *package, gchar* g_win32_get_package_installation_directory (gchar *package,
gchar *dll_name); gchar *dll_name);