Provide automatic 'GModule' disabled if: --enable-bundle
authorshort <>
Thu, 23 Jun 2005 02:30:48 +0000 (02:30 +0000)
committershort <>
Thu, 23 Jun 2005 02:30:48 +0000 (02:30 +0000)
src/Makefile.am
src/no-gmodule.c [new file with mode: 0644]

index 9b4118b..7c3549f 100644 (file)
@@ -41,7 +41,8 @@ BUNDLE_SRCS= \
                bundle.c \
                bundle.h \
                bundle-util.c \
-               bundle-util.h
+               bundle-util.h \
+               no-gmodule.c
 endif
 
 EXTRA_DIST+= \
diff --git a/src/no-gmodule.c b/src/no-gmodule.c
new file mode 100644 (file)
index 0000000..77b1c07
--- /dev/null
@@ -0,0 +1,91 @@
+/* $Id$
+ * Gnome user interface
+ * Copyright (C) 2004 Jan Kratochvil <project-udpgate@jankratochvil.net>
+ * 
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; exactly version 2 of June 1991 is required
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+
+#include "config.h"
+
+#include <stdio.h>
+#include <gmodule.h>
+#include <glib/gmessages.h>
+
+
+/* #define CAPTIVE_G_MODULE_DEBUG 1 */
+
+
+GModule *g_module_open(const gchar *file_name,GModuleFlags flags)
+{
+#ifdef CAPTIVE_G_MODULE_DEBUG
+       g_message("g_module_open:%s",file_name);
+#endif /* CAPTIVE_G_MODULE_DEBUG */
+       return NULL;
+}
+
+gchar *g_module_build_path(const gchar *directory,const gchar *module_name)
+{
+#ifdef CAPTIVE_G_MODULE_DEBUG
+       g_message("g_module_build_path:%s,%s",directory,module_name);
+#endif /* CAPTIVE_G_MODULE_DEBUG */
+       return NULL;
+}
+
+gboolean g_module_close(GModule *module)
+{
+#ifdef CAPTIVE_G_MODULE_DEBUG
+       g_message("g_module_close:%p",module);
+#endif /* CAPTIVE_G_MODULE_DEBUG */
+       return FALSE;   /* meaning: failure */
+}
+
+G_CONST_RETURN gchar *g_module_error(void)
+{
+#ifdef CAPTIVE_G_MODULE_DEBUG
+       g_message("g_module_error\n");
+#endif /* CAPTIVE_G_MODULE_DEBUG */
+       return NULL;
+}
+
+void g_module_make_resident(GModule *module)
+{
+#ifdef CAPTIVE_G_MODULE_DEBUG
+       g_message("g_module_make_resident:%p",module);
+#endif /* CAPTIVE_G_MODULE_DEBUG */
+}
+
+G_CONST_RETURN gchar *g_module_name(GModule *module)
+{
+#ifdef CAPTIVE_G_MODULE_DEBUG
+       g_message("g_module_name:%p",module);
+#endif /* CAPTIVE_G_MODULE_DEBUG */
+       return NULL;
+}
+
+gboolean g_module_supported(void)
+{
+#ifdef CAPTIVE_G_MODULE_DEBUG
+       g_message("g_module_supported\n");
+#endif /* CAPTIVE_G_MODULE_DEBUG */
+       return FALSE;   /* meaning: unsupported */
+}
+
+gboolean g_module_symbol(GModule *module,const gchar *symbol_name,gpointer *symbol)
+{
+#ifdef CAPTIVE_G_MODULE_DEBUG
+       g_message("g_module_symbol:%p,%s",module,symbol_name);
+#endif /* CAPTIVE_G_MODULE_DEBUG */
+       return FALSE;   /* meaning: failure */
+}