First steps to build this on Windows (for those who have been trying
authorMiguel de Icaza <miguel@gnome.org>
Fri, 18 Aug 2006 16:37:42 +0000 (16:37 -0000)
committerMiguel de Icaza <miguel@gnome.org>
Fri, 18 Aug 2006 16:37:42 +0000 (16:37 -0000)
to), updates the goals for the project.

svn path=/trunk/mono/; revision=63998

eglib/ChangeLog
eglib/README
eglib/configure.in
eglib/src/eglib-config.h.in
eglib/src/gmodule.c

index ce05224a0ee72549aad0b5eb391eeff462a88466..4fbe104b441b690890d4cc393b9520b08feabbdc 100644 (file)
@@ -1,3 +1,8 @@
+2006-08-18  Miguel de Icaza  <miguel@novell.com>
+
+       * src/eglib-config.h (G_OS_): Add the G_OS_UNIX and G_OS_WIN32
+       defines that we can use to check on the host OS.
+
 2006-08-18  Aaron Bockover  <abockover@novell.com>
 
        * test/test.[ch]:
index dcead76897fe3adfd5852bfd5093451a53b2e68c..03849b5fdca4ee7e321ce18e761f16ba93f86fc6 100644 (file)
@@ -29,4 +29,25 @@ no separate files, please try to follow the convetions in the source code
        this, use:
 
                $ cd test
-               $ ./other
\ No newline at end of file
+               $ ./other
+
+* Plans: short and long term.
+
+       The short term plans for eglib is to allow Mono to optionally
+       build with it instead of using glib, gmodule and gthread, but
+       the default build will continue to be done against glib 2.0.
+
+       Our first target is to make this work with Linux, other
+       platforms will follow after that.
+
+       In the long-term (Mono 2.0) we are considering dropping glib
+       as a dependency, considering that Mono requires a modern Unix
+       system to run anyways (for its thread support) it would allow
+       us to fix some of the glib API limitations we have to live
+       with (explicit thread support for example), rework the API to
+       use types from stdint.h and we would be able to drop three
+       external shared libraries.
+
+       This would reduce memory usage for the handful of routines
+       that we use from glib, dynamic linker overhead for those and
+       would allow us to tune the implementation to Mono's needs. 
index fe614dfd714c5928387907209f9d7fc777b8f055..2d0a3e544899de4876f16628a5e4b73774e63281 100644 (file)
@@ -35,15 +35,18 @@ case $host in
 *-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
     PATHSEP='\\'
     SEARCHSEP=';'
+    OS="WIN32"
     ;;
 *)
     PATHSEP='/'
     SEARCHSEP=':'
+    OS="UNIX"
     ;;
 esac
 
 AC_SUBST(PATHSEP)
 AC_SUBST(SEARCHSEP)
+AC_SUBST(OS)
 
 AC_OUTPUT([
 Makefile
index a3f566cc5b58376476eb255aae0b093dae4f7d34..9010fdd5ff4622c8b7dd029483a8662f1c03bcd5 100644 (file)
@@ -9,3 +9,4 @@
 #define G_DIR_SEPARATOR          '@PATHSEP@'
 #define G_DIR_SEPARATOR_S        "@PATHSEP@"
 #define G_BREAKPOINT             @BREAKPOINT@
+#define G_OS_@OS@
index 08add905354233bb0ad81071980a42497b5b5d48..02cbc0c7ef5122a5f99a75b49a6bf20e5c8ac1d2 100644 (file)
  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 #include <glib.h>
+
+#ifdef G_OS_UNIX
 #include <dlfcn.h>
 
+/* For Linux and Solaris, need to add others as we port this */
+#define LIBSUFFIX "lib"
+#define LIBPREFIX ".so"
+
 struct _GModule {
        void *handle;
 };
@@ -84,6 +90,33 @@ g_module_close (GModule *module)
        return (0 == dlclose (handle));
 }
 
+#else
+
+GModule *
+g_module_open (const gchar *file, GModuleFlags flags)
+{
+       g_error ("g_module_open not implemented on this platform");
+}
+
+gboolean
+g_module_symbol (GModule *module, const gchar *symbol_name, gpointer *symbol)
+{
+       g_error ("g_module_open not implemented on this platform");
+}
+
+const gchar *
+g_module_error (void)
+{
+       g_error ("g_module_open not implemented on this platform");
+}
+
+gboolean
+g_module_close (GModule *module)
+{
+       g_error ("g_module_open not implemented on this platform");
+}
+#endif
+
 gchar *
 g_module_build_path (const gchar *directory, const gchar *module_name)
 {
@@ -91,7 +124,6 @@ g_module_build_path (const gchar *directory, const gchar *module_name)
                return NULL;
 
        if (directory)
-               return g_strdup_printf ("%s/lib%s.so", directory, module_name);
-       return g_strdup_printf ("lib%s.so", module_name);
+               return g_strdup_printf ("%s/" LIBPREFIX "%s" LIBSUFFIX, directory, module_name);
+       return g_strdup_printf (LIBPREFIX "%s" LIBSUFFIX, module_name); 
 }
-