From c65508d2723d255a9fcdfa8ac2a5f82b0667a7c6 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Mon, 15 Mar 1999 00:03:37 +0000 Subject: This might seem like a large patch, but it isn't that bad, and nothing should break on Unix/X11. Win32 merge and general portability stuff: * acconfig.h,configure.in: Check for . * gdk/win32: New directory (actually, been there for a while). * gtk/fnmatch.c: Include for G_DIR_SEPARATOR, WIN32 and NATIVE_WIN32, and use these. Always case fold on Win32. No backslashed escapes on native Win32. * gtk/{gtk.def,makefile.msc}: New files. * gtk/Makefile.am: Add above new files. * gtk/{gtkaccelgroup,gtkbindings}.c: Include instead of . * gtk/{gtkcalendar,gtkitemfactory,gtkpreview,gtkrc}.c: Include config.h. Protect inclusion of , , and appropriately. * gtk/gtkdnd.c: Merge in Win32 version (which doesn't do much). Use ABS() (from ) instead of abs(). * gtk/gtkfilesel.c: Moved Win32-specific includes after inclusion of gtk (and thus glib) headers, so that WIN32 will be defined. With MS C, include for mkdir prototype. * gtk/gtkitemfactory.c (gtk_item_factory_callback_marshal): Add some casts, needed by MS C. * gtk/{gtklayout,gtkplug}.c: Merge in Win32 version (which isn't implemented). * gtk/gtkmain.c: Include gdk/gdkx.h for GDK_WINDOWING. Include only on X11 platform, otherwise . Use G_SEARCHPATH_SEPARATOR_S and g_module_build_path. * gtk/gtkmain.h: Mark variables for export/import on Win32. * gtk/gtkrange.c (gtk_range_motion_notify): Set mods also in case the event is not a hint, or its window is not the slider. Needed on Win32, at least. * gtk/gtkrc.c: Include config.h and gdk/gdkx.h. Use unless on X11. Skip \r chars, too. Use G_DIR_SEPARATOR and G_SEARCHPATH_SEPARATOR(_S). Use g_path_is_absolute. On Win32, use a subdirectory of the Windows directory as gtk system configuration directory. * gtk/gtkselection.c: No chunks on Win32. * gtk/gtksocket.c: Not implemented on Win32. * gtk/gtkthemes.c (gtk_theme_engine_get): Use g_module_build_path. * gtk/makeenums.h: Include gdkprivate.h after gdk.h. * gtk/testrgb.c: Use dynamically allocated buffer. Use GTimers. --- gtk/gtkmain.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'gtk/gtkmain.c') diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c index 3c3523ea2c..aa6ba38f58 100644 --- a/gtk/gtkmain.c +++ b/gtk/gtkmain.c @@ -24,7 +24,13 @@ * GTK+ at ftp://ftp.gtk.org/pub/gtk/. */ +#include "gdk/gdkx.h" /* For GDK_WINDOWING */ + +#if GDK_WINDOWING == GDK_WINDOWING_X11 #include /* so we get the right setlocale */ +#else +#include +#endif #include #include #include @@ -233,7 +239,7 @@ gtk_init_check (int *argc, gchar **modules, **as; #ifndef __EMX__ - modules = g_strsplit (env_string, ":", -1); + modules = g_strsplit (env_string, G_SEARCHPATH_SEPARATOR_S, -1); #else modules = g_strsplit (env_string, ";", -1); #endif @@ -354,14 +360,11 @@ gtk_init_check (int *argc, module_name = slist->data; slist->data = NULL; #ifndef __EMX__ - if (!(module_name[0] == '/' || - (module_name[0] == 'l' && - module_name[1] == 'i' && - module_name[2] == 'b'))) + if (!g_path_is_absolute (module_name)) { gchar *old = module_name; - module_name = g_strconcat ("lib", module_name, ".so", NULL); + module_name = g_module_build_path (NULL, module_name); g_free (old); } #else -- cgit v1.2.1