mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 15:03:39 +02:00
[start of port to win32/msvc] HAVE_UNIST_H and _pipe() only include
2007-12-03 Hans Breuer <hans@breuer.org> [start of port to win32/msvc] * gcancellable.c : HAVE_UNIST_H and _pipe() * gcontenttype.c : only include <dirent.h> in the UNIX branch * gdatainputstream.c : pointer arithmetic on void* is a gcc extension * gdummyfile.c glocalfileinputstream.c gsimpleasyncresult.c : use HAVE_UNIST_H * glocalfileoutputstream.c : use HAVE_UNIST_H and s/ssize_t/gssize/ * glocalvfs.c : use HAVE_PWD_H * gio.symbols : ifdef unix specific functions with G_OS_UNIX * makefile.msc : new file (maybe later converted to makefile.msc.in) * Makefile.am : added to EXTRA_DIST svn path=/trunk/; revision=6027
This commit is contained in:
@@ -25,7 +25,9 @@
|
||||
#include "glocalfile.h"
|
||||
#include <gio/gdummyfile.h>
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_PWD_H
|
||||
#include <pwd.h>
|
||||
#endif
|
||||
|
||||
#include "gioalias.h"
|
||||
|
||||
@@ -135,6 +137,7 @@ g_local_vfs_parse_name (GVfs *vfs,
|
||||
user_prefix = g_strdup (g_get_home_dir());
|
||||
else
|
||||
{
|
||||
#ifdef HAVE_PWD_H
|
||||
user_name = g_strndup (user_start, user_end - user_start);
|
||||
passwd_file_entry = getpwnam (user_name);
|
||||
g_free (user_name);
|
||||
@@ -143,6 +146,7 @@ g_local_vfs_parse_name (GVfs *vfs,
|
||||
passwd_file_entry->pw_dir != NULL)
|
||||
user_prefix = g_strdup (passwd_file_entry->pw_dir);
|
||||
else
|
||||
#endif
|
||||
user_prefix = g_strdup (g_get_home_dir ());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user