Re: g_module_build_path on Win32
- From: "David Necas (Yeti)" <yeti physics muni cz>
- To: Rick Jones <rick jones2 hp com>
- Cc: gtk-list gnome org
- Subject: Re: g_module_build_path on Win32
- Date: Thu, 30 Mar 2006 19:57:53 +0200
On Thu, Mar 30, 2006 at 09:50:16AM -0800, Rick Jones wrote:
> Tor Lillqvist wrote:
> >
> >If one specifies the full name of the dll including the ".dll",
> >g_module_build_path() doesn prepend "lib".
>
> is that full absolute name, or a "full basename?"
>
> rick jones
Use the Source, Luke.
Yeti
--
That's enough.
====[ gmodule-win32.c ]=====================================================
static gchar*
_g_module_build_path (const gchar *directory,
const gchar *module_name)
{
gint k;
k = strlen (module_name);
if (directory && *directory)
if (k > 4 && g_ascii_strcasecmp (module_name + k - 4, ".dll") == 0)
return g_strconcat (directory, G_DIR_SEPARATOR_S, module_name, NULL);
#ifdef G_WITH_CYGWIN
else if (strncmp (module_name, "lib", 3) == 0 || strncmp (module_name, "cyg", 3) == 0)
return g_strconcat (directory, G_DIR_SEPARATOR_S, module_name, ".dll", NULL);
else
return g_strconcat (directory, G_DIR_SEPARATOR_S, "cyg", module_name, ".dll", NULL);
#else
else if (strncmp (module_name, "lib", 3) == 0)
return g_strconcat (directory, G_DIR_SEPARATOR_S, module_name, ".dll", NULL);
else
return g_strconcat (directory, G_DIR_SEPARATOR_S, "lib", module_name, ".dll", NULL);
#endif
else if (k > 4 && g_ascii_strcasecmp (module_name + k - 4, ".dll") == 0)
return g_strdup (module_name);
#ifdef G_WITH_CYGWIN
else if (strncmp (module_name, "lib", 3) == 0 || strncmp (module_name, "cyg", 3) == 0)
return g_strconcat (module_name, ".dll", NULL);
else
return g_strconcat ("cyg", module_name, ".dll", NULL);
#else
else if (strncmp (module_name, "lib", 3) == 0)
return g_strconcat (module_name, ".dll", NULL);
else
return g_strconcat ("lib", module_name, ".dll", NULL);
#endif
}
============================================================================
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]