projects
/
moonshot-ui.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Specify GLib.Idle to avoid ambiguity with Gtk.Idle on modern vala
[moonshot-ui.git]
/
src
/
moonshot-futils.c
1
#ifdef HAVE_GETPWUID
2
#include <stdlib.h>
3
#include <sys/types.h>
4
#include <pwd.h>
5
#endif
6
7
const char * GetUserName()
8
{
9
#ifdef HAVE_GETPWUID
10
struct passwd *pwd = getpwuid(getuid());
11
return pwd ? pwd->pw_name : "unknown";
12
#else
13
return "unknown";
14
#endif
15
}
16
17
const char * GetFlatStoreUsersFilePath()
18
{
19
return MOONSHOT_FLATSTORE_USERS;
20
}