#include <glib/gstring.h>
#include <glib/gmem.h>
#include <glib/gstrfuncs.h>
+#include <glib/gutils.h>
#include <stdio.h>
#include <errno.h>
#include <ctype.h>
G_STRINGIFY(SYSCONFDIR) "/sysconfig",PACKAGE,
G_STRINGIFY(SYSCONFDIR) "/default",PACKAGE,
G_STRINGIFY(SYSCONFDIR) "",PACKAGE,
- /* 'getenv("HOME")' may return NULL and terminate the list prematurely. */
- getenv("HOME"),"." PACKAGE "rc",
+ /* g_get_home_dir() may return NULL and terminate the list prematurely. */
+ g_get_home_dir(),"." PACKAGE "rc",
NULL);
}
#include <glib/galloca.h>
#include <glib/gprintf.h>
#include <glib/grand.h>
+#include <glib/gutils.h>
#include "network.h"
#include "packet.h"
static const char *user_val;
if (!static_pathname)
- user_val=getenv("USER");
+ user_val=g_get_user_name();
return pathname_find(&static_pathname,
G_STRINGIFY(LOCALSTATEDIR) "/run",PACKAGE ".pid",
- (!user_val ? NULL : "/tmp"),
+ (!user_val ? NULL : g_get_tmp_dir()),
(!user_val ? NULL : udpgate_printf_alloca(".%s-%s.pid",user_val,PACKAGE)),
NULL);
}