* mu-runtime.c, mu-util.c: remove mu_util_init_system
- no longer needed, since we no longer need to special case the BSDs
This commit is contained in:
@ -87,8 +87,8 @@ mu_runtime_init (const char* muhome_arg, const char *name)
|
||||
g_return_val_if_fail (!_initialized, FALSE);
|
||||
g_return_val_if_fail (name, FALSE);
|
||||
|
||||
if (!mu_util_init_system())
|
||||
return FALSE;
|
||||
setlocale (LC_ALL, "");
|
||||
g_type_init ();
|
||||
|
||||
if (muhome_arg)
|
||||
muhome = g_strdup (muhome_arg);
|
||||
@ -124,8 +124,8 @@ mu_runtime_init_from_cmdline (int *pargc, char ***pargv, const char *name)
|
||||
g_return_val_if_fail (!_initialized, FALSE);
|
||||
g_return_val_if_fail (name, FALSE);
|
||||
|
||||
if (!mu_util_init_system())
|
||||
return FALSE;
|
||||
setlocale (LC_ALL, "");
|
||||
g_type_init ();
|
||||
|
||||
_data = g_new0 (MuRuntimeData, 1);
|
||||
_data->_config = mu_config_init (pargc, pargv);
|
||||
|
||||
@ -150,33 +150,6 @@ mu_util_cache_dir (void)
|
||||
}
|
||||
|
||||
|
||||
gboolean
|
||||
mu_util_init_system (void)
|
||||
{
|
||||
/* without setlocale, non-ascii cmdline params (like search
|
||||
* terms) won't work */
|
||||
setlocale (LC_ALL, "");
|
||||
|
||||
/* on FreeBSD, it seems g_slice_new and friends lead to
|
||||
* segfaults. Same for MacOS. We cannot easily debug what is
|
||||
* going on there (no access to such a system), so all we can
|
||||
* do is add a lame fallback -> we let g_slice_* use normal
|
||||
* malloc
|
||||
*/
|
||||
#ifndef __linux__
|
||||
if (!g_setenv ("G_SLICE", "always-malloc", TRUE)) {
|
||||
g_critical ("cannot set G_SLICE");
|
||||
return FALSE;
|
||||
}
|
||||
/* g_debug ("setting G_SLICE to always-malloc"); */
|
||||
#endif /*!__linux__*/
|
||||
|
||||
g_type_init ();
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
gboolean
|
||||
mu_util_check_dir (const gchar* path, gboolean readable, gboolean writeable)
|
||||
{
|
||||
|
||||
@ -29,15 +29,6 @@
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/**
|
||||
* do system-specific initialization. should be called before anything
|
||||
* else. Initializes the locale and Gtype. Note: this function is
|
||||
* called by mu_runtime_init.
|
||||
*
|
||||
* @return TRUE if is succeeds, FALSE otherwise
|
||||
*/
|
||||
gboolean mu_util_init_system (void);
|
||||
|
||||
/**
|
||||
* get the expanded path; ie. perform shell expansion on the path. the
|
||||
* path does not have to exist
|
||||
|
||||
Reference in New Issue
Block a user