From 812b4b00aff2fb5baab7e331f1b20d930140f0f7 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Mon, 17 Sep 2001 22:39:57 +0000 Subject: [PATCH] glib/gmain.c Mark the _funcs tables for export. 2001-09-18 Tor Lillqvist * glib/gmain.c * glib/giowin32.c: Mark the _funcs tables for export. * glib/glib.def: Add here, too. * glib/gwin32.c (get_package_directory_from_module): No reason to check for the module being in a bin or lib directory only when module_name is non-NULL. * glib/gwin32.c (g_win32_get_package_installation_directory): Check first in HKEY_CURRENT_USER, then in HKEY_LOCAL_MACHINE. * gmodule/Makefile.am: On Win32, pass a dummy -rpath flag to libtool when building libgplugin_[ab].la, otherwise libtool doesn't create a DLL, but a static archive. --- ChangeLog | 14 ++++++++++++++ ChangeLog.pre-2-0 | 14 ++++++++++++++ ChangeLog.pre-2-10 | 14 ++++++++++++++ ChangeLog.pre-2-12 | 14 ++++++++++++++ ChangeLog.pre-2-2 | 14 ++++++++++++++ ChangeLog.pre-2-4 | 14 ++++++++++++++ ChangeLog.pre-2-6 | 14 ++++++++++++++ ChangeLog.pre-2-8 | 14 ++++++++++++++ glib/giowin32.c | 3 +++ glib/glib.def | 3 +++ glib/gmain.c | 6 ++++++ glib/gwin32.c | 26 ++++++++++++++------------ gmodule/ChangeLog | 6 ++++++ gmodule/Makefile.am | 5 +++-- 14 files changed, 147 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 517ae6f3a..8043047ee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2001-09-18 Tor Lillqvist + + * glib/gmain.c + * glib/giowin32.c: Mark the _funcs tables for export. + + * glib/glib.def: Add here, too. + + * glib/gwin32.c (get_package_directory_from_module): No reason to + check for the module being in a bin or lib directory only when + module_name is non-NULL. + + * glib/gwin32.c (g_win32_get_package_installation_directory): + Check first in HKEY_CURRENT_USER, then in HKEY_LOCAL_MACHINE. + 2001-09-17 Darin Adler * tests/strfunc-test.c: (main): Change so that it works diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 517ae6f3a..8043047ee 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,17 @@ +2001-09-18 Tor Lillqvist + + * glib/gmain.c + * glib/giowin32.c: Mark the _funcs tables for export. + + * glib/glib.def: Add here, too. + + * glib/gwin32.c (get_package_directory_from_module): No reason to + check for the module being in a bin or lib directory only when + module_name is non-NULL. + + * glib/gwin32.c (g_win32_get_package_installation_directory): + Check first in HKEY_CURRENT_USER, then in HKEY_LOCAL_MACHINE. + 2001-09-17 Darin Adler * tests/strfunc-test.c: (main): Change so that it works diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 517ae6f3a..8043047ee 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,17 @@ +2001-09-18 Tor Lillqvist + + * glib/gmain.c + * glib/giowin32.c: Mark the _funcs tables for export. + + * glib/glib.def: Add here, too. + + * glib/gwin32.c (get_package_directory_from_module): No reason to + check for the module being in a bin or lib directory only when + module_name is non-NULL. + + * glib/gwin32.c (g_win32_get_package_installation_directory): + Check first in HKEY_CURRENT_USER, then in HKEY_LOCAL_MACHINE. + 2001-09-17 Darin Adler * tests/strfunc-test.c: (main): Change so that it works diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 517ae6f3a..8043047ee 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,17 @@ +2001-09-18 Tor Lillqvist + + * glib/gmain.c + * glib/giowin32.c: Mark the _funcs tables for export. + + * glib/glib.def: Add here, too. + + * glib/gwin32.c (get_package_directory_from_module): No reason to + check for the module being in a bin or lib directory only when + module_name is non-NULL. + + * glib/gwin32.c (g_win32_get_package_installation_directory): + Check first in HKEY_CURRENT_USER, then in HKEY_LOCAL_MACHINE. + 2001-09-17 Darin Adler * tests/strfunc-test.c: (main): Change so that it works diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 517ae6f3a..8043047ee 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,17 @@ +2001-09-18 Tor Lillqvist + + * glib/gmain.c + * glib/giowin32.c: Mark the _funcs tables for export. + + * glib/glib.def: Add here, too. + + * glib/gwin32.c (get_package_directory_from_module): No reason to + check for the module being in a bin or lib directory only when + module_name is non-NULL. + + * glib/gwin32.c (g_win32_get_package_installation_directory): + Check first in HKEY_CURRENT_USER, then in HKEY_LOCAL_MACHINE. + 2001-09-17 Darin Adler * tests/strfunc-test.c: (main): Change so that it works diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 517ae6f3a..8043047ee 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,17 @@ +2001-09-18 Tor Lillqvist + + * glib/gmain.c + * glib/giowin32.c: Mark the _funcs tables for export. + + * glib/glib.def: Add here, too. + + * glib/gwin32.c (get_package_directory_from_module): No reason to + check for the module being in a bin or lib directory only when + module_name is non-NULL. + + * glib/gwin32.c (g_win32_get_package_installation_directory): + Check first in HKEY_CURRENT_USER, then in HKEY_LOCAL_MACHINE. + 2001-09-17 Darin Adler * tests/strfunc-test.c: (main): Change so that it works diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 517ae6f3a..8043047ee 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,17 @@ +2001-09-18 Tor Lillqvist + + * glib/gmain.c + * glib/giowin32.c: Mark the _funcs tables for export. + + * glib/glib.def: Add here, too. + + * glib/gwin32.c (get_package_directory_from_module): No reason to + check for the module being in a bin or lib directory only when + module_name is non-NULL. + + * glib/gwin32.c (g_win32_get_package_installation_directory): + Check first in HKEY_CURRENT_USER, then in HKEY_LOCAL_MACHINE. + 2001-09-17 Darin Adler * tests/strfunc-test.c: (main): Change so that it works diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 517ae6f3a..8043047ee 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,17 @@ +2001-09-18 Tor Lillqvist + + * glib/gmain.c + * glib/giowin32.c: Mark the _funcs tables for export. + + * glib/glib.def: Add here, too. + + * glib/gwin32.c (get_package_directory_from_module): No reason to + check for the module being in a bin or lib directory only when + module_name is non-NULL. + + * glib/gwin32.c (g_win32_get_package_installation_directory): + Check first in HKEY_CURRENT_USER, then in HKEY_LOCAL_MACHINE. + 2001-09-17 Darin Adler * tests/strfunc-test.c: (main): Change so that it works diff --git a/glib/giowin32.c b/glib/giowin32.c index 00e164086..f8b40bb38 100644 --- a/glib/giowin32.c +++ b/glib/giowin32.c @@ -595,6 +595,9 @@ g_io_win32_finalize (GSource *source) g_io_channel_unref (watch->channel); } +#if defined(G_PLATFORM_WIN32) && defined(__GNUC__) +__declspec(dllexport) +#endif GSourceFuncs g_io_watch_funcs = { g_io_win32_prepare, g_io_win32_check, diff --git a/glib/glib.def b/glib/glib.def index b06c9d69e..299b8fc2b 100644 --- a/glib/glib.def +++ b/glib/glib.def @@ -194,6 +194,7 @@ EXPORTS g_iconv_open g_idle_add g_idle_add_full + g_idle_funcs g_idle_remove_by_data g_idle_source_new g_int_equal @@ -243,6 +244,7 @@ EXPORTS g_io_channel_write_chars g_io_channel_write_unichar g_io_create_watch + g_io_watch_funcs g_list_alloc g_list_append g_list_concat @@ -593,6 +595,7 @@ EXPORTS g_threads_got_initialized g_timeout_add g_timeout_add_full + g_timeout_funcs g_timeout_source_new g_timer_destroy g_timer_elapsed diff --git a/glib/gmain.c b/glib/gmain.c index f5dd8ca39..cebf5529e 100644 --- a/glib/gmain.c +++ b/glib/gmain.c @@ -220,6 +220,9 @@ static gboolean g_idle_dispatch (GSource *source, G_LOCK_DEFINE_STATIC (main_loop); static GMainContext *default_main_context; +#if defined(G_PLATFORM_WIN32) && defined(__GNUC__) +__declspec(dllexport) +#endif GSourceFuncs g_timeout_funcs = { g_timeout_prepare, @@ -228,6 +231,9 @@ GSourceFuncs g_timeout_funcs = NULL }; +#if defined(G_PLATFORM_WIN32) && defined(__GNUC__) +__declspec(dllexport) +#endif GSourceFuncs g_idle_funcs = { g_idle_prepare, diff --git a/glib/gwin32.c b/glib/gwin32.c index 87eba268f..8d7bd03ef 100644 --- a/glib/gwin32.c +++ b/glib/gwin32.c @@ -901,13 +901,10 @@ get_package_directory_from_module (gchar *module_name) if ((p = strrchr (fn, G_DIR_SEPARATOR)) != NULL) *p = '\0'; - if (module_name) - { - p = strrchr (fn, G_DIR_SEPARATOR); - if (p && (g_ascii_strcasecmp (p + 1, "bin") == 0 || - g_ascii_strcasecmp (p + 1, "lib") == 0)) - *p = '\0'; - } + p = strrchr (fn, G_DIR_SEPARATOR); + if (p && (g_ascii_strcasecmp (p + 1, "bin") == 0 || + g_ascii_strcasecmp (p + 1, "lib") == 0)) + *p = '\0'; g_hash_table_insert (module_dirs, module_name ? module_name : "", fn); @@ -969,11 +966,16 @@ g_win32_get_package_installation_directory (gchar *package, key = g_strconcat ("Software\\", package, NULL); nbytes = 0; - if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, key, 0, - KEY_QUERY_VALUE, ®_key) == ERROR_SUCCESS - && RegQueryValueEx (reg_key, "InstallationDirectory", 0, - &type, NULL, &nbytes) == ERROR_SUCCESS - && type == REG_SZ) + if ((RegOpenKeyEx (HKEY_CURRENT_USER, key, 0, + KEY_QUERY_VALUE, ®_key) == ERROR_SUCCESS + && RegQueryValueEx (reg_key, "InstallationDirectory", 0, + &type, NULL, &nbytes) == ERROR_SUCCESS) + || + ((RegOpenKeyEx (HKEY_LOCAL_MACHINE, key, 0, + KEY_QUERY_VALUE, ®_key) == ERROR_SUCCESS + && RegQueryValueEx (reg_key, "InstallationDirectory", 0, + &type, NULL, &nbytes) == ERROR_SUCCESS) + && type == REG_SZ)) { result = g_malloc (nbytes + 1); RegQueryValueEx (reg_key, "InstallationDirectory", 0, diff --git a/gmodule/ChangeLog b/gmodule/ChangeLog index 95ffbbf2c..2f916e113 100644 --- a/gmodule/ChangeLog +++ b/gmodule/ChangeLog @@ -1,3 +1,9 @@ +2001-09-18 Tor Lillqvist + + * Makefile.am: On Win32, pass a dummy -rpath flag to libtool when + building libgplugin_[ab].la, otherwise libtool doesn't create a + DLL, but a static archive. + 2001-07-20 Hans Breuer * makefile.msc.in : reflect glib move diff --git a/gmodule/Makefile.am b/gmodule/Makefile.am index 22d451cb5..7e7823225 100644 --- a/gmodule/Makefile.am +++ b/gmodule/Makefile.am @@ -40,6 +40,7 @@ no_undefined = -no-undefined endif if OS_WIN32 export_symbols = -export-symbols gmodule.def +plugin_rpath = -rpath `pwd` endif libgmodule_1_3_la_SOURCES = gmodule.c @@ -53,11 +54,11 @@ libgmodule_1_3_la_LIBADD = @G_MODULE_WIN32_RESOURCE@ @G_MODULE_LIBS_EXTRA@ @G_MO libgmodule_1_3_la_DEPENDENCIES = @G_MODULE_WIN32_RESOURCE@ libgplugin_a_la_SOURCES = libgplugin_a.c -libgplugin_a_la_LDFLAGS = @G_MODULE_LDFLAGS@ -avoid-version -module $(no_undefined) +libgplugin_a_la_LDFLAGS = @G_MODULE_LDFLAGS@ -avoid-version -module $(no_undefined) $(plugin_rpath) libgplugin_a_la_LIBADD = @G_MODULE_LIBS@ @G_MODULE_LIBS_EXTRA@ @G_MODULE_PLUGIN_LIBS@ libgmodule-1.3.la $(libglib) libgplugin_b_la_SOURCES = libgplugin_b.c -libgplugin_b_la_LDFLAGS = @G_MODULE_LDFLAGS@ -avoid-version -module $(no_undefined) +libgplugin_b_la_LDFLAGS = @G_MODULE_LDFLAGS@ -avoid-version -module $(no_undefined) $(plugin_rpath) libgplugin_b_la_LIBADD = @G_MODULE_LIBS@ @G_MODULE_LIBS_EXTRA@ @G_MODULE_PLUGIN_LIBS@ libgmodule-1.3.la $(libglib) noinst_PROGRAMS = testgmodule