#ifdef XPCOM_GLUE
static const GREVersionRange greVersion = {
  "1.9a", PR_TRUE,
  "2", PR_TRUE
};
char xpcomLocation[4096];
rv = GRE_GetGREPathWithProperties(&greVersion, 1, nsnull, 0, xpcomLocation, 4096);
if (NS_FAILED (rv))
{
  g_warning ("Could not determine locale!\n");
  return;
}

// Startup the XPCOM Glue that links us up with XPCOM.
rv = XPCOMGlueStartup(xpcomLocation);
if (NS_FAILED (rv))
{
  g_warning ("Could not determine locale!\n");
  return;
}

rv = GTKEmbedGlueStartup();
if (NS_FAILED (rv))
{
  g_warning ("Could not determine locale!\n");
  return;
}

char *lastSlash = strrchr(xpcomLocation, '/');
if (lastSlash)
  *lastSlash = '\0';

gtk_moz_embed_set_path(xpcomLocation);

#endif

