to), updates the goals for the project.
svn path=/trunk/mono/; revision=63998
+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]:
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.
*-*-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
#define G_DIR_SEPARATOR '@PATHSEP@'
#define G_DIR_SEPARATOR_S "@PATHSEP@"
#define G_BREAKPOINT @BREAKPOINT@
+#define G_OS_@OS@
* 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;
};
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)
{
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);
}
-