glib/gmain.c Mark the _funcs tables for export.
authorTor Lillqvist <tml@iki.fi>
Mon, 17 Sep 2001 22:39:57 +0000 (22:39 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Mon, 17 Sep 2001 22:39:57 +0000 (22:39 +0000)
2001-09-18  Tor Lillqvist  <tml@iki.fi>

* 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.

14 files changed:
ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
glib/giowin32.c
glib/glib.def
glib/gmain.c
glib/gwin32.c
gmodule/ChangeLog
gmodule/Makefile.am

index 517ae6f..8043047 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2001-09-18  Tor Lillqvist  <tml@iki.fi>
+
+       * 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  <darin@bentspoon.com>
 
        * tests/strfunc-test.c: (main): Change so that it works
index 517ae6f..8043047 100644 (file)
@@ -1,3 +1,17 @@
+2001-09-18  Tor Lillqvist  <tml@iki.fi>
+
+       * 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  <darin@bentspoon.com>
 
        * tests/strfunc-test.c: (main): Change so that it works
index 517ae6f..8043047 100644 (file)
@@ -1,3 +1,17 @@
+2001-09-18  Tor Lillqvist  <tml@iki.fi>
+
+       * 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  <darin@bentspoon.com>
 
        * tests/strfunc-test.c: (main): Change so that it works
index 517ae6f..8043047 100644 (file)
@@ -1,3 +1,17 @@
+2001-09-18  Tor Lillqvist  <tml@iki.fi>
+
+       * 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  <darin@bentspoon.com>
 
        * tests/strfunc-test.c: (main): Change so that it works
index 517ae6f..8043047 100644 (file)
@@ -1,3 +1,17 @@
+2001-09-18  Tor Lillqvist  <tml@iki.fi>
+
+       * 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  <darin@bentspoon.com>
 
        * tests/strfunc-test.c: (main): Change so that it works
index 517ae6f..8043047 100644 (file)
@@ -1,3 +1,17 @@
+2001-09-18  Tor Lillqvist  <tml@iki.fi>
+
+       * 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  <darin@bentspoon.com>
 
        * tests/strfunc-test.c: (main): Change so that it works
index 517ae6f..8043047 100644 (file)
@@ -1,3 +1,17 @@
+2001-09-18  Tor Lillqvist  <tml@iki.fi>
+
+       * 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  <darin@bentspoon.com>
 
        * tests/strfunc-test.c: (main): Change so that it works
index 517ae6f..8043047 100644 (file)
@@ -1,3 +1,17 @@
+2001-09-18  Tor Lillqvist  <tml@iki.fi>
+
+       * 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  <darin@bentspoon.com>
 
        * tests/strfunc-test.c: (main): Change so that it works
index 00e1640..f8b40bb 100644 (file)
@@ -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,
index b06c9d6..299b8fc 100644 (file)
@@ -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
index f5dd8ca..cebf552 100644 (file)
@@ -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,
index 87eba26..8d7bd03 100644 (file)
@@ -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, &reg_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, &reg_key) == ERROR_SUCCESS
+          && RegQueryValueEx (reg_key, "InstallationDirectory", 0,
+                              &type, NULL, &nbytes) == ERROR_SUCCESS)
+         ||
+         ((RegOpenKeyEx (HKEY_LOCAL_MACHINE, key, 0,
+                        KEY_QUERY_VALUE, &reg_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,
index 95ffbbf..2f916e1 100644 (file)
@@ -1,3 +1,9 @@
+2001-09-18  Tor Lillqvist  <tml@iki.fi>
+
+       * 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  <hans@breuer.org>
 
        * makefile.msc.in : reflect glib move
index 22d451c..7e78232 100644 (file)
@@ -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